Jump to content

Wireless setup tool for headless systems


T-mon

Recommended Posts

Hey,

we made a tool that allows us to configure the wireless connection of a headless systems using just a smartphone. The reason was that we often ended up in situations where we prepared a headless system with our full stack (see https://nymea.io) and handed it over to someone else to just it in their WLAN. The target group are end users which are not able to use a console.

In an attempt to return something to the community we've created a standalone tool for this to share it with others, BerryLan. At the moment it requires to add the nymeas debian repository and install nymea-networkmanager. You can find all the details about it on https://berrylan.app.


It was originally designed for the Raspberry Pi, but it works with any other debian based system too. The device must have a wireless adapter and a Bluetooth LE adapter. The daemon works with network-manager and bluez.
The source code of the daemon can be found here: https://github.com/guh/nymea-networkmanager

By default, this will open up a Bluetooth LE server on the device which allows to connect with the BerryLan app whenever there is no other network connection. As soon as the device is connected to a network (either LAN or WLAN), the Bluetooth server will shut down. This behavior can also be configured to e.g. only allow configuring a network once and then never open up again.

We'd be happy for any feedback, please let us know about issues you find. Also we'd love to know if you find this tool useful and if it'd be worth going through the efforts of trying to get it included in the Debian archive.

Enjoy, and please do let us know what you think about it!

Cheers,
Simon

Link to comment
Share on other sites

I tried this on a raspberrypi B+ yesterday. It works a treat :-) I have a couple of questions:

 

I also tried this on a Raspberrypi zero w and it doesn't work. Do you have plans to also make it work for the raspberrypi zero ?

 

Can it be locked into a particular iPhone or will a reboot make it susceptible to hijack from others?

 

Kim

 

Link to comment
Share on other sites

Hi Kim!

 

glad to hear that it worked for you! We don't support the Raspberry Pi zero w yet, because of the armv6 architecture. But that device is a perfect use case for our little side project. I'll investigate on how much effort it will be to provide a armel solution and will come back to you asap!
 

Quote

Can it be locked into a particular iPhone or will a reboot make it susceptible to hijack from others?

 

No, it can't be locked down to a particular phone at this point. Currently the wireless setup is enabled whenever the device is not connected to a network. This means, just rebooting it does not allow hijacking it if the wireless setup has been done before. However, if an attacker manages to disconnect the wireless connection he might be able to open up the server again. We have a solution for that, but not implemented yet.

We will continue with development and spend more time for the tool since it got some interest now :-)

 

Cheers,
Simon

Link to comment
Share on other sites

On 10/22/2018 at 2:48 AM, T-mon said:

glad to hear that it worked for you! We don't support the Raspberry Pi zero w yet, because of the armv6 architecture. But that device is a perfect use case for our little side project. I'll investigate on how much effort it will be to provide a armel solution and will come back to you asap!

 

FWIW - Pi Zero W is the same as all other Pi's when running Raspbian - while is armv6, it is armhf - so if your code runs on Pi3, should run on Pi Zero W if you do it right as they have the exact same WiFI-BT chip...

 

Pi3B+ might be a bit different, as it uses a slightly newer Broadcom WiFi/BT device, but if you're not too close to things, same code should work for it.

 

This might help... Don't need an app - just a browser... they're trying to solve the same problem..

 

https://github.com/schollz/raspberry-pi-turnkey

 

Part of your challenge - once past the Pi ecosystem - there are many different WiFi and BT solutions in the SBC space - some work ok, and some have significant challenges... but most of them, BT is likely not the priority over working WiFi...

 

Here's similar code for ESP8266 in it's Arduino personality...  The ESP8266 is very popular in the IoT space

 

https://github.com/tzapu/WiFiManager

 

Enjoy!

Link to comment
Share on other sites

@sfx2000, how I see it, is one of the key-feature of  BerryLan  that it runs over Bluetooth and so comes with a short range and it is only looking for this App on the mobile = more secure. Whereas 'your solution' presents an open Access-Point. Maybe okay on a farm, but in the city not recommended.

 

The daemon works with network-manager and bluez.

 

Link to comment
Share on other sites

14 hours ago, Tido said:

one of the key-feature of  BerryLan  that it runs over Bluetooth

 

That is your key feature - the Bluetooth aspect... assuming that the IoT device has BT in the first place...

 

Not all do... in any case - the "solutions" I pointed out - nothing says it has to be an openAP - there's a number of ways to pre-provision a secure and random PW, and go from there... and to the end user, present a QR code that is printed on the device that they can scan with your app...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines