hypriot / flash

Command line script to flash SD card images of any kind
MIT License
1k stars 176 forks source link

--ssid and --password options do not work #109

Closed fudekun closed 4 years ago

fudekun commented 6 years ago

I fail to connect to the wireless LAN with the --ssid option and the --password option. hypriot is version 1.7.1, flash is the latest version. The same is true when using device-init.yaml. Please help me.

StefanScherer commented 6 years ago

Thanks. Yes this does not work at the moment. With Hypriot 1.7.0 we have switched from device-init to cloud-init and now there is a boot/user-data file. Seems like flash should write these two options into user-data write_files section. At the moment you have to do that manually and also activate the WiFi sections.

fudekun commented 6 years ago

Thank you for your answer. In the case of the URL method taught to you, I can not use "package-*" related description of "cloud-init". It is very inconvenient. I need the options device - init.yml and --ssid and - password.

joevandyk commented 6 years ago

@StefanScherer should the documentation be updated?

StefanScherer commented 5 years ago

@joevandyk Yes, I'm also thinking about to remove these options until we have a PR for that for cloud-init

pisuke commented 5 years ago

I've also experimented the same problem.

Should the correct way to specify the wi-fi settings be to use the write_files section and add a custom wpa_supplicant.conf file put inside /etc/wpa_supplicant?

Here is a wpa_supplicant configuration that works for me with the 1.9.0 version of HypriotOS.

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

network={
    ssid="SSID"
    psk="PASSWORD"
}

I agree that the user documentation should be updated.

StefanScherer commented 4 years ago

Fixed with #165, but a prepared user-data file must be used with uncommented section.