Can't log the OTAP result on console

32 views
Skip to first unread message

Eugenio Antón

unread,
Oct 6, 2016, 3:43:39 AM10/6/16
to Cinterion Java enabled chips support
Hi, I have no problem doing (and seeing the log) the OTAP "manually". I go to the console, put the PIN, define the OTAP parameters, execute the OTAP and right after this execute "AT^SCFG=Trace/Syslog/OTAP,1" to see the log, and I see it normally.
The problem is when I want to do the same on a .jar. I have a little code to do the update of the app (I connect to the server and it says to me if there is a new version or not). My code has the same orders:
atcommand.send("AT+cpin="+this.pin+"\r")
atcommand.send("AT^SJOTAP="+smsPwd+","+jadURL+","+appDir+","+httpUser+","+httpPwd+","+bearing+","+apn+","+apnUser+","+apnPasswd+","+dns+","+notifyURL+","+ignoreSMS+","+hideHTTP+"\r");
atcommand.send("AT^SJOTAP\r");
atcommand.send("AT^SCFG=Trace/Syslog/OTAP,1\r");
The difference is that when I look the .jar execution on the console, it never show me the OTAP result. The two last orders are consecutive lines, with only a System.out.println to see where the program is. I always see the content of the println, and then the code on the destroyApp method.
Why is this not working on "automatic" mode? I would appreciate some advise, thanks in advance

Nikita Kapitonov

unread,
Oct 6, 2016, 4:08:19 AM10/6/16
to java...@googlegroups.com
Hello, the command only works in terminal, so no chance to setup it from your program.

My suggestion is that you can connect to your device from terminal and put the AT^SCFG=Trace/Syslog/OTAP,1 command manually right after your device prints its gonna do the OTAP procedure in the destroyApp method.

чт, 6 окт. 2016 г. в 10:43, Eugenio Antón <ugeltro...@gmail.com>:
--
javacint group - http://www.javacint.com/
---
You received this message because you are subscribed to the Google Groups "Cinterion Java enabled chips support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javacint+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eugenio Antón

unread,
Oct 6, 2016, 6:55:48 AM10/6/16
to Cinterion Java enabled chips support
Hi, thanks Nikita

What do you mean by "the command only works in terminal"? I can execute commands like at+csq, at+cpin, AT^SJOTAP, etc; in terminal, but also in a jar file using the class ATCommand. I think the modem don't distinguish if the command is being executed by me or by a jar file. Or you mean the problem is only with the "AT^SCFG=Trace/Syslog/OTAP,1" order?

On the other hand, can't do your suggestion because I can't type commands when a .jar is executing. I'm using a TC65I-X modem, and have this restriction. I know other modems use one COM port for typing orders, and another COM port for seeing the output, but it doesn't work this way on my modem.

Any other idea?

Nikita Kapitonov

unread,
Oct 6, 2016, 7:45:57 AM10/6/16
to java...@googlegroups.com
>>What do you mean by "the command only works in terminal"?
I mean that the output of this command flows to the interface its executed from only. So if you execute it from your application, only the application will receive the output, also the interface will be locked for that function only, so you cannot use it for other AT commands from application. But even that will not work, as the AT^SJOTAP command will terminate the application, and you will never see the output of OTAP tracer.

>>On the other hand, can't do your suggestion because I can't type commands when a .jar is executing.
Yes, but .jar is terminated right after AT^SJOTAP command, so you can type commands after your application stops.

P.S. the part from the docs on AT^SCFG:
This parameter enables a trace output of the Over The Air procedure. The tracer is useful for obtaining additional information when setting up an OTAP scenario. The output is provided on the interface on which the command was entered. While the tracer is enabled the interface is used for trace output only, meaning that no AT com­mands can be entered. The tracer will be switched off only by a reset of the module, e.g. after a completed OTAP procedure.


Best regards,
Nikita Kapitonov


--
javacint group - http://www.javacint.com/
---
You received this message because you are subscribed to the Google Groups "Cinterion Java enabled chips support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javacint+unsubscribe@googlegroups.com.

Eugenio Antón

unread,
Oct 10, 2016, 4:04:14 AM10/10/16
to Cinterion Java enabled chips support
Hi Nikita, thanks to you, I've got a satisfactory solution.

I don't understand the fact that "only the application will receive the output". I always can redirect the output to where I want, no matter what tech I'm using.

However, I tried to put the command after my .jar ended, and it worked, so this solution is useful to me. It is not the ideal solution, because I have to be careful to enter the command at the right time,but it seems to be the only solution I can get, isn't it?

Thanks a lot for your help, best regards

Reply all
Reply to author
Forward
0 new messages