Problem accessing the Create's current network settings.

This has to be a rookie question, sorry! :/

I have a Create 2 running 7.1.80.

I'm trying to check the SSID / IP address of my Create to see if it's currently on my LAN. (Sometimes it drops off for some reason...)

Searching the forums I found a discussion where Andy recommended invoking the following message and parsing out the reply:

http://forum.kinoma.com/discussion/125/catching-android-connectivity-events

His suggestion:

 application.invoke(new Message("xkpr://shell/network/status"), Message.JSON);

My attempt:

application.invoke(new Message("xkpr://shell/network/status").invoke(Message.JSON).then(json => {
    if (json && ("ip_address" in json)) {
      trace("IP Address: " + json.ip_address +"\n");
    }
   }));

When I hit this code an error is thrown:

### BREAK: invoke: # message is no KPR.message!! (/home/acarle/kinoma/fsk/kinoma/kpr/kpr.c:483)

If I hit F8 and continue running the trace shows the IP address but the program then hangs.

Thoughts?

Thanks!

Sign In or Register to comment.