Hassio instalaltion Wifi configuration

Does line endings really matter? I watched Juan’s YouTube video (here https://www.youtube.com/watch?v=qnCRcGTznXs&t=1m40s) and he used Window Notepad with nothing else. I’ve tried everything (I think) except what actually works, which is elusive.

What doesn’t get stated is that the USB drive MUST BE formatted using (MS-DOS) FAT32 or it will not be read by Hassio. I had been trying with a USB drive formatted in EXT32 and it would not work.

Check it and see if it works for you.

Hello,

I got the same issue, google search bring me here, the config file is definitely nothing wrong with it.
Hooked my Pi to TV, and see bunch of logs, e.g:

wlan0: link is not ready

Not sure I have to set my Wifi routers to use 2.4GHz or 5Ghz, changing from WPA2 PSK to less secure WPA, but non of them works.

Any recommendation about the wifi network setting in router?
Thank you!

Having the same problem. I was:

  1. format usb with Fat32 and set label to CONFIG
  2. create a folder called “network”
  3. create a file named “hassos-wifi”

I have a question:
When can I plug the USB in to PI? at boot time or after boot-up completed?

the file name is my-network

plug before you boot the pi

You can now create a folder “CONFIG” on the boot partition instead of using a USB stick. Then, create the
folder “network”, and place the “my-network” file inside of that. It did take me a while to find the boot partition as for some reason I could only see 4 out of the 8 partitions in the file manager after using Etcher, so I manually mounted it after finding it with fdisk (it was /dev/mmcblk0p1).

/CONFIG/network/my-network

Alternatively, if you use Hassbian, create a file on the boot partition:

wpa_supplicant.conf

with the following formatting (change the country as well):

country=SE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="YOUR_SSID"
    psk="YOUR_PASSWORD"
}

The documentation has been amended to add the CONFIG directory method (which you can use for much more than just setting up WiFi)
https://github.com/cschroeter/hassos/blob/dev/Documentation/configuration.md

4 Likes

Maaaan, thank you so much! Spend endless time trying to figure out the installation via official documentation… pointless.
Your guide finally solved it! I’m super happy that it has finally worked! And indeed i needed to follow your instructions step by step, since i also used etcher under ubuntu and it didn’t auto-mount boot partition, which yielded me to do it manually.
Legend!

Thanks

1 Like

So I tried 10-12 times installing HASSIO but no luck. The wifi is not working for me.

So before I keep trying different things I have two questions.

  1. Do I have to write the file to SD card every time using Etcher after it fails to connect to Wifi?

  2. Does the red power led stays ON all the time on rPi3B+

TIA

I just did what @wutr suggested (Thanks!!), and now, after a long time of wired connection, I am on a wireless one without the USB stick.

@chils41 probably it’s better to start with a wired connection, check if all is working, then you can take out the SD card from RPi, put in a PC and do what @wutr said before.

The red led in RPi stays always on!

Hi there, thanks @wutr for the great advice.
I got soooo close! I’ve installed a dual boot of Linux on my pc so I can see what’s on the SD card but it is read only! I can see the system connections folder but can’t do a thing with it.
Please help if you can, I’m trying everything to get this Pi Zero running on WiFi (works on LAN, hass.io installed)
Thanks

I’m not sure what you mean with the “system connections folder” (is it on one of the partitions?), but if the boot partition on the SD card is already mounted, it might be as simple as remounting that partition as read+write. I don’t know the partition naming scheme for your Linux distribution, but the command would be something like this:

sudo mount -o remount,rw /dev/mmcblk0p1 /mount/point

you can find out the partition identifier and where it is currently mounted (as read-only) with this command:

mount -v | grep "^/" | awk '{print "\nPartition identifier: " $1  "\n Mountpoint: "  $3}'

(source)

If it isn’t mounted yet, you need to find the correct partition identifier manually (try sudo fdisk -l).

Firstly, thanks for the swift response. I downloaded the Hass.io operating system from here:

https://www.home-assistant.io/hassio/installation/

It’s supposed to need a USB stick named CONFIG with a folder named network and a file (e.g. my-network) with these settings in:

[connection]
id=hassos-network
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=MY_SSID
# Uncomment below if your SSID is not broadcasted
#hidden=true

[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=MY_WLAN_SECRET_KEY

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

Having tried that to no avail I thought I would attempt to add the file directly in the boot folder but it seems the Hass.io system is read only (presumably to stop people like me f@#&ing with it!).

I have reflashed the SD card again as I lost LAN connection too the 1st time round. That works again now but WiFi is the goal!

If there are any other ways to solve this or even the ways I’ve already tried but correct, I would really appreciate hearing about them.

If my info is insufficient, I’ll happily divulge all files, settings, web page sources etc, just no bank details!

Many thanks

Unless I’m reading something wrong here, you should be looking for the boot partition, not the folder. (If writing the my-network file to the SD card directly). Mounting read-only is done by certain distributions when auto mounting file systems, there’s probably a reason for it but in this case it’s fine to remount in read+write mode.

Have a go at finding the Hass.io boot partition (using fdisk), mounting it in read+write mode (which is standard if you manually mount I believe) and creating the folder CONFIG/network on that boot partition. It shouldn’t take you much over 20 minutes if you’re new to it all. You have to learn at some point, might as well be now. Double check you are working with the SD card and not a local drive and there isn’t much to go wrong.

Also, you probably already found out, but Linux and its filesystems are case-sensitive.

If you want, can you paste the output of sudo fdisk -l /dev/sdcardpointer (substitute the actual device name of the SD card of course) so someone can reply with the correct mount command.

It was the boot partition I was trying to access (there are 8 but only 4 show up, pls see screenshot)

I found them with GParted at first but thanks to your tip have used fdisk:

Screenshot%20from%202019-01-23%2019-25-35

sdc1 is visible in windows (and writeable), should I put the CONFIG/network/my-network file in there?

With regards to the uuid, should I also generate a new 1 when I flash the SD (again!)?

Your wisdom is greatly appreciated.

Thanks

Hi again,
I used the partition identifier and it returned the following:
kevin@kevins-linux:~$ mount -v | grep “^/” | awk ‘{print "\nPartition identifier: " $1 "\n Mountpoint: " $3}’

Partition identifier: /dev/sdb2
 Mountpoint: /

Partition identifier: /var/lib/snapd/snaps/gnome-calculator_180.snap
 Mountpoint: /snap/gnome-calculator/180

Partition identifier: /var/lib/snapd/snaps/gnome-logs_37.snap
 Mountpoint: /snap/gnome-logs/37

Partition identifier: /var/lib/snapd/snaps/gtk-common-themes_818.snap
 Mountpoint: /snap/gtk-common-themes/818

Partition identifier: /var/lib/snapd/snaps/gnome-calculator_260.snap
 Mountpoint: /snap/gnome-calculator/260

Partition identifier: /var/lib/snapd/snaps/gnome-system-monitor_57.snap
 Mountpoint: /snap/gnome-system-monitor/57

Partition identifier: /var/lib/snapd/snaps/gnome-logs_45.snap
 Mountpoint: /snap/gnome-logs/45

Partition identifier: /var/lib/snapd/snaps/gnome-3-26-1604_74.snap
 Mountpoint: /snap/gnome-3-26-1604/74

Partition identifier: /var/lib/snapd/snaps/core_6130.snap
 Mountpoint: /snap/core/6130

Partition identifier: /var/lib/snapd/snaps/gnome-characters_139.snap
 Mountpoint: /snap/gnome-characters/139

Partition identifier: /var/lib/snapd/snaps/canonical-livepatch_54.snap
 Mountpoint: /snap/canonical-livepatch/54

Partition identifier: /var/lib/snapd/snaps/gnome-3-26-1604_70.snap
 Mountpoint: /snap/gnome-3-26-1604/70

Partition identifier: /var/lib/snapd/snaps/gnome-characters_103.snap
 Mountpoint: /snap/gnome-characters/103

Partition identifier: /var/lib/snapd/snaps/gnome-system-monitor_51.snap
 Mountpoint: /snap/gnome-system-monitor/51

Partition identifier: /var/lib/snapd/snaps/gtk-common-themes_319.snap
 Mountpoint: /snap/gtk-common-themes/319

Partition identifier: /var/lib/snapd/snaps/core_4917.snap
 Mountpoint: /snap/core/4917

Partition identifier: /dev/sdc3
 Mountpoint: /media/kevin/disk

Partition identifier: /dev/sdc2
 Mountpoint: /media/kevin/hassos-kernel

Partition identifier: /dev/sdc7
 Mountpoint: /media/kevin/hassos-overlay

Partition identifier: /dev/sdc8
 Mountpoint: /media/kevin/hassos-data
kevin@kevins-linux:~$ 
kevin@kevins-linux:~$ (source)

I can’t see sdc1 as that is the fat16 partition (hassos-boot) which is the only 1 visible in windows. In there I tried creating a CONFIG/network/my-network file also with config/network/my-network. I tried CONFIG/network/hassos-network (also lower case) as that is the id in the second line of the file.
All failed.
I am not sure which of the remaining 7 of the 8 partitions I should enter the CONFIG into to achieve a WiFi connection.
I have also tried the USB stick again with the various formats of the file, no joy.

Could it have anything to do with the UUID? I’m not sure.

Any thoughts will be most welcome,

Thanks

Okay all, I’m a bloody idiot! I’ve spent the past few days tearing my hair out over this WiFi setup and have just realised that the speck of dirt on my screen by the file “network” was actually ’ and thanks to the small view on my display, I didn’t see my mistake!

Only on a different folder view in linux was I able to realise the error of my ways.

The Pi ZeroW is ticking along nicely now and downloading what it needs, phew!

Many thanks and apologies to @wutr for all the help. It looks like I’m off to a real rocky start with home assistant but on the plus side it can only get better! (I hope!)

Thanks again all, sure it won’t be the last question I have but hopefully the rest won’t be so schoolboy error orientated!

Glad you got it fixed (you are not the only one who has done that I’m sure)!

For people who are still struggling to do it via Linux:

hassos-boot is visible in Windows because it’s FAT. Windows doesn’t show anything it doesn’t support.
On Linux (and in your case Ubuntu?) It doesn’t automount 4 out of 8 paritions on the SD card. Why, I don’t know, there is probably an explanation, but to fix it you have to mount hassos-boot (which in your case is /dev/sdc) as FAT as follows (you may have to create a directory for the mountpoint):

sudo mount -t vfat /dev/sdc1 /media/kevin/hassos-boot

Also, I mentioned using fdisk before, but I suggest using lsblk --fs instead to find out which device/partition to mount (which in this case was /dev/sdc1).

1 Like

@wutr
I’m having the same problem as everyone here: hassio doesn’t connect to wifi
I’ve spent hours going through the various threads on here but to no good.

I’m on a mac running mojave v10.14.2

Here are my steps:

  • downloaded the 32 bit image from the official page, and flashed it to an sd card.
  • like the documentation says, I formatted a usb stick (using the exFAT file system I think).
  • created the file CONFIG/network/my-network

[connection]
id=my-network
uuid=76b9c56b-a627-4228-b528-22f0ea965e93
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=<my_ssid>

[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=<my_psk>

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

After hooking up the SD card and usb stick and running the pi it repeats the log “wlan0: link is not ready”, and I also can’t find the connection when viewing my router; so it’s not connecting (hassio.local:8123 doesn’t work either). Am I missing something obvious?

The usb name is CONFIG, correct? It isn’t a directory on the usb?

As @cogneato mentioned, the procedure for using a USB drive differs slightly from creating the file directly on the SD card.

If using a USB drive: name it CONFIG (partition label) and create a folder on that partition called network and the my-network file within there.

If using the SD card you wrote the hass.io image to: create the folder CONFIG on the boot parititon and within it a network folder and my-network file.

As before, it’s case-sensitive.

2 Likes