wifi-connect on Raspberry Pi Zero W not working?

Hi,
I downloaded the Dockerfile.template and scripts/start.sh from here: GitHub - balena-os/wifi-connect: Easy WiFi setup for Linux devices from your mobile phone or laptop
Then I created a new fleet, pushed these two files, downloaded the .img.zip, used balena preload to merge the application into the image, and flashed it.

Unfortunately, nothing happens. After 1-2 minutes, the RPI starts the 4-times-flashing mode. No Hotspot is shown.

I’ve used just the plain Raspberry Pi Zero W (with onboard WiFi), but also an Edimax adapter.
Nothing.

I’ve set now the persistentLogging to true in config.json.
Here’s my Log output:
journal.txt (82.0 KB)

I don’t find anything helpful … Just error message that supervisor container cannot be found?!?

Thanks a lot
Fritz

Btw: it’s the Raspberry Pi Zero W V1.1 (2016)

I have added now an ethernet adapter, now the device is online but shows this:
image
Is the Zero W supported at all?

Thanks

Hi,
anyone? Is onboard WiFi on Raspberry Pi Zero W supported at all?
Thanks

Hi,

I just tried with a local build on my Zero W 1.1 and can confirm that Wifi-Connect worked for me.
To do this, I first configured the WiFi to properly connect and provision the device.
Then I switched to local mode and pushed a wifi-connect image to the device.
At this point, it will run wifi-connect but say it’s already connected.
Finally I removed the initial wifi configuration, rebooted and saw it properly come up.

Judging from your logfile, it looks like your device is stuck in the provisioning stage because it can’t connect to the cloud.

I’m now retracing your steps to see if I can make it fail here as well and will then see if I can make it work.

Hi,
here are exact the steps I did:

  1. Created new fleet named “wifi-connect”
  2. Downloaded Raspbery Pi Zero W image (no WiFi configuration entered)
  3. Unzipped
  4. Pushed the following files to balena remote:
    Dockerfile.template.txt (304 Bytes)
    main.js.txt (88 Bytes)
    start.sh.txt (302 Bytes)
    (remove additional extensions)
  • folder wifi-connect with executable wifi-connect and subfolder ui
  1. Injected application into image using
balena preload balena-cloud-wifi-connect-raspberry-pi-2.83.21+rev1-v12.10.3.img --fleet 1881451 --commit latest --debug
  1. Flashed image using Etcher

After around 3 minutes, RPi Zero W v1.1 starts flashing 4 times but no WiFi is created.

I think it would be easy to reproduce with these step.
Thanks for any further support!
Cheers

I’ve tried your approach and hit the same snag.

What worked for me was to explicitly configure the device with my fleet (“Sandbox”).

$ balena device register Sandbox
Registering to Sandbox: c64aced6ab50467bb98e64e99cbeace4

$ unzip balena-cloud-Sandbox-raspberry-pi-2.83.21+rev1-dev-v12.10.3.img.zip
$ balena os configure balena-cloud-Sandbox-raspberry-pi-2.83.21+rev1-dev-v12.10.3.img --device c64aced6ab50467bb98e64e99cbeace4 --config-network ethernet
$ balena preload balena-cloud-Sandbox-raspberry-pi-2.83.21+rev1-dev-v12.10.3.img --fleet Sandbox --commit current
$ balena os initialize balena-cloud-Sandbox-raspberry-pi-2.83.21+rev1-dev-v12.10.3.img --drive /dev/mmcblk0 --type raspberry-pi

So, by preregistering the device and adding it’s UUID to config.json wifi-connect started to work?
Or how can I understand?
Thanks

That’s what it looks like.

Note that if I understand correctly, this is not specific to wifi-connect, but rather to balena-supervisor.

I think it should also be possible to get it working in local mode from the very start.

Just tried local mode and that seems to work properly as well.

$ unzip balena-cloud-Sandbox-raspberry-pi-2.83.21+rev1-dev-v12.10.3.img.zip
$ balena local configure balena-cloud-Sandbox-raspberry-pi-2.83.21+rev1-dev-v12.10.3.img
$ balena preload balena-cloud-Sandbox-raspberry-pi-2.83.21+rev1-dev-v12.10.3.img --fleet Sandbox --commit current
$ balena balena os initialize balena-cloud-Sandbox-raspberry-pi-2.83.21+rev1-dev-v12.10.3.img --drive /dev/mmcblk0 --type raspberry-pi

I’m using os initialize rather than local flash here, because the latter command is kinda broken for me.

Hi,
still struggling. After booting the device with LAN, device shows up in dashboard, so it’s registered as well as config.json has its UUID.
After detaching from LAN and rebooting – nothing.

Interestingly the same setup works flawlessly on a RPI3B+ for me.
Starting to think that maybe this Zero W has a WiFi issue…

Still investigating…

Intermediate result:
I might have the wrong binary for wifi-connect as I just found that it creates a core dump file and writing

Illegal instruction (core dumped)

when executing on the container when connected via LAN…
My bad, will try to find the right binary and give it a retry…

Hi,
now I’m using the correct binary. But I’m getting the following error message when running wifi-connect:

Error: Cannot find a WiFi device

Any idea on what might be the issue that RPi is not finding a WiFi device?
Thanks

It’s probably worth checking with a Raspbian image to make sure WiFi is definitely functional on that unit.

Hi,
Jesus!! It really was this single unit that was faulty. Swapped the SD card into a different Raspi Zero W unit and now it works.
NEVER EVER expected that I have to work with a defective HW unit… aaaaaarrrhggghhhghghg!!

Thanks for all of your support!
Cheers,
Fritz

1 Like

Glad to hear its working now!

1 Like