Connection profile contention between Java app and AT commands | Thales IoT Developer Community
July 24, 2018 - 1:56am, 2696 views
I have a Java app running on the ELS6 that makes HTTPS calls over LTE. It grabs a connection using ^sjnet. I also would like to use the ^sics and ^siss commands to make HTTPS calls while the app is running. However, currently it isn't possible. I need to stop running the Java app in order for ^siso to work. Is there a way around this?
Hello,
There may be conflicts between network connections from Java applications and IP services over AT commands. Generally it is recommended to use Java classes for networking inside Java MIDlet. But as I understand you have a MIDlet which connects to the network and additionally you are using IP services over AT commands not inside Java but via external interface.
This problem may depend on the operator if they allow multiple connections to the same APN. Generally the best way to avoid the problems is to have 2 separate APNs for these 2 services. But this nay require an agreement with the operator.
Regards,
Bartłomiej
OK thanks. Is there a way to turn off a MIDlet's hold on the APN and only use it when needed? My app calls the ^sjnet command as soon as it boots up, but I could call another command to close down access to the APN later. I can also ask the host device to close down the APN. Is there a way to use ^sjnet to close down the APN so other AT commands can use it?
Also, I'm assuming if there are two Java MIDlets they can't both access the same APN at the same time.
Thanks,
Alftom
Hi,
Did you try to use Java class HttpsConnection?
There you need to use Connector.open(url) where as url you can write your IP server with port and connection profile (where you can set your APN). So you will can to opening and closing connections.
String destHost = "***.***.***.***";
String destPort = "***";
String connProfile = "bearer_type=gprs;access_point=internet;username=anyone;password=something";
String url = "socket://" + destHost + ":" + destPort+ ";" + connProfile;
Here is some exaple: https://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax...
Regards,
Krzysztof
Does HttpsConnection have the ability to limit TLS to 1.2 and limit the allowed ciphersuites? I didn't think this was possible with J2ME.
Thanks,
Alftom
Hi,
About two middles using the same APN it depends on operator. It has to be checked and tested by your side.
Can you write more about your scenario? What module do you use? It's ELS61-E?
To close ^sjnet you can try to write: at^sjnet="","","",""
I found out that this is not possible to limit TLS to 1.2 with J2ME. Maybe something can be done on the server side?
Regards,
Krzysztof
Thanks. We will try to control the protocol on the server side. I will also try at^sjnet="","","","". before using the system AT commands.
Is it possible to limit which ciphersuite to use with HttpsConnection? We are using ELS61-x and EHS6.
Thanks,
Alftom
Hi,
Unfortunatelly there is no possibility to limit which ciphersuite HttpsConnection use. Modules have their own list and send it to the server. You can check this list in Java User Guide.
Regards,
Krzysztof