Custom ResinOS Image - Intel Edison - No WiFi

I’ve built a ResinOS Image from scratch using the instructions provided here (https://github.com/resin-os/resin-edison). I am able to build it, and flash my board with it using the flashall.sh script. I am also able to connect to the board via serial port and login as root. However, I am not able to connect to WiFi.

I am using Resin OS 2.0.0-rc3

When I am booting up I get the following error:
[ 11.540360] bash[669]: cp: cannot stat '/mnt/boot/system-connections/': No such file or directory

ifconfig shows the interface is available:

docker0   Link encap:Ethernet  HWaddr 02:42:16:D5:56:AA  
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:482 errors:0 dropped:0 overruns:0 frame:0
          TX packets:482 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:30178 (29.4 KiB)  TX bytes:30178 (29.4 KiB)

usb0      Link encap:Ethernet  HWaddr 02:00:86:10:C3:11  
          inet6 addr: fe80::86ff:fe10:c311/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:3282 (3.2 KiB)

wlan0     Link encap:Ethernet  HWaddr 90:B6:86:12:37:5D  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

and this is the output of nmcli dev:

DEVICE   TYPE      STATE         CONNECTION 
usb0     ethernet  disconnected  --         
wlan0    wifi      disconnected  --         
docker0  bridge    unmanaged     --         
sit0     iptunnel  unmanaged     --         
lo       loopback  unmanaged     --  

I know that wlan0 is working since when I do nmcli dev wifi list I get a list of all the available WiFi networks around me. I’ve tried setting up a connection manually, but I keep getting an error:

~# nmcli con add con-name 'aalto open' type wifi ssid 'aalto open' ifname "*"
Connection 'aalto open' (670d9b03-681e-4baa-84dd-a356e1d32e75) successfully added.

~# nmcli con up 'aalto open'
Error: Connection activation failed: Active connection removed before it was initialized

~# nmcli con up 'aalto open' ifname wlan0
Error: device 'wlan0' not compatible with connection 'aalto open':Invalid device MAC address..

Is there another way to set up this wifi connection? I’ve tried also modifying the meta-resin/meta-resin-common/recipes-connectivity/networkmanager/files/resin-sample to include my wireless connection and then re-built. But still I get the same error that cannot stat /mnt/boot/system-connections:

[connection]
id=aalto open
type=wifi

[wifi]
mode=infrastructure
ssid=aalto open

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

Can anyone shed some light on this?

Thanks!

EDIT: I’ve also tried downloading the configuration file from resin.io and injecting into the image. The problem is that in the case of Edison the image isn’t a single img file, but a folder full of other images and files.

Hi Daniel.
The edison now needs an update which should land today. If only github wouldn’t be in a major outage …
So we should release 2.0.4+rev2 once we have it ready but for your purposes you do not need this release which is pending, you can use the already existing 2.0.4+rev1 release.

Until then, you should be able to build 2.0.4+rev1 on your side. Don’t build that old rc3 version you are using now.

After the build is done, before using the flashall.sh script, you should embed the network manager config file you pasted above in the tmp/deploy/images/edison/resin-edison/resin-image-edison.hddimg image.

Mount the image file:
$ sudo mount resin-image-edison.hddimg

$ mkdir /system-connections

$ cp /system-connections/

$ sudo umount

If you want to use it with resin you also need to copy a config.json configured for resin.io in before you unmount it.

Hope this helps

Thanks Florin!

That worked great :grin:.

Is the WiFi config something that changed from 1.24.1 to 2.0.4? Because I see that in the older version the WiFi config was actually inside the config.json, but in the newer version it is in the system-connections, as you mentioned.

...
"files":{"network/settings":"[global]\nOfflineMode=false\nTimeUpdates=manual\n\n[WiFi]\nEnable=true\nTethering=false\n\n[Wired]\nEnable=true\nTethering=false\n\n[Bluetooth]\nEnable=true\nTethering=false",
"network/network.config":"[service_home_ethernet]\nType = ethernet\nNameservers = 8.8.8.8,8.8.4.4\n\n[service_home_wifi]\nHidden = true\nType = wifi\nName = aalto open\nNameservers = 8.8.8.8,8.8.4.4"},
"connectivity":"connman",
"wifiSsid":"aalto open"
...

Yes, the wifi in resinOS 1.x is provided by conman, while in 2.x we’ve switched to NetworkManager, which brings a lot of benefits, but changes networking. See some more in the resinOS 2.0 announcement blogpost (mostly the Networking, and the Compatibility & Migration section should be relevant).

The new with NetworkManager means that you can have as many wifi networks set up in your system-connections section as you’d like, and the device can use any of them that are available at their location. :wifi:

1 Like