News for hackers. Stuff that matters.
Re:An always-available, online-capable Raspberry Pi in your ... by rcarmo on Sunday November 03, 2019 @03:58AM (#21432852)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by banakkaffalatta on Thursday November 07, 2019 @03:23PM (#21476919)
So you just connect to the raspi Bluetooth and then you can ssh raspberrypi.local?
Re:An always-available, online-capable Raspberry Pi in your ... by ssivark on Sunday November 03, 2019 @08:54PM (#21438327)
Nice! So, how do you use this setup?
Re:An always-available, online-capable Raspberry Pi in your ... by rcarmo on Monday November 04, 2019 @02:47AM (#21439662)
I SSH or VNC into it over Bluetooth to build ARM containers, mostly.
Re:An always-available, online-capable Raspberry Pi in your ... by ansible on Saturday November 02, 2019 @10:06PM (#21431558)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by newnewpdro on Saturday November 02, 2019 @08:50PM (#21431242)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by andai on Saturday November 02, 2019 @09:33PM (#21431413)
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 :)
Re:An always-available, online-capable Raspberry Pi in your ... by newnewpdro on Sunday November 03, 2019 @12:49AM (#21432257)
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

Re:An always-available, online-capable Raspberry Pi in your ... by cylinder714 on Sunday November 03, 2019 @12:42AM (#21432231)
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/

Re:An always-available, online-capable Raspberry Pi in your ... by andai on Sunday November 03, 2019 @11:11PM (#21438980)
> 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.

Re:An always-available, online-capable Raspberry Pi in your ... by viraptor on Sunday November 03, 2019 @06:51AM (#21433345)
That looks amazing. A comeback of terminals.
Re:An always-available, online-capable Raspberry Pi in your ... by starik36 on Saturday November 02, 2019 @08:57PM (#21431280)
What are some practical uses of having an RPi W in your pocket?
Re:An always-available, online-capable Raspberry Pi in your ... by nine_k on Saturday November 02, 2019 @10:38PM (#21431723)
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

Re:An always-available, online-capable Raspberry Pi in your ... by viraptor on Sunday November 03, 2019 @06:12AM (#21433212)
You can integrate the first two points soon (SSH and u2f). See https://marc.info/?l=openssh-unix-dev&m=157259802529972&w=2
Re:An always-available, online-capable Raspberry Pi in your ... by incanus77 on Sunday November 03, 2019 @02:33AM (#21432644)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by detaro on Saturday November 02, 2019 @09:04PM (#21431298)
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).

Re:An always-available, online-capable Raspberry Pi in your ... by dTal on Saturday November 02, 2019 @09:57PM (#21431518)
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?
Re:An always-available, online-capable Raspberry Pi in your ... by nine_k on Saturday November 02, 2019 @10:21PM (#21431638)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by jjeaff on Saturday November 02, 2019 @10:49PM (#21431780)
The marketing line for the iPad pro is "like a computer. Unlike any computer"
Re:An always-available, online-capable Raspberry Pi in your ... by Semiapies on Sunday November 03, 2019 @01:05AM (#21432305)
For most of the people it's being marketed to, a computer is not a development system, either.
Re:An always-available, online-capable Raspberry Pi in your ... by dTal on Sunday November 03, 2019 @01:30PM (#21435636)
>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?

Re:An always-available, online-capable Raspberry Pi in your ... by tlrobinson on Sunday November 03, 2019 @03:07AM (#21432725)
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

Re:An always-available, online-capable Raspberry Pi in your ... by pjmlp on Sunday November 03, 2019 @04:59AM (#21433035)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by pizza on Sunday November 03, 2019 @04:53AM (#21433014)
Hackers have plenty of great options for consumption devices but a lot of the time we just need better cyberdecks.
Re:An always-available, online-capable Raspberry Pi in your ... by baddox on Saturday November 02, 2019 @10:27PM (#21431663)
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.
Re:An always-available, online-capable Raspberry Pi in your ... by jjeaff on Saturday November 02, 2019 @10:33PM (#21431691)
Your expensive new car and new TV probably aren't being marketed as a replacement for your PC.
Re:An always-available, online-capable Raspberry Pi in your ... by baddox on Sunday November 03, 2019 @01:52AM (#21432412)
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.
Re:An always-available, online-capable Raspberry Pi in your ... by dTal on Sunday November 03, 2019 @01:21PM (#21435565)
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?
Re:An always-available, online-capable Raspberry Pi in your ... by pjmlp on Sunday November 03, 2019 @05:01AM (#21433043)
Large majority of computer users are neither UNIX users, nor UNIX developers.

For them the iPad is indeed a replacement.

Re:An always-available, online-capable Raspberry Pi in your ... by schappim on Saturday November 02, 2019 @10:45PM (#21431763)
Well it's "like a computer unlike any computer"...
Re:An always-available, online-capable Raspberry Pi in your ... by helpPeople on Saturday November 02, 2019 @11:09PM (#21431861)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by djbeadle on Saturday November 02, 2019 @09:40PM (#21431448)
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!

Re:An always-available, online-capable Raspberry Pi in your ... by nereye on Sunday November 03, 2019 @01:03AM (#21432447)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by oefrha on Sunday November 03, 2019 @03:44AM (#21432820)
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.
Re:An always-available, online-capable Raspberry Pi in your ... by nereye on Sunday November 03, 2019 @08:39AM (#21433804)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by bravura on Saturday November 02, 2019 @10:11PM (#21431581)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by kingosticks on Saturday November 02, 2019 @10:30PM (#21431678)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by kingosticks on Sunday November 03, 2019 @10:18AM (#21434326)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by imglorp on Sunday November 03, 2019 @09:33AM (#21434055)
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.
Re:An always-available, online-capable Raspberry Pi in your ... by colinramsay on Sunday November 03, 2019 @06:25AM (#21433261)
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.
Re:An always-available, online-capable Raspberry Pi in your ... by CraigJPerry on Sunday November 03, 2019 @06:32AM (#21433283)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by hinkley on Saturday November 02, 2019 @08:23PM (#21431110)
What’s the case in the picture?
Re:An always-available, online-capable Raspberry Pi in your ... by incanus77 on Sunday November 03, 2019 @02:34AM (#21432647)
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.
Re:An always-available, online-capable Raspberry Pi in your ... by akeck on Saturday November 02, 2019 @08:37PM (#21431184)
I think it's the official Zero W case with the non-camera cover.
Re:An always-available, online-capable Raspberry Pi in your ... by apfsx on Saturday November 02, 2019 @08:42PM (#21431199)
Pretty sure its the official one.
Re:An always-available, online-capable Raspberry Pi in your ... by 1996 on Saturday November 02, 2019 @08:51PM (#21431256)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by detaro on Saturday November 02, 2019 @08:54PM (#21431263)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by 1996 on Saturday November 02, 2019 @09:33PM (#21431412)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by inferiorhuman on Saturday November 02, 2019 @09:45PM (#21431468)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by 1996 on Saturday November 02, 2019 @09:47PM (#21431480)
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'

Re:An always-available, online-capable Raspberry Pi in your ... by inferiorhuman on Saturday November 02, 2019 @09:50PM (#21431492)
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).

Re:An always-available, online-capable Raspberry Pi in your ... by natch on Saturday November 02, 2019 @10:33PM (#21431696)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by andai on Saturday November 02, 2019 @09:37PM (#21431435)
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.

Re:An always-available, online-capable Raspberry Pi in your ... by ta999999171 on Sunday November 03, 2019 @01:02AM (#21432297)
And in turn, you should know about NewPipe!
Re:An always-available, online-capable Raspberry Pi in your ... by detaro on Saturday November 02, 2019 @09:41PM (#21431454)
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.