AT^SJNET and AT^SJOTAP issues. (EHS5-E) | Thales IoT Developer Community
March 24, 2015 - 12:28pm, 5950 views
I created a Java midlet that simply tries to connect to a public server.
The steps I'm following are:
1.- Register my connection profile AT^SJNET
2.- Connect to the server
3.- send data
I'm registering using the AT^SJNET command:
The command itself works correctly and returns "OK" as expected.
However, if I try to connect to fast (I'm using SocketConnection class) I'm getting an IOException:
java.io.IOException: Profile could not be activated
After a few retries somehow the profile is finally active and I can connect.
The delay itself is a bit odd, because it even interferes with my OTAP.
If I try
and then i run it (with AT^SJOTAP) I'm getting a not found error (due to a Timeout)
However, If I first use AT^SJNET, wait a little bit and the try the exact same AT^SJOTAP command, then it works.
To my knowledge, AT^SJOTAP, alreay registers with the given parameters, so a previous AT^SJNET should not required. Any clue what might be happening?
Is there any way to check whether the profile is active before trying to make the connection?