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
//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 Delete Profile List
Please refer the sample code to delete profile from saved profile list
IList wifiProfiles = rfidReader.Config.WifiListProfile();
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 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
IDictionary ? rfidWifi = new Dictionary>();
RFIDResults rFIDResults = rfidReader.Config.WifiGetStatus(rfidWifi);