EGS5 GPRS Connection Style

258 views
Skip to first unread message

Robson Pierangeli

unread,
Dec 9, 2013, 2:52:14 PM12/9/13
to java...@googlegroups.com
Hi All,
    I saw several reviews saying about making a GPRS connection via AT ^ SJNET and others by AT^SISS, AT^SISW and AT^SISE. 
   What would be the safest way to prevent me from flaws in the GPRS network? 
   In case of network failure, I need to restart (shutdown) in the module?

Thanks

Robson

Nikita Kapitonov

unread,
Dec 10, 2013, 3:12:21 AM12/10/13
to java...@googlegroups.com
Hi Robson,

you better use Java interface to access GPRS.

In case of failure (I get an Exception), I retry several times, if that does not help, I go to airplane mode and backwards, then if nothing can fix it, I restart the module.

Nikita


2013/12/9 Robson Pierangeli <robson.p...@engflextecnologia.com.br>

--
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/groups/opt_out.

Timo M

unread,
Dec 11, 2013, 4:07:28 AM12/11/13
to java...@googlegroups.com
Hi Robson,

Those internet AT commands AT^SISS, AT^SISW are for different purposes.
The best way is to use java connection string with
Connector.open("socket://host.com:79;bearer_type=gprs;access_point=apn_name;username=someone;password=something;timeout=40);

And reconnect with GSM network reattachment
AT+COPS=2
AT+COPS=0


Kind regards,
Timo Medvedev
-------------------------------------------------
TC65i programming, source codes and training ->  http://www.tc65.nl

Op maandag 9 december 2013 20:52:14 UTC+1 schreef Robson Pierangeli:

Robson Pierangeli

unread,
Dec 11, 2013, 5:33:13 AM12/11/13
to java...@googlegroups.com, nikita.k...@teplomonitor.ru
Nikita, thanks for the quick response. Helped me a lot in the correct firmware architecture.

Robson

Robson Pierangeli

unread,
Dec 11, 2013, 5:38:19 AM12/11/13
to java...@googlegroups.com
Thanks for the help Timo.

Robson

Florent

unread,
Dec 11, 2013, 7:15:41 PM12/11/13
to java...@googlegroups.com
Hi,

You should definitely use the java API, AT commands create slow and messy code.

As for the GPRS selection, I personally like the "AT^SJNET=..." way because you just have to focus on the TCP/IP layer like you would do on a computer. The low level network handling can be restricted to the starting/setup code.

About disconnection, it really helps, because some mobile networks don't handle GPRS sessions correctly (they could all end-up in timeouts at midnight for example). Closing the GPRS session definitely helps. Reconnecting to the GSM network might help also. If you do a lot of connections, don't forget to close them gracefully.

I started a library (with a little help from Nikita), it's not finished yet (you should *not* use it, it's not ready yet) but you can see how APN auto-detection is just handled as one of the startup tasks ( https://github.com/fclairamb/tc65lib/blob/master/tc65libdemo/src/org/javacint/demo/StartupLoader.java#L126 ) and then other parts like HTTP performing code ( https://github.com/fclairamb/tc65lib/blob/master/tc65lib/src/org/javacint/otap/AutoUpdater.java#L145 ) don't have to take care about this.

As a general safety, your watchdog monitoring code should restart the chip when you haven't received a successful message in the last X hours from the server. This is the best failsafe mechanism in case of failures (of any kind) because it checks the complete chain).

Best regards,
Reply all
Reply to author
Forward
0 new messages