Has anyone written a script or application that they can share that will turn off an MC70 WIFI radio when placed in an Ethernet cradle? Thanks, Clayton Moore
MC70 Disable WIFI on Ethernet Cradle// Expert user has replied. |
MC70 Disable WIFI on Ethernet Cradle// Expert user has replied.Has anyone written a script or application that they can share that will turn off an MC70 WIFI radio when placed in an Ethernet cradle? Thanks, Clayton Moore |
Subscribe to email updates
Monthly updates from our Zebra development team, straight to your inbox.
4 Replies
It would be greatly appreciated by those in the Support Center if someone could post this script as a cab file.
With SymScript it would be SetVar String strWLAN = "WLP1:" OnPower AC GOSUB OnACPower OnPower DC GOSUB OnDCPower Sleep INFINITE :END :OnACPOwer DEVICEPOWER strWLAN 4 1 // WLAN Off RETURN :OnDCPOwer DEVICEPOWER strWLAN 0 1 // WLAN On RETURN
Note that the script provided works based on AC power and hence will disable the WLAN any time AC power is provided, whether it is from an Ethernet Cradle or not and whether or not that Ethernet Cradle provides connectivity. If the ONLY way the device ever gets AC power is from an Ethernet Cradle, and if the Ethernet Cradle is always expected to provide connectivity, then the script might work fine. If not, then you might need logic that detects active adapters and/or tests for actual connectivity, which is quite a bit more complex.
Hello Allen, Good point. This can be improved to look at the LAN USB interface to see if it has an IP address before powering off the WLAN - so ensuring that the terminal is an ethernet cradle. SymScript has an event that can call a GOSUB when the IP address changes, so can use this as the trigger rather than AC power. You can check to see if you have an IP address on the LAN USB see below - this could also be improved with some error checking - when you insert into the cradle you get notified of the IP address change and when you remove from the cradle - IP address removed SetVar String strWLAN = "WLP1:" ; ; SetVar String strLANNDS1 = "LANNDS1" // ethernet USB GOSUB OnAddressChange NotifyAddressChange GOSUB OnAddressChange SLEEP INFINITE :END :OnAddressChange SetVar String strIPLANNDS1 = GetIPAddressList( strLANNDS1 ) IF ( strIPLANNDS1 == "Not found" ) DEVICEPOWER strWLAN 0 1 // WLAN On ELSE DEVICEPOWER strWLAN 4 1 // WLAN Off ENDIF RETURN