Tuesday, October 12, 2021

Create QR code for wifi in linux

To easily share wifi credentials, a QR code can be used. A QR code can contain the information of the wifi, and can be scanned easily using any qr code reader in mobile phones. To make the QR code, we need a tool called qrencode.


First, prepare the wifi information using below format:

WIFI:S:{SSID name of your network};T:{security type - WPA or WEP};P:{the network password};;

For example, my wifi SSID is mysecurewifi, it is using WPA, and the password is mysecurewifipassword. 

 WIFI:S:mysecurewifi;T:WPA;P:mysecurewifipassword;;


Install qrencode

$ sudo apt update && sudo apt install qrencode


Provide the above information against qrencode command to generate a qr code image file called mywifi.png

$ qrencode -o mywifi.png '

WIFI:S:mysecurewifi;T:WPA;P:mysecurewifipassword;;'

 

If the generated image is too small, you can increase the size of the dot pixel using '-s' option

$ qrencode -o mywifi.png -s 10 'WIFI:S:mysecurewifi;T:WPA;P:mysecurewifipassword;;'


Share the file to anyone, or print it for the people who would like to use your wifi. 

Cheers! 

No comments:

Post a Comment