the midlet does not send commands AT | Telit Cinterion IoT Developer Community
July 2, 2019 - 11:12am, 2052 views
I have made a midlet that sends AT commands, to change the internet connection and to ask the imei of the device, with Java. And everything works normally.
Then, I have another midlet. which contains the whole project that I am doing. The idea is to pass the code of the midlet that performs the AT commands to this main midlet. By doing this, the AT commands are not executed, the midlet stops at the moment of sending them.
That is, when I use a midlet that only sends AT commands, everything works perfectly. but when I try to send the AT commands from another midlet that performs more operations, it stops, and I use the same code, but it still fails.
What could be the reason for this?
thank you
The execution of the AT commands is performed at the beginning of the midlet, so it does not perform any operations before sending the AT commands.
The only other thing that it does before, unlike the other midlet (the one that only sends the AT commands) is to initialize the variables that I need.
Hello,
There should be any difference. Are you sure that everything is initiated in the same time? Can you paste a log? Does the MIDlet hang?
Is this MIDlet added to auto-start or do you start it manually?
Please also verify that the same libraries are used for both MIDlets.
Could you also describe what is the MIDlet doing and if there is any external processir that also is using the module - what is the logic that this processer executes?
Regards,
Bartłomiej
***** Bartłomiej.
I did not answer before because there was a lot to explain and I wanted to see first if I found the error.
and I have managed to find him.
in the other midlet (main) I have exported the library "cwmlib_1.0.jar" and eclipse did not give me an error, because I had the library.
But when passing it to the midlet, the library was not exported
I have entered into properties of the midlet - Java Build Path - Order and Expor.
and I have selected the library "cwmlib_1.0.jar", so that it will be exported
And resolved, everything works fine.
Thank you very much for the help
Hello,
That's great.
Yes this library must be checked for export. In case you don't do it there should be an exception thrown, like:
java.lang.NoClassDefFoundError: com/cinterion/io/ATCommandFailedException
or something similar.
Regards,
Bartłomiej