Gemalto is now part of the Thales Group, find out more.

You are here

AT^SJNET and AT^SJOTAP issues. (EHS5-E) | Thales IoT Developer Community

Tonino

March 24, 2015 - 12:28pm, 4082 views

Hi,

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:

AT^SJNET="gprs","ac.vodafone.es","vodafone","vodafone","10.32.0.1",0

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

AT^SJOTAP=,"http://80.37.229.215:19002/OTAP/ehs5.jad","a:/Java/jam/pqgprs",,,"gprs","ac.vodafone.es","vodafone","vodafone","10.32.0.1",

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?