HttpConnection | Telit Cinterion IoT Developer Community
June 7, 2015 - 11:07am, 2847 views
Dear Gemalto.
I am trying to create a very simple HttpConnection.
http = (HttpConnection) Connector.open(url);
String url = "http://87.60.128.8/ping/Ping"
But the http.getResponseCode()
throw the exception, as You probadly know "Profile could not be activated"
The String strCommand = "AT^SJNET=\"gprs\",\"internet\",\"\",\"\",\"\",\r"; does not do it
There must be something more...
Can You help?
Br Morten, DK
Found out ->
http = (HttpConnection) Connector.open(url + ";" + connProfile);
String connProfile = "bearer_type=gprs;access_point=internet;username=;password=";
This will do it.
Hello,
You should be able to use AT^SJNET or pass the parameters to Connector.open() method. Both should work.
If you get "Profile could not be activated" most probably the parameters are incorrect.
Regards,
Bartłomiej