hypriot / flash

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

Add hidden ssid support #74

Closed leo-cheron closed 6 years ago

leo-cheron commented 8 years ago

Actually, the generated wifi configuration doesn't provide hidden ssid support. It would be nice to manage hidden wifi networks by adding an optional param scan-ssid to device-init.yaml such as:

hostname: black-pearl
wifi:
  interfaces:
    wlan0:
      ssid: "MyNetwork"
      scan-ssid: 1
      password: "secret_password"

This way, generated wlan0 file would look like

allow-hotplug wlan0

auto wlan0
iface wlan0 inet dhcp
  wpa-ssid MyNetwork
  wpa-scan-ssid 1
  wpa-psk generated_psk
StefanScherer commented 8 years ago

@mrgnou Thanks, good idea. I've opened a issue in device-init which does the real work.

StefanScherer commented 6 years ago

We have switched to cloud-init with HypriotOS 1.7.x so please have a look at our latest blog post about using cloud-init or the example /boot/user-data in the latest SD card image. As you can specify the whole wpa config you should be able to do this.

StefanScherer commented 6 years ago

Should be manageable with a customized user-data file. See https://github.com/hypriot/image-builder-rpi/blob/master/builder/files/boot/user-data how the default /boot/user-data file of HypriotOS 1.7.x looks like and adjust it to your needs. Then use the latest flash script with option flash --userdata your-customized-hidden-ssid-user-data-file.