WiFi - Fidelity without wires

mail

How to share WiFi settings via a QR code ?

  • The idea here is to have a convenient way to share your wireless network settings with people visiting you at home (whatever length / complexity your network name and password are ) :
    1. generate a QR code with the WiFi settings
    2. print and display it in a private part of your home
    3. your guests just have to scan it to be connected. Enjoy !
  • In no way are your network settings hidden / encrypted / whatever with this method : even though a guest can join your network without seeing your password, the whole information is readable in cleartext in the QR code itself with any basic QR code reader.
  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 :
      qrencode -l H -s 20 -o - "WIFI:T:$encryptionType;S:$ssid;P:$password;;" | display
    3. generate and save it :
      qrencode -l H -s 20 -o path/to/QRcode.png "WIFI:T:$encryptionType;S:$ssid;P:$password;;"
  3. on the Android device :
    1. open Settings | Network and Internet | WiFi
    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
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