How to obtain the MC40 IP address

R Robert Rapp 2 years 11 months ago
0 1 0

We are using the SB1's and MC40's in all of our stores. I wrote a script for the SB1 to get the IP address of the unit and build a store specific ip address to connect to our stores back office using function:  signal.signalEvent = "signalEvent(%json)"; in asl.js.
I can't find this function in ebapi-modules.js. Do you have a comparable function for the MC40?

Please register or login to post a reply

1 Replies

V Vedsatx Saddvv

Robert, the Android Java API's provide a method to get a devices IP address through WifiManager.

WifiManager wm = (WifiManager) getContext().getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wm.getConnectionInfo();
int ipAddress = info.getIpAddress();
String MyIPAddress = String.format("%d.%d.%d.%d", (ipAddress & 0xff),(ipAddress >> 8 & 0xff), (ipAddress >> 16 & 0xff),(ipAddress >> 24 & 0xff));

CONTACT
Can’t find what you’re looking for?