Live data from Hacker News

Raspberry Pi WLAN setup

berrylan.org

41–50 of 86 posts

Re: Raspberry Pi WLAN setup

#41
post #6

or create /boot/wpa_supplicant.conf and touch /boot/ssh and it will do the right thing on boot.

I'd like to see one addition to that. On boot, it should also write a file, /boot/MAC-address, if it does not exist. This should be a text file containing the Pi's MAC address.

With that, those whose networks require whitelisting by MAC address who are trying to set up a headless Pi could boot it once to get it to write its MAC address to the SD card, whitelist that MAC address and assign it a static IP address, create /boot/wpa_supplicant.conf, and boot again to get the Pi on their network.

Re: Raspberry Pi WLAN setup

#42

Earlier quoted context omitted.

But you can’t do that from a raspbian image, and if you want me to mod my file system post install that only works assuming I can mount it (eg I have another Linux box with keyboard). I’ve had this problem multiple times and find this approach really nice (and wish it shipped with raspbian!)

But where was the SD card flashed? I think the idea is to enable ssh right after flashing the image.

Say on a Mac or windows box.

Re: Raspberry Pi WLAN setup

#43

Earlier quoted context omitted.

But where was the SD card flashed? I think the idea is to enable ssh right after flashing the image.

Say on a Mac or windows box.

But /boot is a FAT32 partition, it's mountable on practiacally any os I'm aware of. On a mac it'll be under /Volumes/boot.

Re: Raspberry Pi WLAN setup

#44

I'm building a gift for someone else that uses a RasPi internally, and thus needed a user friendly way for them to configure its WiFi connection. It's been ... quite the adventure (mostly because I'm dumb). My first idea was to put an OLED and a rotary encoder on the box. That way they can do a special dance on the button to enter setup mode, scroll through a list of wifi networks, and then tediously scroll through l…

Raspbian defaults to being discoverable by bonjour so you can just `ssh pi@raspberrypi.local` and then modify the wifi config file (`/etc/network/interfaces`). You can script this bootstrap process pretty easily using Ansible etc. Downside is you do have to have a machine on the same ethernet network as the rpi for a short time. So fewer "cool project" points but ends up being quite simple.

Aside from the simpler method of dropping wpa_supplicant.conf in /boot as has already been said, mdns support in Android is terrible/non-existent. I've had no end of users struggling because of that, I 100% do not suggest relying on it.

Re: Raspberry Pi WLAN setup

#45
post #34

This looks very cool but you should think twice before you use it. If a hacker wanted to infiltrate your LAN, there would be no better way to do it than to provide a tool like this.

But this is just the process of connecting it to a wireless network, which would be the hacker's network? The risk seems pretty contrived?

You could make the same argument for other assisted headless installations: speakers, smart plugs, etc.

Re: Raspberry Pi WLAN setup

#46
post #9
post #6

or create /boot/wpa_supplicant.conf and touch /boot/ssh and it will do the right thing on boot.

Can you seriously put wpa_supplicant.conf in /boot and it’ll work? I have honestly never heard this in 2 years of doing Raspberry Pi, after looking at tons of documentation and web sites. This wouldn’t surprise me, but I feel like it should be much better documented, given that it’s pretty much the first and biggest hurdle to getting things to work on a new image.

Yeah, it's pretty well documented to be fair.

https://www.raspberrypi.org/documentation/configuration/wire...

Re: Raspberry Pi WLAN setup

#47
post #34

This looks very cool but you should think twice before you use it. If a hacker wanted to infiltrate your LAN, there would be no better way to do it than to provide a tool like this.

But this is just the process of connecting it to a wireless network, which would be the hacker's network? The risk seems pretty contrived? You could make the same argument for other assisted headless installations: speakers, smart plugs, etc.

> You could make the same argument for other assisted headless installations: speakers, smart plugs, etc.

That's true, but in those devices can be isolated from the internet by a firewall. Berrylan can't be, or it loses its utility. In order to talk to the app, Berrylan has to send packets to and receive packets from the internet. Also, even after the setup, most RaspPi applications entail having the computer continue to have access to the internet. So the situation is much risker with the RaspPi.

Re: Raspberry Pi WLAN setup

#48
post #41
post #6

or create /boot/wpa_supplicant.conf and touch /boot/ssh and it will do the right thing on boot.

I'd like to see one addition to that. On boot, it should also write a file, /boot/MAC-address, if it does not exist. This should be a text file containing the Pi's MAC address. With that, those whose networks require whitelisting by MAC address who are trying to set up a headless Pi could boot it once to get it to write its MAC address to the SD card, whitelist that MAC address and assign it a static IP address, crea…

I know you're talking about Someone Else's Network (tm), but isn't whitelisting MAC kind of pointless? MAC can almost always be freely set to any value.

Re: Raspberry Pi WLAN setup

#49
post #30

In a previous company we built a Bluetooth Low Energy server app into the embedded Raspberry Pi-like system. Long story short: 1. RPi broadcasts via BLE the wifi networks it can see 2. A ReactNative App lets the user choose the wifi network to connect to, pre-selected is the wifi network which the mobile is connected to 3. User enters wifi password 4. App sends it to RPI, still via BLE 5. RPi responds with IP address…

Hmm, using BLE to send your WPA2-PSK password? Isn't that insecure?

Re: Raspberry Pi WLAN setup

#50
post #47

Earlier quoted context omitted.

But this is just the process of connecting it to a wireless network, which would be the hacker's network? The risk seems pretty contrived? You could make the same argument for other assisted headless installations: speakers, smart plugs, etc.

> You could make the same argument for other assisted headless installations: speakers, smart plugs, etc. That's true, but in those devices can be isolated from the internet by a firewall. Berrylan can't be, or it loses its utility. In order to talk to the app, Berrylan has to send packets to and receive packets from the internet. Also, even after the setup, most RaspPi applications entail having the computer continu…

Doesn't this just work over Bluetooth for the initial config? The internet isn't useful at this point because it isn't connected to a WLAN.
Post reply on HN