Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

What srvProfileId will Http Connector open in Java? | Telit Cinterion IoT Developer Community

January 27, 2016 - 12:13pm, 2273 views

On a EHS6T I am trying to find out what amount of bytes my Java code will send/receive over the GSM network while uploading data packets to a server. That should be doable with AT^SISI command, but in a separate terminal window I only get ERROR while trying to read the service information.

How can I execute an AT^SISI read command on a connection that has been opened in Java? What srvProfileId does the java code activate? The profile is defined with AT^SJNET

HttpConnection conn = null;

InputStream is = null;OutputStream os = null;

try {

conn = (HttpConnection) Connector.open(url);

conn.setRequestMethod(HttpConnection.POST);

conn.setRequestProperty("Content-Type", "application/x-data");

os = conn.openOutputStream();

os.write(data);

inputStreamReadToEnd(conn.openInputStream());

return conn.getResponseCode();

}