can't access balena OS via esp_wifi_repeater

hi, i’m running balena OS on a raspberry pi zero wifi. if it connects to a regular router, all is well. if i connect via an esp_wifi_repeater, which is an ESP8266 running as a repeater, it does not work. nothing else on our network is affected other than balena. a raspberry pi running buster works just fine. does anyone have any ideas? this is part of our IoT network and as such a problem. also logged on github at https://github.com/martin-ger/esp_wifi_repeater/issues/377.

Hi,

We are using NetworkManager/wpa_supplicant for managing the WiFi connections. This is a standard combination for most Linux distributions. It is hard to say what could be possibly causing this issue for you without logs from the device.

Debugging the RPi Zero W wireless problems is difficult if you are not connected to the device in some other way. Usually the easiest way for doing so is either by USB to TTL Serial Cable or a USB to Ethernet adapter. The way the serial cable is used is by connecting it to the gpios of the RPi and then to your laptop on the other side. This way you will have direct terminal access to the device from your laptop without needed to rely on any network connectivity to retrieve logs from the device. Do you have one of those type of adapters and if not is it possible to get one so that you may extract logs from the device?

Alternatively the RPi 3 B (not B+) has the same WiFi chip (BCM43438) and it is easier to debug this there as it has an Ethernet port which you may use for connecting to the device and looking into the logs. Do you have a 3 B model available that you may test with?

Thanks,
Zahari

hi Zahari, thanks for responding. we’re using only the zero, so we should be able to connect to it using a USB cable – we’ve done that with the linux Jessie distro. is there a config.txt file for your OS that i should modify? note that i can connect to the device as long as it’s connected to the regular router (like now, such as linksys or dlink), so i can (1) make the change, then (2) connect it to my laptop, (3) change the router to the esp_wifi_repeater running on an ESP8266, (4) monitor activity or run any other tests that you recommend.

i can also run any tests that output to a log file, then substitute the normal router with the ESP8266/esp_wifi_repeater, then change back to the normal router and check the logs.

esp_wifi_repeater seems to have some monitoring features, i will try them out, too. it must be something fairly simple.

please advise. change the config.txt file? any logging scripts that you can share?

thanks!

esp_wifi_repeater

balenaOS

hi Zahari, also, the the device running balena blinks three short + one long when it isn’t able to connect. i’m not able to connect to it directly using balena ssh from my laptop either. can i use putty? i know the device’s IP address as i can see it on the log screen of the ESP8266 running esp_wifi_router. thanks, mahesh

Hi Mahesh,

The first thing is to download a .dev image of balenaOS (not a .prod one). There is a checkbox for this when you are downloading an image from the dashboard. You may search in the forums here for similar topics about using the USB serial cable on a RPi.

After you have successfully logged in to the device, you may scan for networks with nmcli d wifi rescan and then nmcli d wifi. You may connect to a certain network with nmcli d wifi connect <NETWORK> password <PASSWORD>.

If the device cannot connect to a network, you may take NetworkManager logs with journalctl -u NetworkManager and paste them here.

Here is the link with our networking user documentation: https://www.balena.io/docs/reference/OS/network/2.x/

Please let us know if you have any further questions.

Thanks,
Zahari

thanks; what is the configuration for enabling a serial terminal? do you have a link? best, mahesh

If you’re running the dev image, and have an IP address of the device - ssh -l root -p 22222 {IP address} will drop you into a shell

from memory, you should be able to get a serial UART on the Zero W by default, I think

ok, i’ll try it out. thanks.

hi, i have a workaround. instead of using the ESP8266 repeater, i’m now using the repeater for the ESP32 by the same author. it works well.

hi, how do i close this issue?

Hello, I’ll close it for you now. Glad you got things working.