USB Wi-Fi not recognised when installing hassos_rpi2-2.12 on RSPI 2 B

Hi, I have been trying to connect to WIFI for a whole day now. I am coming from Hassio 0.63.3 and I was forced to upgrade since my hassio tab in the UI was giving me an error 404 not found for several months. I was connected with the same adapter and using WIFI all the time when I was running 0.63.3 with no issues.
Anyway I tried everything that I could find

1st, before first boot up

on the SD card create a CONFIG\network\my-network (file with all the necessary configuration operating-system/Documentation/network.md at fed40532c1ab55cd887adac80aec4c8c206d4076 · home-assistant/operating-system · GitHub)

2nd try with a USB flash drive with these instructions

3rd with importing them from the UI after finishing the installation with the wired ethernet connection again from this topic (PSA: HassOS does not use the SD card for wifi settings or authorized_keys. [UPDATE: Now it can!])

I tried different adapters
And lastly I connected an HDMI cable and saw this error
Direct firmware load for rt2870.bin failed with error -2
…Failed to request firmware

I am also attaching a screenshot with all the error lines

You may get that screenshot as plain text from your journal. Which is more readable.

I didn’t have any type of connection to my RSPI, but thanks for the information

I have the exact same issue on raspberry PI 1B. I found the problem - the /lib/firmware directory is missing from the SD image so it can’t possibly work.

To resolve this I had to rebuild the image from source (may have worked with some overlayfs magic - gave up) after editing buildroot-external/configs/rpi_defconfig to add:

# Firmware
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y
BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3168=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_5000=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2A=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2B=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7260=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265D=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8000C=y
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8265=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y
BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y

Which gives support for most WIFI dongles. This results in a hassos_rpi-3.4.img.gz that is approximately 50MB larger. After writing image and waiting quite a while I have a working raspberry PI 1B with USB Wifi. Same trick should work for the Raspberry PI 2 - happy to write an image out for you if this all sounds too much for you. Not a home assistant expert though - just got started yesterday.

Any devs know if I patch the build scripts would a PR be accepted? Its quite a bit larger sure but it means people can be up and running quickly and easily and probably saves some of the older raspberrys from landfill right?

Failing that, wired Ethernet would work with no modification but then of course you need to be plugged in.

HTH
Geoff

Thank you so much for the reply, which makes me happy that this would potentially resolve my problem and not make me buy a newer raspberry, or make me use a long LAN cable. I can’t understand why the developers didn’t have the firmware included since in release 0.63 when it clearly worked then. The older devices like my Raspberry Pi 2B+ are still capable of running home assistant but as I can see they are considered old and will be used “just for testing purposes”.

Anyway I will be grateful if you could make an image, or give me detailed pointers where to get the firmware and how to rebuild the image, which ever one is easier for you, but if I can learn how did you do it that would be awesome.

I think its probably just an oversight - there’s always the pressure to throw out the old and slow for fast and shiny :wink:

PR created: https://github.com/home-assistant/hassos/pull/467

I’m using github to host my own hotfix release as a place to host the files: https://github.com/declarativesystems/hassos/releases/tag/3.4%2Blinux-firmware_rpi

If you burn a copy as usual it should just work, along with the network config on a usb thing-o.

LMK if it works. Hopefully this makes it into an official release

Cheers,
Geoff

It doesn’t seem to want to boot. I downloaded hassos_rpi2-3.4+linux-firmware_rpi.img.gz flashed and verified the image and plugged it in. The RPi 2 detects the SD but nothing happens the act LED flashes for a brief moment then stays off there is a HDMI signal but just black and even with ethernet cable plugged in no link is displayed.

oh interesting - I wonder if I’m supposed to do a make clean between builds… I’ll give this a go should have another one for you to try soon

BTW on my Raspberry 1B HDMI out stays blank if I plug it in after booting - seem to need it plugged in before powering on to get any picture :man_shrugging:

I tried it many different ways and also with the Pi off plugged in the HDMI, WIFI dongle, ethernet and then the power but it just detects that it has signal and nothing happens

Ok I’ve rebuilt the image and now its a different size - guessing make clean really is required between platform builds. New image file uploaded to https://github.com/declarativesystems/hassos/releases/tag/3.4%2Blinux-firmware_rpi

MD5 sum: 6ef5977b7a7a3f8949ae6bfc10fd18f9
hassos_rpi2-3.4+linux-firmware_rpi_v2.img.gz

I tested this on a Raspberry pi 2 with USB WIFI and it appeared on the network and after about 20 minutes gave the login screen

1 Like

Yes thank you. This time it worked like a charm. Up and running on WIFI with the configuration added before the first boot directly on the SD card without the need of USB flash drive.

Hope that developers note the effort and add it to the next release.

1 Like

Awesome! hope it gets accepted, thanks for verifying

Thanks man!

This drove me crazy yesterday.
I’ll remove my 15m eth cable now :slight_smile:

I guess it never got accepted ?

was not accepted, PR closed automatically

btw @geoff your image never booted on my pi2. As it was an older version anyway i’m compiling the last one.

Took me a while to get it right, so for anyone needing this, here’s what i did :

  • use a linux machine (not a mac)
  • the github is here : https://github.com/home-assistant/operating-system/
  • build the docker image with the build env with $ docker built . -t hassiobuilder
  • make the changes in the config files as geoff explained earlier
  • build for your target using the following (i made a buildrpi2.sh file, but you can just replace your id/gid and use the docker line directly)
  • expect it to take a while (i’m close to 3hours here and it’s not over yet)
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"

docker run --rm --privileged -v "$(pwd):/build" \
  -e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
  -v "/tmp/build-cache:/cache" \
  hassiobuilder make rpi2

change rpi2 for your target platform (rpi for the rpi1)

1 Like

I have an rpi2b and was able to get everything up and running using the image that @geoff provided. Here were my steps:

  • Remove all USB dongles from the pi
  • connect ethernet, HDMI and power
  • Flash an SD card with raspbian, boot up the pi, do an update to get the latest firmware etc.
  • Flash an SD card with the image that @geoff provided, boot up the pi
  • Go to homeassistant.local, see if option is available to update to 6.5. If not, reboot. Then update.
  • Once 6.5 is updated and running, power down the pi, install wifi dongle
  • Power up the pi
  • enable advanced mode in your profile
  • install the SSH & Web Terminal add-on (community supported)
  • disable protection mode
  • Make sure to set a strong password in the config for the add-on or else it won’t start up. Check the logs tab to make sure.
  • startup may take a while because it will generate an RSA key automatically
  • open the web CLI
  • confirm wlan0 exists using nmcli dev status
  • if it doesn’t exist, reboot again
  • once wlan0 exists, connect to your wifi using https://www.makeuseof.com/connect-to-wifi-with-nmcli/
  • reboot, confirm that wlan0 is now connected to your wifi
  • disconnect the ethernet, you are now good to go

The WiFi dongle I used was the CanaKit 150mpbs 802.11n/g/b mini USB adapter.

I tried and tried to use the USB network configuration file method, but it didn’t take. nmcli was a breeze. I hope this helps someone.

1 Like