BarCodeWiz Logo

Make your own QR Code with WiFi details with BarCodeWiz QR Code Fonts

Everyone can create their own QR Code with WiFi details. This method, unless the QR Code is shared with unwanted people, can be quite safe - you can put password as complicated as possible, without worrying, how and where to note them. Here is how it can be done.:


Know the following details of your network:

  •  Authentication type - there can be WEP, WPA, WPA2-EAP
  • Network name (SSID)
  • Password
  • Whether the network is HIDDEN or not

There are also more specific properties to encode in your WiFi QR Code, used in rare situations.:

  •  Identity - used only for WPA2-EAP 
  •  Anonymous identity - used only for WPA2-EAP
  • PHASE2 METHOD - used only for WPA2-EAP

How to put all together?

  • Begin the QR Code with WIFI:
  • Then add the rest of the fields; order does not matter.  
  • We will encode the following details:
    WiFi:
    S:<SSID>;P:<password>;T:<WEP|WPA|blank>;H:<true|false|blank>;;
  •  After filling the data we receive: 
    WiFi: S:<BarCodeWiz>;P:<IsTheBest>;T:<WPA>;H:<false>
  • Some additional information:
    If you are using special characters like
    backslash (\),
    semicolon (;),
    coma (,),
    quote ("),
    colon (:),
  • use backslash (\)to escape them. 

Examples of use


BarCodeWiz QR Code Fonts used in Crystal Reports

  // This is the text you wish to encode. Replace "Hello..." with your own data.
  // For example: stringVar barcodeInput := {my_data_table.item_text}; 
  // 
  // If your data is a number or date, it must be converted to string using the ToText() function.
  // For example: local stringVar barcodeInput := ToText( {my_data_table.item_text}, 0, ""); 
local stringVar barcodeInput := "Wifi: S:<BarCodeWiz>;P:<IsTheBest>;T:<WPA>;H:<false>";

 // Minimum size of QR Code symbol.
 // Valid sizes are 1-40, where size 1 equals 21x21 modules per side and size 40 equals 177x177.
 // Note: Size of symbol will automatically increase if too small for the data.
local numberVar symbolSize := 1;            
	  
 // Error correction level allows a partially damaged barcode to be scanned successfully.
 // Valid values are 1-4, representing levels of L, M, Q, and H.
local numberVar errorCorrectionLevel := 1;

 // Allows input of special characters in format ^000 where 000 is decimal ASCII code. 
 // For example, ABC^009123^013^010 encodes "ABC[TAB]123[CARRIAGE RETURN][LINE FEED]".
 // To encode the actual caret ^, enter it twice: ^^
 // To encode FNC1, enter: ^F1
local booleanVar allowSpecialChars := true;

 // Determines what type of QR Code barcode to create.
 // Set fnc1Mode to 0 to create "regular" QR Code barcodes (default)
 // Set fnc1Mode to 1 to create GS1-QR barcodes.
 // GS1-QR barcodes require input to be in the format: "(NN)XXXXXX(NN)XXXXXXXXX",
 // where NN is a 2, 3, or 4-digit AI and XXXXXX is alphanumeric data to be encoded.
local numberVar fnc1Mode := 0; 

 // Thickness of quiet zone (space around barcode), in number of modules.
 // Note: Minimum quiet zone in QR Code is 4 modules. 
 // If you add a border (borderWidth > 0), ensure quietZoneWidth is 4 or larger.
 // Default value is 0 (no quiet zone)
local numberVar quietZoneWidth := 0; 

 // Thickness of border around barcode, in number of modules.
 // If using a border, ensure quietZoneWidth is 4 or larger.
local numberVar borderWidth := 0; 

 // Character encoding of your data input.
 // For example: UTF-8 | UTF-16 | ISO-8859-1 | ISO-8859-3 | ISO-2022-JP-2 
 // This setting should be set to UTF-16 (Unicode) for Crystal Reports 9 and newer
 // Crystal Reports automatically converts all input (from database fields, strings, etc) into UTF-16.
local stringVar characterInputEncoding := "UTF-16";

 // Character encoding for data encoded in the QR Code symbol. 
 // The recommended setting is UTF-8, which is the default for the majority of barcode scanners.
 // If you change the setting, be sure the scanner understands it.
local stringVar characterOutputEncoding := "UTF-8";


local numberVar strLen := Length(barcodeInput);
local stringVar hex;
local stringVar xvals := "0123456789ABCDEF";
local numberVar i;
For i := 1 to strLen Do
(
    local numberVar num := AscW(Mid(barcodeInput, i, 1));
    local numberVar first := Remainder( num,  256);
    local numberVar sec := Int( num / 256);

    hex := hex + Mid(xvals, Int(first/16) + 1, 1) + 
                 Mid(xvals, Remainder(first, 16) + 1, 1) + 
                 Mid(xvals, Int(sec/16) + 1, 1) + 
                 Mid(xvals, Remainder(sec, 16) + 1, 1);
);

local stringVar fullBarcode := "";
local numberVar partNumber := 0;

local stringVar result;
Do 
(
    result := QrCodeEncodeFromHex(partNumber, hex, symbolSize, errorCorrectionLevel, 
                                    allowSpecialChars, fnc1Mode, quietZoneWidth, borderWidth, 
                                    characterInputEncoding, characterOutputEncoding);
    fullBarcode := fullBarcode + result;
    partNumber := partNumber + 1;
)
While result <> "";

fullBarcode;

 

 

 

 

 

 



BarCodeWiz QR Code Fonts used in SSRS 

=Code.MyQrCode.Encode( strBarcode:="WiFi: S:<BarCodeWiz>;P:<IsTheBest>;T:<WPA>;H:<false>" )


BarCodeWiz ActiveX Control used in MS Excel