Resin-wifi-connect 2.0.x release

The new version of resin-wifi-connect has been released with support for both Connman (resinOS 1.x) and NetworkManager (resinOS 2.x) from the same code, thus giving a migration path from resinOS 1.x to 2.x for your application!

We have written a detailed blog on how it works and how to include it in your projects!

Happy xmas!

2 Likes

Cheers, @joe! :smiley:
It is coupled with an example project too, to show the integration in practice!

It’s pretty self-contained to make that task a bit simpler.

Here’s also the demo video taken out of the blogpost, just as a shortcut…

I’m trying to put together an actual (not example) project as well (coupling it with some kind of game server).

Have you made anything with resin-wifi-connect? Have any feedback? We are rewriting it in rust to make it more self-contained and more usable across distributions outside of resin.io as well, fancy giving a try to that later?

Super awesome! Does that mean 2.x (or really networkmanager support) in production is just over the horizon?

That’s a pretty reasonable inference, @mtwomey :slight_smile: We are doing a lot of internal preparation for resinOS production release.

In our internal processes we create specs for changes on the platform (such that it can be all informed change, and consider how changes affect the entire platform) The resin OS 2.x production release is just being spec’d out. Here’s sneak peek at the spec that is being worked on:

I’d say the beginning of the new year will be exciting.

Just a quick note to say that v2.0.3 was released today which adds support for the intel-edison device type :tada:

What are you using resin-wifi-connect for?

1 Like

Thanks for this release!
I’m trying to use this release with a rpi 3 using resinOS 2.x.
After saving my WIFI password I get the following error:

Saving connection
{ '802-11-wireless': { ssid: [ 70, 82, 73, 84, 90, 33, 66, 111, 120, 32, 55, 52, 57, 48 ] },
connection: { id: 'xxxxxxxxxxx', type: '802-11-wireless' },
'802-11-wireless-security':
{ 'auth-alg': 'open',
'key-mgmt': 'wpa-psk',
psk: 'xxxxxxxxxxxxxxxxx' } }
Error: org.freedesktop.NetworkManager.Settings.Failed
at Error (native)
Retrying

Do you have any idea how to fix this?
Thank you in advance!

Hi there,

  • Are you using unmanaged ResinOS or managed ResinOS?
  • Are your device and application both rpi3?
  • What type of network are you trying to connect to?
  • Can you share the SSID of the network you’re trying to connect to? - pm me if you would prefer.

Thanks

Hi Joe,
Thanks for your reply.

The problem occurred with the UNmanaged version (Resin OS 2.0.0-beta.1 ) using resin/raspberrypi3-node:6 as base image. Yesterday I tried the managed version of resinOS (Resin OS 1.24.1) and with this wifi setup is working.

The SSID is FRITZ!Box 7490, it’s WPA2 2.4GHz network.

Seems like it’s a problem with the NetworkManager in 2.x?

Hey,

Thanks for the info, I will try to reproduce now and get back to you!

I had to make a couple of changes to the Dockerfile (because ResinOS does not support Dockerfile templates, yet!) but it works for me, I was able to successfully connect to a hotspot named “FRITZ!Box 7490”.

Here’s what I did:

  • Downloaded this image (rpi3, resinOS 2.0.0-beta.1)
  • Unzipped it and configured the image with rdt configure
  • Flashed the image with rdt flash
  • Placed the SD card in the rpi and connected power
  • Verified the device showed up with rdt scan
  • Cloned the master branch of resin-wifi-connect
  • Modified the docker file (see below)
  • Committed the changes
  • Pushed the app with rdt push
  • Set up a hot spot on my phone called “FRITZ!Box 7490”
  • Connected to the Resin AP with a different phone and selected “FRITZ!Box 7490”, entered the password and it connected.

Dockerfile:

FROM resin/raspberrypi3-node:6 // Changed this line

ENV DEVICE_TYPE=raspberrypi3 // Changed this line

RUN apt-get update \
	&& apt-get install -y \
		dnsmasq \
		hostapd \
		iproute2 \
		iw \
		libdbus-1-dev \
		libexpat-dev \
		rfkill \
	&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /usr/src/app/

WORKDIR /usr/src/app

COPY package.json /usr/src/app/

RUN JOBS=MAX npm install --unsafe-perm --production \
	&& npm cache clean

COPY bower.json .bowerrc /usr/src/app/

RUN ./node_modules/.bin/bower --allow-root install \
	&& ./node_modules/.bin/bower --allow-root cache clean

COPY . /usr/src/app/

RUN ./node_modules/.bin/coffee -c ./src

CMD bash start

Let me know if that helps…

2 Likes

Thanks for your response! Looks everything like I did it… So I started from scratch again and now it’s fortunately working :slight_smile:
Really appreciate your help, thank you!

2 Likes