Raspberry pi 1 and usb wifi

Hi

I’ve been trying to connect Raspberry Pi 1 512 MB model to balenaCloud. For some reason device does not appear to dashboard.

Tried first with USB wifi dognle (usbid 0bda:8176, model RTL8188CUS) but that did not even got ip address. It showed message of bringing up wlan0 but I got never message about “My ip address is xxxx”. With ethernet cable IP address was found but even then device did not appear to dashboard.

Because I don’t see device in dashboard I cannot use balena cli tools. Tried also development-image but could not login with keyboard. Isn’t local login credentials username root and password is left empty?

Do you have any ideas how to debug?

Reason for using old Raspberry pi is that I’d like to use that for learning balenaCloud so I can use my never version to something more useful.

Hi @launila, welcome to balena! If you have a development OS and you know the devices IP address you can get into the OS using ssh root@<deviceIP> -p22222 … The other option is if you have a serial console cable you can access that on .dev builds.

Once you are in the OS can you post the OS journal logs from journalctl --no-pager

Hi @shaunmulligan

Thanks for your answer. I cannot connect: ssh root@my.raspberrypi.ip -p22222
ssh: connect to host my.raspberrypi.ip port 22222: Connection refused

And for port 22: ssh root@my.raspberrypi.ip -p22
What’s password?

And I’m sure that I wrote dev image to sd card. Also that ip is right because it is only device which my modem shows with host name “raspberrypi”.

Any more ideas?

EDIT: Changing card helped a lot. For some reason it booted fine with broken card and did not show any errors in hdmi console. Now it is connected to cloud. But thanks for your help, now I know how to connect with ssh.

Hi @launila , how did you set the devices hostname to raspberrypi ? by default the balenaOS will either have a UUID host name something like 24e9237.local or one can over ride that by setting it in the config.json (did you do this?).

If you didn’t change the hostname, then it sounds like you might not have balenaOS flashed on to the SD card. Also one other thing to note is that balenaOS doesn’t have anything listening on port 22, so is you do ssh root@my.raspberrypi.ip -p22 on a balenaOS device it will not let you connect at all.

The ssh daemon on the OS is only listening on port 22222. So my best guess at the moment is that you might not have balena OS on your RPI. Can you pull out the SD card and plug it into your laptop and check if it auto mounts a partition called resin-boot. If it code can you paste the contents of device-type.json file from that partion here?

Hi

Maybe the card is broken and shows some old partition table. Computer showed boot partition on the card. But changing card really helped a lot.

I could try some other day by deleting all partitions manually and then write image to card.

Hi,

Then usb wifi. When ethernet was connected I checked that ifconfig did not show wlan0 device. Now I rebooted raspberry pi without ethernet and it does not connect to my router. How could I debug that?

@launila sorry for the slow response. Did you configure the wifi when you downloaded the OS image from the balenaCloud Dashboard ? or did you configure it via the SD card as described here https://www.balena.io/docs/reference/OS/network/2.x/#wifi-setup ?

No problem, I did not have time to play with these for few days. I configured it when downloaded image. But thanks for that linki I’ll learn also that method for future use.

Great. let us know if you get stuck

Hi

It seems that Raspberry pi usb wifi is not connecting to my WLAN. I checked ssid and psk from sd card boot partition and them were just right ones.

There is already software that were downloaded via ethernet. How could I debug wifi? Problem is that I cannot run any commands to check wifi status when this system is not connected to network.

Hmm, does Balena connect also wifi if ethernet is connected?

EDIT: Did some checking via ethernet

# ls /lib/modules/4.14.98/kernel/drivers/net/wireless/realtek/
rtl818x  rtl8xxxu
ls /lib/modules/4.14.98/kernel/drivers/net/wireless/realtek/rtl818x/
rtl8187
# lsusb
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

Is the driver missing from BalenaOS?

What dongle are you using? Our supported dongles are listed in our documentation: https://www.balena.io/docs/reference/hardware/wifi-dongles/#known-working-devices

If you connect the ethernet cable, and the device connect to the dashboard, you can also see connect to the host OS, and the output of iwconfig (to see what interfaces have possible wifi connectivit), nmcli c (listing the connections, and their status), and possibly the output of journalctl -a -u NetworkManager --no-pager for logs.

The OS should try to connect both ethernet and wifi, so it doesn’t stop either just because there’s a connection already.

Thank you for your help.

From NetworkManager logs I did not find any help, no mentions about wlan0. iwconfig does not show wlan0 device at all. And nmcli shows shows only next line for wifi:

resin-wifi-01       a58e405d-fdc2-3649-9339-5bbaea740c76  wifi      --

Cannot find the USB WIFI dongle package, I had it here few weeks ago… But that known devices had link to this site: https://elinux.org/RPi_USB_Wi-Fi_Adapters

There same USB ID 0bda:8176 references to this information
Realtek
* RTL8188CUS USB-ID 0bda:8176, kernel oops in dmesg and freeze when pulled from USB. (B)

Before I used same dongle in raspbian, and there I notived that hot(un)plug is causing problems.

Ok, maybe I use this device with erhernet cable. The only display with HDMI is my TV but there is no ethernet sockets, so I’ll have to use long cable everytime I test with screen.

Yeah, not all dongles listed on that elinux link are supported by balenaOS, the ones we support and test are linked in our documentation at https://www.balena.io/docs/reference/hardware/wifi-dongles/#known-working-devices

It’s actually interesting, we have had requests for dongles with those wifi chipsets recently, and indeed very much seems so that it’s not supported as of now. There’s an issue opened for support on github, where you can follow the development:

Unsure when support would happen, but our team is looking at it.