WiFi MAUI

RFID SDK for MAUI 2.0.4.190

Applicable devices : Handheld

WiFi Scan

Call API wifiScan() to start scan. Once scan is started notification will be triggered for scan started and scan stopped events, these events are pushed to application via Readers.IRFIDReaderEventHandler



//wifi Scan
RFIDResults rFIDResults = rfidReader.Config.WifiScan();

//wifi Events
public class ReaderModel : Readers.IRFIDReaderEventHandler, IWifiScanDataEventsListener                   
{
    public void EventStatusNotify (RfidStatusEvents rfidStatusEvents)
    {
        if (rfidStatusEvents.StatusEventData.StatusEventType == STATUS_EVENT_TYPE.WpaEvent) {    
            string scanStatus = rfidStatusEvents.StatusEventData.WPAEventData.Type;
            WiFiNotificationEvent(scanStatus);
        }
    }

}

public void WiFiNotificationEvent(string scanStatus)
{
    switch (scanStatus)
    {
        case "ScanStart":
            //update UI for scan start
            break;
        case "ScanStop":
            //update UI for scan stop
            break;
        case "Operation Failed":
            break;
    }
}


Scan data results will be pushed to application via IWifiScanDataEventsListener


    public class ReaderModel : Readers.IRFIDReaderEventHandler, IWifiScanDataEventsListener
    { 
        //wifi Scan Data
        public void EventWifiScanNotify(RfidWifiScanEvents wifiScanEvent)
        {
            IEvents.WifiScanEventData data = wifiScanEvent.WifiScanEventData;
        }
    }

WiFi Add Profile

Please refer the sample code to add WiFi WPA3 Personal profile



WifiProfile wifiProfile = new WifiProfile();
WifiSecureConfig wifiSecureConfig = new WifiSecureConfig();

wifiProfile.Setssid("Zebra WiFi");
wifiProfile.Setprotocol(ENUM_WIFI_PROTOCOL_TYPE.WPA2PersonalCCMP);
wifiProfile.Setpassword("zebra@12345");

wifiProfile.Setconfig(wifiSecureConfig);

RFIDResults rFIDResults = rfidReader.Config.WifiAddProfile(wifiProfile);

Please refer the sample code to add WiFi WPA2 Enterprise profile


WifiProfile wifiProfile = new WifiProfile();
WifiSecureConfig wifiSecureConfig = new WifiSecureConfig();

wifiProfile.Setssid("Zebra WiFi");
wifiProfile.Setprotocol(ENUM_WIFI_PROTOCOL_TYPE.WPA2PersonalCCMP);
wifiProfile.Setpassword("zebra@12345");

wifiProfile.Setconfig(wifiSecureConfig);

RFIDResults rFIDResults = rfidReader.Config.WifiAddProfile(wifiProfile);

WiFi Saved Profile List

This list out the number of profile saved in the Reader. As of now we can save maximum 10 profiles in reader.


IList wifiProfiles = rfidReader.Config.WifiListProfile();

WiFi Save Profile

API is used to save all the user configured wifi profiles .


rFIDResults = rfidReader.Config.WifiSaveProfile();

WiFi Delete Profile List

Please refer the sample code to delete profile from saved profile list.


rFIDResults =rfidReader.Config.WifiDeleteProfile("Zebra WiFi");

Get Installed WiFi Certificates

This API will return back the list of installed certificate in string format, by using this we can add enterprise profiles of different EAP.



IList<string> certList = rfidReader.Config.WifiGetCertificates();

wifiSecureConfig.Setcacert("ca_cert.pem");
wifiSecureConfig.Setclientcert("client_cert.pem");
wifiSecureConfig.PrivateKey = "key.pem";

WiFi Connect Non Roaming

This API used to connect the Reader WiFi from the saved profile list. Pass the SSID to connect.


rFIDResults=rfidReader.Config.WifiConnectNonRoaming("Zebra WiFi");

//wifi Events
public class ReaderModel : Readers.IRFIDReaderEventHandler
{
    public void EventStatusNotify (RfidStatusEvents rfidStatusEvents)
    {
        if (rfidStatusEvents.StatusEventData.StatusEventType == STATUS_EVENT_TYPE.WpaEvent) {
            string scanStatus = rfidStatusEvents.StatusEventData.WPAEventData.Type;
            WiFiNotificationEvent(scanStatus);
        }
    }

}

public void WiFiNotificationEvent(string scanStatus)
{
    switch (scanStatus)
    {
        case "Connect":
    	//update UI on connection 
    	    break;
        case "Disconnect":
    	//update UI on disconnect 
            break;
        case "Operation Failed":
            break;
    }
}


WiFi Disconnect

Call WiFi disconnect API as shown in code below



RFIDResults rFIDResults = rfidReader.Config.WifiDisconnect();

//wifi Events
public class ReaderModel : Readers.IRFIDReaderEventHandler
{
    public void EventStatusNotify (RfidStatusEvents rfidStatusEvents)
    {
        if (rfidStatusEvents.StatusEventData.StatusEventType == STATUS_EVENT_TYPE.WpaEvent) {
            string scanStatus = rfidStatusEvents.StatusEventData.WPAEventData.Type;
            WiFiNotificationEvent(scanStatus);
        }
    }

}

public void WiFiNotificationEvent(string scanStatus)
{
    switch (scanStatus)
    {
        case "Disconnect":
    	//update UI on disconnect 
            break;
        case "Operation Failed":
            break;
    }
}

WiFi Status

WiFi Status API will return back RSSI, Address, channel, state, band, ssid name, mac, netmask as a key pair values as shown in below code


RFIDResults rFIDResults = rfidReader.Config.WifiGetStatus(rfidWifi);

WiFi ChannelBand Enable

we are supporting three enum for enbaling the respective ChannelBand.

  • ENUM_WIFI_BAND.B24GHz
  • ENUM_WIFI_BAND.B5GHzDFS
  • ENUM_WIFI_BAND.B5GHzNONDFS

This API used to configure the wifi channels band with the enumValue of the respective enum.


Reader.Config.EnableWifiChannelBand(int enumValue);

// Enable 2,4GZ only
Reader.Config.EnableWifiChannelBand(ENUM_WIFI_BAND.B24GHz.EnumValue);

For enabling multiple channelBand the enumValue should be OR of the respective enum values.


    //Enable 2.4GZ and 5GZ DFS
Reader.Config.EnableWifiChannelBand(ENUM_WIFI_BAND.B24GHz.EnumValue | ENUM_WIFI_BAND.B5GHzDFS.EnumValue);

//Enable 2.4GZ and 5GZ non DFS and 5GZ DFS
Reader.Config.EnableWifiChannelBand(ENUM_WIFI_BAND.B24GHz.EnumValue | ENUM_WIFI_BAND.B5GHzDFS.EnumValue | ENUM_WIFI_BAND.B5GHzNONDFS.EnumValue);
NOTE:
  • In terms of design, user can call enableWifiChannelBand api only after calling wifiGetStatusat least once beforehand.
  • If a user attempts to enable a channelband that is not supported for the respective country, the setting will revert to the previous channel band.
  • If a user attempts to enable multiple channel bands, including one that is not supported for the respective country, only the supported channel bands will be set.