Wi-Fi - Fidelity without wires

mail

How to share WiFi settings via a QR code ?

The idea here is not to disclose your wireless settings to anybody, but to have a convenient way to share them with family and friends visiting you at home. The steps below will show you how to generate a QR code you can print and display in a private part of your home.

  1. apt install qrencode
  2. generate the QR code :
    1. ssid='mySsid'; encryptionType='WPA'; password='123456'
      • whatever your WPA flavor, the encryptionType value will most likely end up to WPA
      • don't forget to escape special characters (if any) in the password
    2. see the QR code as soon as it's generated :
      echo "WIFI:T:$encryptionType;S:$ssid;P:$password;;" | qrencode -l H -s 20 -o - | display
    3. generate and save it :
      echo "WIFI:T:$encryptionType;S:$ssid;P:$password;;" | qrencode -l H -s 20 -o path/to/QRcode.png
  3. on the Android device :
    1. open Settings | Network and Internet | Wi-Fi
    2. scroll down (but don't click it) until Add a network
    3. click the QR code icon
    4. scan your QR code
    5. the Android device connects automatically to your wireless network
    On my smartphone, this happens without displaying the WiFi password. However, this information is still readable in cleartext in the QR code itself with any basic QR code reader.
mail

wireless-tools

wireless-tools is a set of utilities to configure and manage wireless devices. It includes the following commands :
iwconfig
view / set wireless interface parameters. As these parameters are ignored until the next "ifup", the specification order doesn't matter.
Not-Associated means the interface is not connected to the access point.
iwlist
scan the available wireless networks : iwlist wlan0 scan or : iwlist scanning
list the available channels and frequencies : iwlist wlan0 frequency
iwevent
list events (mainly for debugging)
iwpriv
configure private parameters of a wireless interface
iwspy
(?)

examples of interface configuration with iwconfig :

ifconfig wlan1 down
iwconfig wlan1 ap E6:06:43:aa:bb:cc
iwconfig wlan1 essid mySsid
iwconfig wlan1 channel 11
iwconfig wlan1 key restricted 0123456789
ifconfig wlan1 up
iwconfig wlan1
ifconfig wlan1 down hw ether 00:15:AF:99:88:77
iwconfig wlan1 mode managed
iwconfig wlan1 sens -90
iwconfig wlan1 freq 2.437G
iwconfig wlan1 key restricted 0123456789ABCDEFGHIJ
iwconfig wlan1 essid anySsid
iwconfig wlan1 ap 00:0E:8E:01:23:45
iwconfig wlan1 ap off
ifconfig wlan1 up
iwconfig wlan1