PSA: HassOS does not use the SD card for wifi settings or authorized_keys. [UPDATE: Now it can!]

Hi,

Is there any way to disable Wifi in Hassos post install? i had originally used Wifi to connect to my Pi to my network but have since connected it to wired and would like to disable the wifi if possible.

Thanks,

I assume you have a few choices. How did you set up the wifi and Ethernet? I have a separate file for each one, so removing the wifi file and reloading nmcli would be the way for me.

Is there some feasible way for verifying that the USB-stick containing my network config is properly seen by the host?

I have tried to get the network config setup working with these instructions, but no luck so far. I have formatted the USB stick to both FAT32 and NTFS and tried to change the encoding and linebreaks of the config file to various settings, but nothing seems to make difference. I’m wondering if the USB-stick is mounted properly during the boot and if there is a way to verify that. Stick works perfectly fine on my Windows on OSX machines.

At the hassio > system page in the UI you can kind of see in the logs after clicking “import from usb”. You may need to hit refresh at the bottom of the page.

Otherwise, you can ssh on port 22222-or connect directly with keyboard/monitor-and use ‘root’ (no password), to get to the Hassio CLI. From there enter ‘login’ and you will exit the custom CLI and be in the host system.

If you go to /etc/NetworkManager/system-connections you will find your imported keyfile. If it is present then your CONFIG USB is fine.

I can see three new lines in the logs when I use UI to import network config:

18-08-06 16:13:26 INFO (MainThread) [hassio.hassos] Sync config from USB on HassOS.
18-08-06 16:13:26 INFO (MainThread) [hassio.host.services] Restart local service hassos-config.service
18-08-06 16:13:26 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.RestartUnit on /org/freedesktop/systemd1

However I don’t know if those lines equal to success or failure.

Maybe I just need to rearrange my setup temporarily to get the monitor and keyboard connected to see what is going on.

That’s why I used “kind of”, heh. You can see that it recognized the USB and then restarted the config service.

If you generate an authorized_keys file, and put THAT on the root of the USB, you can import it using “import from USB” and then use ssh instead of the keyboard/monitor. Plus, if you get in, that’s another confirmation that your USB is fine, because it has to pull in that file to the system. You don’t have to restart the system or anything else for this to work.

More info here about generating the key https://developers.home-assistant.io/docs/en/hassio_debugging.html
Ignore the part about the SD, since this is now done through the USB.

Finally got to test this and got SSH-connection to the host up and running. Seems like my wifi-issues don’t have anything to do with the USB-config. Instead my wifi-dongle probably is not supported by HassOS at the moment:

wlan0: unavailable
    "Ralink 802.11 n WLAN"
    wifi (rt2800usb), 9E:2A:A5:C4:08:CB, fw missing, hw, mtu 1500

Any good tricks to get the wlan firmware loaded so that it is not lost in the next HassOS update?

Hi @derrick1985, did you manage to disable wireless networking? if so, what did you do?

thx!

Is not about un-configuring wifi but rather disable it completely. Do you know how to do that?

thx

nmcli radio wifi off

when connected to the host OS over 22222. Or you could connect a keyboard and monitor directly to the device.

Thanks a million! :slight_smile:

I use 2 wifi networks. How to configure for both?

I can not connect to wifi tried both making config/network/my-network folder in sd and also tried usb method whatever i do im unable to connect to wifi. Its really a pain trying to get this work from last 3 days… is anythere any way i can directly edit on sd card my ssid n password.

You said you DID try directly editing SD so your question is confusing.

If you have an ethernet connection working, you can also try this method.
https://community.home-assistant.io/t/guide-connecting-pi-with-hassos-to-wifi/98768

I tried that method but i’m stuck after entering

Nmcli device wifi connect MYSSID password MYPASSWORD

it shows error: connection activation failed: (7) Secrets were required, but not provided.

Hmm, yeah I have the same issue here. It’s quite frustrating that these drivers are included in debian…

This steps are not working for me! I just follow all the steps on the guide and receive below confirmations on the log:

20-04-10 20:30:41 INFO (MainThread) [supervisor.hassos] Syncing configuration from USB with HassOS.
20-04-10 20:30:41 INFO (MainThread) [supervisor.host.services] Restart local service hassos-config.service
20-04-10 20:30:41 INFO (MainThread) [supervisor.utils.gdbus] Call org.freedesktop.systemd1.Manager.RestartUnit on /org/freedesktop/systemd1

USB with file called “authorized_keys”
No spaces or end of line for the key
Tried to generate two diferent key just in case
Tried to import from usb 20 times and reboot

All the time same error when i tried to access via ssh over port 22222
Conection Refused!

This is really frustrating… more than one week spend and not result i read all the information and guide that exist on the internet…

Any Sugesstion or idea?

Your USB is named “CONFIG” ? How is it formatted?

And what are you intending to do when you get there? There may be other solutions depending on what you want.

Hi

Thanks for your quick answer. Yes my usb is named config NTFS format see the photo below
I tried multiple times diferent days under my Raspberry and same result!

  • Conection Refusef

usb

I think you need to format it in Fat32