TC65FM : TC65 Fast Manager

WARNING: All the Cinterion related content from this blog will be removed to go to the javacint wiki soon. Please get used to going there.

I did this program because I had to reprogram some chips without a working MES deployment environment. I could deploy the TC65 program on a server but not upload it on the chip. And then I thought it could do a nice application for all the people deploying TC65 programs in a production environment.

What this program basically does is to respond to “^SYSSTART” messages coming from the TC65 chip to launch an OTAP update and/or launch the program. But in the details it does a little bit more as it can auto-detect the port of the chip.

Some of the features might not be working great or even not working at all. The program will be improved with the time, my testings and your comments but it’s currently used for my own needs.

You can download it.

Here is the “-h” output :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
TC65FM 0.1 - Fast Manager - Copyright WebIngenia 2010
 
 -b  --behavior <behavior>     Behavior, can be : 
       i  / install              Install only
       r  / run                  Run only
       ri / run-and-install      Run and install
       n  / none                 Nothing
 -na --net-apn <apn>           Network APN
 -nu --net-user <user>         Network User
 -np --net-password <password> Network password
 -nd --net-dns <dns>           Network DNS
 -au --application-url <url>   Application url
 -sA --serial-autodetect       Serial auto-Detect
 -sp --serial-port <port>      Serial port (default: COM4)
 -ss --serial-speed <speed>    Serial speed (defau:t 9600)
 -tp --target-program          Target program
 -ni --no-ipr                  Desactivate IPR command (not recommended)
 -ae --autostart-enable        Enable autostart
 -ad --autostart-disable       Disable autostart
 -at --autostart-time          Time before autostart
 -pc --password-current        Current password
 -pn --password-next           Next password
 -h  --help                    This help

There’s also a “network autodetection” feature which is in a very early stage. So if you want to test it you can using the “-nA” option (but you shouldn’t).

Let’s say you want to automatically install the program each time a chip (configured with a serial baudrate of 9600) connects to the COM4 port :

1
tc65fm -sp COM4 -ss 9600 -na "m2minternet" -nu "http://webingenia.com/myPath/myApp.jad" -tg "a:/wim2msoft.jad"

The program creates two types of log files. One for the complete running time and one for each communication with the chip occuring after a restart (and the identification of the chip by its IMEI).

Here is the logs of what you should get at each chip startup with this app :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
TC65FM v0.1 - Copyright Webingenia - www.webingenia.com
2010-07-17 09:43:25.682 | <-- AT
2010-07-17 09:43:25.733 | --> AT
2010-07-17 09:43:25.748 | --> OK
2010-07-17 09:43:25.766 | <-- AT+IPR=9600
2010-07-17 09:43:25.828 | --> AT+IPR=9600
2010-07-17 09:43:25.829 | --> OK
2010-07-17 09:43:25.847 | <-- AT+CFUN=1,1
2010-07-17 09:43:25.908 | --> AT+CFUN=1,1
2010-07-17 09:43:26.932 | --> OK
2010-07-17 09:43:30.164 | --> ^SYSSTART
2010-07-17 09:43:30.169 | <-- AT+CGSN
2010-07-17 09:43:30.228 | --> AT+CGSN
2010-07-17 09:43:30.292 | --> 353234023540741
2010-07-17 09:43:30.292 | --> OK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
TC65FM v0.1 - Copyright Webingenia - www.webingenia.com
2010-07-17 09:43:31.174 | <-- ATE1
2010-07-17 09:43:31.236 | --> ATE1
2010-07-17 09:43:31.253 | --> OK
2010-07-17 09:43:31.256 | <-- AT^SJOTAP=,http://webingenia.com:8080/myPath/myApp.jad,a:,,,gprs,m2minternet,,,,,,
2010-07-17 09:43:31.413 | --> AT^SJOTAP=,http://webingenia.com:8080/myPath/myApp.jar,a:,,,gprs,m2minternet,,,,,,
2010-07-17 09:43:31.461 | --> OK
2010-07-17 09:43:31.477 | <-- AT^SJOTAP
2010-07-17 09:43:31.540 | --> AT^SJOTAP
2010-07-17 09:43:31.573 | --> OK
2010-07-17 09:43:31.578 | <-- AT^SCFG="Trace/Syslog/OTAP","1"
2010-07-17 09:43:31.668 | --> AT^SCFG="Trace/Syslog/OTAP","1"
2010-07-17 09:43:31.685 | --> SYSLOG ENABLED
2010-07-17 09:43:47.622 | --> [OTAP] GPRS connection established.
2010-07-17 09:43:47.702 | --> [OTAP] Try to get http://webingenia.com:8080/myPath/myApp.jad ...
2010-07-17 09:43:51.812 | --> [OTAP] Connected.
2010-07-17 09:43:51.861 | --> [OTAP] Transfer finished.
2010-07-17 09:43:51.941 | --> [OTAP] Try to get http://webingenia.com:8080/myPath/myApp.jar ...
2010-07-17 09:44:01.781 | --> [OTAP] Connected.
2010-07-17 09:44:02.340 | --> [OTAP] Transfer finished.
2010-07-17 09:44:05.541 | --> [OTAP] JAM status: 900 Success.
2010-07-17 09:44:11.524 | --> [OTAP] Reboot now.
2010-07-17 09:44:11.540 | --> ^SYSSTART
2010-07-17 09:44:11.544 | <-- AT+CGSN
2010-07-17 09:44:11.605 | --> AT+CGSN
2010-07-17 09:44:11.652 | --> 353234023540741
2010-07-17 09:44:11.668 | --> OK
1
2
3
4
5
6
7
8
9
10
11
12
13
14
TC65FM v0.1 - Copyright Webingenia - www.webingenia.com
2010-07-17 09:44:12.048 | <-- AT^SJRA=a:/secretApp.jad
2010-07-17 09:44:12.132 | --> AT^SJRA=a:/secretApp.jad
2010-07-17 09:44:12.389 | --> OK
2010-07-17 09:44:13.652 | --> WIM2MSoft
2010-07-17 09:44:14.036 | --> Thread-5 : [1/7] Initiating...
2010-07-17 09:44:14.534 | --> Thread-5 : [2/7] Loading settings...
2010-07-17 09:44:15.126 | --> Thread-5 : [3/7] main AT Command interface...
2010-07-17 09:44:15.222 | --> Thread-5 : [4/7] Loading SMS Management...
2010-07-17 09:44:15.510 | --> Thread-5 : [5/7] Checking SIM card...
2010-07-17 09:44:20.676 | --> Thread-5 : [6/7] Loading M2MP network communication...
2010-07-17 09:44:21.908 | --> Thread-5 : [7/7] Loading the main program...
2010-07-17 09:44:32.485 | --> nwr : NetworkLayer.Connect : Could not connect to 84.14.33.44:3000 ex : class javax.microedition.io.ConnectionNotFoundException :  Remote host has rejected the connection.
2010-07-17 09:44:53.845 | --> nwr : NetworkLayer.Connect : Could not connect to 84.14.33.44:3000 ex : class javax.microedition.io.ConnectionNotFoundException :  Remote host has rejected the connection.

5 thoughts on “TC65FM : TC65 Fast Manager”

  1. Hi Ricardo,

    This was programmed in C# .Net, it should work on Linux / Mac Os X / other without any problem (but I haven’t checked yet).

    About sharing the code, well, I’d like it keep it as part of our company so that people discover it through the program we offer. It’s the next step though as we still don’t have a website (but we’re working on it).

    I don’t have a clear position on open-sourcing code. I could be a good thing but it’s a one way process, so I can’t really jump the gap right now.
    I’m thinking about sharing source code with other M2M companies. I’ve talked with few people that would be interested.

  2. How you do the Serial Auto detection? Can you share this piece of code or it idea?
    In a Java Desktop Application I did it get some values form regedit, using a security hack in J2SE, but thats not cross plataform. Maybe you have and did a better idea.

    Thank you

  3. Hi Florent, I developed my own System.IO.SerialPort.GetPortNames() using something like this http://www.rgagnon.com/javadetails/java-0630.html then getting the \Device\USBSER00x from HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM

    In windows it does the above, in linux it gets all serial comm ports. Then with this list of portts it tests using JObexFTP that uses AT+CGMM.
    Althought it still could be better, but I still didn’t find any better way to do it.

    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *