Hacker News new | past | comments | ask | show | jobs | submit login
An always-available, online-capable Raspberry Pi in your pocket (justinmiller.io)
310 points by incanus77 on Nov 2, 2019 | hide | past | favorite | 55 comments



I’ve been doing this via Bluetooth for a good while now - works great from the iPad, too.

Here’s my notes:

https://taoofmac.com/space/links/2019/06/27/0713

...and a gist with the Pi setup:

https://gist.github.com/rcarmo/6ad6c09e904c35857bad2dd2769ed...

I switched from a Zero to a 3A+, though. The Zero is just too slow to do anything productively, and the only real issue with the 3A+ is still having only 512MB of RAM.


So you just connect to the raspi Bluetooth and then you can ssh raspberrypi.local?


Nice! So, how do you use this setup?


I SSH or VNC into it over Bluetooth to build ARM containers, mostly.


Huh, that's neat.

I'm imagining a follow-on version of this, where the Pi Zero has a battery backup built into the case.

So at any time your can just unplug it, and it will go into a low power mode, like sleep on a laptop.


I want something like this, except I want the Pi to be able to directly interface with the laptop keyboard and display in a way that the laptop's internal computer can't snoop or otherwise access.

That way the Pi can serve as a secure computing environment sharing the display and keyboard of my insecure laptop.

On top of that a bunch of neat integration can be added like the insecure laptop submitting ciphertext to the attached Pi with a seamless switch of keyboard and display over to the Pi where I can view the plaintext or do other operations on it, and have new ciphertext sent back to the insecure laptop with a seamless switch back of keyboard and display. I'm imagining integration with tools like mail reading software etc. for doing the switching.

Unfortunately USB-C alone isn't going to enable this level of integration, but I'm optimistic projects like the mntmn reform can facilitate this area of innovation in the future.


Is there something like a KVM switch for laptop keyboards? I think on some models they are attached by USB so it should be possible, if there’s room in the case (and you poke a hole for a cable to the external device :)


I don't know, but I imagine a KVM circuit isn't too complicated to make in a small enough form factor that'd fit under a palm rest.

The first time I wanted this was when someone gave me a usbarmory [0]. It easily fit under my thinkpad's palmrest, but was of limited value for secure computing as the only way I could interact with it was via things like ssh / X over ssh, and I was still displaying/handling all of the unencrypted information on my relatively insecure network-connected host that runs web browsers and accesses all sorts of untrusted input like porn sites and message forums and what have you.

I was able to leave my private keys on the usbarmory which is a marginal improvement, at least nobody could easily sign things as me for instance. But for reading/replying to encrypted emails, I couldn't make the usbarmory connect to my keyboard and display directly, it doesn't have pins for such things nor do I have a micro KVM switch as you mentioned.

[0] https://inversepath.com/usbarmory


This almost certainly isn’t what you had in mind, but the NexDock is a kind of “dumb notebook” that integrates a keyboard and display for smartphones and single-board computers like the Raspberry Pi:

https://nexdock.com/


> nexdock + raspberry pi: world’s most affordable laptop!

> $229 (excluding the pi)

> Laughs in $100 ThinkPad.

Seriously though this looks great. And from what I gather it works with lots of newer phones, and can even be used as a second laptop display.


That looks amazing. A comeback of terminals.


What are some practical uses of having an RPi W in your pocket?


What I would rather carry in my pocket:

* A bit of secure, encrypted storage for my ssh keys, important papers, and similar stuff.

* A u2f token.

* A password manager running in a secure, controlled environment which exposes itself e.g. as a web app.

* A VPN node that exposes itself as a modem / network card.

An RPi could be all these. I maybe would prefer something like USB Armory [1] for for higher security, though it lacks a wifi interface.

[1]: https://inversepath.com/usbarmory.html


You can integrate the first two points soon (SSH and u2f). See https://marc.info/?l=openssh-unix-dev&m=157259802529972&w=2


Author here. For me, it's less about a Linux environment. For that, I use VMware, Docker, or another machine, if needed.

But the Pi Zero is great precisely because I'm doing more with hardware lately, and so I have 40 GPIO pins available to do hardware testing on.


I know some people use them to have a small linux dev environment they can access from their iPads (without internet).

As a travel router for your devices to relay WLANs with captive portal (and/or handle VPN etc).


Is it just me, or does something seem horribly wrong with the world when your 4-digit-price-tag personal Unix computing device from the world's richest company needs a 5 dollar hobbyist board to be a useful Unix development environment?


Nothing is wrong: iPad is mostly a consumption device which does not show any development interface to the user. Compare it to a music player that does not expose any music creation interface.

This allows the maker of iPads to change the underlying implementation how they see fit, without making users notice anything. If iPads started to run a mickrokernel OS underneath, the UI / UX won't change at all.

The expensive parts of an iPad are the screen, the battery, the QA, and the brand. The CPU is not particularly expensive, though maybe isn't a $5 part.


The marketing line for the iPad pro is "like a computer. Unlike any computer"


For most of the people it's being marketed to, a computer is not a development system, either.


>Compare it to a music player that does not expose any music creation interface.

Okay, and if people were buying 4-figure Bang and Olufsen stereo systems and hooking up a 5-dollar cassette recorder as their music production system, I'd be perturbed by that as well.

If it's merely a consumption device, why attempt to develop on it? If it's a serious tool, why is the $5 component needed? Most of all - why don't you have a device that actually does what you want it to, properly, and why doesn't this bother you?


Is it just me, or do many Unix users get offended by any computing device that can’t run Unix?

Here’s Steve Jobs’ take: https://youtu.be/YfJ3QxJYsw8


Even for NeXT being an UNIX was more a way to bring in UNIX software, while competing against Sun than anything else.

The OS architecture, drivers being written in Objective-C, foundation frameworks had nothing UNIXy about them.


Hackers have plenty of great options for consumption devices but a lot of the time we just need better cyberdecks.


Nothing seems wrong to me. Your much more expensive new luxury car probably has a good deal of computing power without a useful Unix development environment. Same goes with your expensive new television.


Your expensive new car and new TV probably aren't being marketed as a replacement for your PC.


Your iPad isn’t marketed as a replacement for your PC in any context that would imply that you could easily run a Unix development environment. Seriously: I can’t imagine anyone who would be aware of Unix development environments who would also be under the impression that an iPad would be a good device for that purpose.


I agree; and yet, here we are, with people attempting exactly that and going to frankly ridiculous lengths to do so - apparently, in an earnest effort to do real work. How did we end up here?


Large majority of computer users are neither UNIX users, nor UNIX developers.

For them the iPad is indeed a replacement.


Well it's "like a computer unlike any computer"...


Not kidding when I say, they drink the Apple marketing.

Replace their oddity with something like a laptop or non iOS environment.

It's a Linux box with WiFi.


I've been trying to do more work on my iPad Pro recently. Mostly I work over SSH but I do miss having a full desktop environment. Can you add any more details about how people use this?

I assume the Pi broadcasts a WiFi hotspot and then they use some Remote Desktop software, but I'd love to know specifics of what people have found works!


Yes, the Pi can be configured to work as a WiFi hotspot and you can then connect via SSH, e.g. using Termius (or a VNC app, if one needs a graphical environment). It’s straightforward to add gcc, ghci (Haskell) and several other languages/development environments.

Having said that, would also recommend the iSH app (https://ish.app/), which gives you an x86 Alpine Linux environment directly on the iPad without additional hardware.


iSH is dog slow even on my last year’s iPad Pro 12.9’’, the most powerful iPad to date (not really surprising since iSH is based on user mode x86 emulation). So, except for novelty or tasks with absolutely no alternatives, I wouldn’t really recommend it.


I guess my point was in the context of this thread where a possible alternative is connecting to a Raspberry Pi Zero W, which itself is not a speed demon.

Just to give an idea (and with all the caveats about this being a very unscientific comparison and not like for like in many ways), ‘time gcc hello.cpp’ runs in about .7s on that Pi* and 1.4s in iSH (on an Air Pad 2 from 2014). Using g++ instead, the time is 1.4s vs 1.8s.

So, yes, it would be crazy to use either for compute intensive tasks but they’re serviceable and not a million miles apart in terms of performance. The command line itself and apps like vim etc. do not feel ‘dog slow’ to me but there is likely an element of subjective ness there.

To be fair, I imprinted on using ANSI C on an Archimedes 310 with no hard disk where compiling would involve manually swapping 3.5” disks so this all feels like gravy...

* The first compile is actually also around 1.4s on the Pi then subsequent attempts come down to .7s, on iSH it’s more or less constant.


I've been interested in RPis for a while, but I travel a bit and it's a huge hassle to onboard to a new wifi network. This is great, does it work for other RPis besides Zero?

What I would love is to do the RPi wifi configuration wirelessly, perhaps through bluetooth on my phone.


Gadget mode is limited to Raspberry Pi 0, 0W, A, A+, and 4.

> What I would love is to do the RPi wifi configuration wirelessly, perhaps through bluetooth on my phone.

As I understand it, this is what BerryLan does.


If you just need a way to define the wireless network ssid and password then drop a wpa_supplicant file in the boot partition. As described at https://www.raspberrypi.org/documentation/configuration/wire...

If you need a static ip or something else more complicated then this will fall short.


Are the OSs compatible between Zero and 3/4 Pi's? Maybe you could set up everything needed on a headed Pi and then pull its SD and slap it into the Zero, no funny phone apps.


You may be interested in http://www.berrylan.org/ - I only found it today so haven't tested it but it does seem to be an interesting solution to the wifi problem you have stated.


I've been doing something similar (https://github.com/craigjperry2/pipad) but i found the PiZero-W just too slow. The 15 min load average was 3+ when doing something simple like creating a new react app.

I switched to a Pi 3B+ for now but i have my eye on the 4 precisely for the ethernet over usb idea, although the 3b+ is capable enough for my needs for now.


What’s the case in the picture?


Author here. Yep, official case. There is a lid variant with a camera hole as well as one with the GPIO pins exposed, too, which I'll switch between.


I think it's the official Zero W case with the non-camera cover.


Pretty sure its the official one.


It would be better with a UPS. Maybe a LCD screen too. And a speaker, and a microphone.

Maybe a camera too? Then we could even call it a "cellphone".

Joke aside, any rooted cellphone works much better to run a normal linux distribution. Become familiar with bootstrapping and crosscompiling.


So it works "much better" despite being more expensive if you need to buy one and apparently harder to use (for the Raspi I can just download a Linux distro that just works)?

It's certainly interesting, but IMHO not obviously better.


Your raspberry needs a case, a SD, etc. Cost add up.

Price of a used cellphone: generally nothing, as we all have extra as spares (and family members do the same). It is self contained.

If you need a brand new one, a ulefone with 6' screen costs as little as $57 all included: https://www.banggood.com/Ulefone-Note-7-6_1-inch-Triple-Rear...

It is ready to be rooted with mediatek exploit.

You get wifi + bluetooth + cellular, a screen (always useful for debug). Spend more if you want more ram, more processing power. $80 for a IP68/IP69K one, that's good.

I just can not see how spending more on an elaborate raspberry setup, to have an overall worse solution in the end can be a better idea.


Your raspberry needs a case, a SD, etc. Cost add up.

A Pi Zero with WiFi costs about $10, case costs another $10, a name brand 32 GB SD card runs $10, and a 3.5" screen runs about $20 for a grand total of $50. A screen won't fit in the stock zero case but the zero does have a micro HDMI port.

I just can not see how spending more on an elaborate raspberry setup, to have an overall worse solution in the end can be a better idea.

Well none of that is true, so there's that. As an added bonus you don't have to exploit security vulns to get root on a Pi.


Leaving the screen aside, does the PI also has a battery and 1G of RAM?

That's what the $57 new phone has.

EDIT: it was a rhetorical question. Never mind. Keep spending on Rapsberries, while I will keep spending on waterproof devices with a battery/screen/camera that are sold as 'phones'


Leaving the screen aside, does the PI also has a battery and 1G of RAM?

Well the information is out there and freely available so I'd suggest looking it up if you're posing an earnest question.

That's what the $57 new phone has.

That $57 phone comes preloaded with an antiquated version of Android and lists for $80 (the sale ends in two days).


Most of us already have free SD cards laying around, and reading the fine article’s scenario the phone which the author already owns and carries around also doubles as the screen, so no need to buy a second phone. So I read it as costing around $20 for the base setup described.

And you don’t need to trust a sketchy flavor of a phone OS or other sketchy phone subsystems made by vendors who do not have tight controls. Unlike Pi, phones are a highly targeted device type by certain governments including governments of countries where phones are made.


Worth mentioning Termux too, which works without rooting. As such it won’t give full control over the phone, but worth sharing the knowledge that you can install a working Linux environment on Android straight from the Play Store.

I use mine to run youtube-dl to download audio only versions of YouTube (I like long interviews, talks etc), save data and can listen with screen off.


And in turn, you should know about NewPipe!


A Raspberry Pi Zero W with case and SD card is ~20€ and smaller than a smartphone. Usefulness of the additional phone features really depends on what you're doing. The Pi has features the phone doesn't (i.e. GPIOs) - but again only useful if happen to match what you need.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: