Re: [javacint] New to TC65 development: wondering if the following scenario is possible

97 views
Skip to first unread message

Nikita Kapitonov

unread,
Jan 18, 2013, 5:00:52 AM1/18/13
to java...@googlegroups.com
Hello Wilbert!

Yes, you cannot use AT-commands when java program is running.

I suggest it is possible to create some kind of tunnel in java application that would read commands on ASC port, then send it as an AT command, then write the returned string to the ASC port back.


Best regards,
Nikita


2013/1/18 Wilbert van Dolleweerd <wil...@arentheym.com>
Hello everyone,

I'm currently using a TC65 module to send SMS messages from my application. We do this by simply sending the correct AT-commands to the serial port. Works flawlessly. However, we would like to extend this functionality. Whenever our application goes down, we would like to send an alarm SMS to a specified number.

I was thinking of doing this by deploying a Java application on the TC65. This application would receive a heart-beat signal from our application and whenever the heart-beat is lost, it would send a SMS message. However, we would still like to be able to send regular AT commands over the serial port.

When reading the Java user guide and the FAQ I saw the following statements:

Java User Guide: "Without a running Java application the module can be controlled by sending AT commands over
ASC0"

FAQ: 3 Can i use a GPRS connection with both a running java program and my PC?
No. The chip either does java or modem. You could eventually simulate a modem within a java app. But I doubt that it would be very useful.

So it looks like I cannot use the modem functionality whenever a Java app is running.

My question: Is the scenario I'm describing possible using the TC65? If not, does anyone have a suggestion on how to implement the scenario using a different strategy?

Thanks in advance!

Wilbert van Dolleweerd

--
javacint group - http://www.javacint.com/
 
 

Антон Белокрылов

unread,
Jan 18, 2013, 5:11:44 AM1/18/13
to java...@googlegroups.com
Hello Wilbert!

As Nikita said, you can open ASC0 port in Java app, read the AT commands sent by user and handle them. We used this trick to "extend" AT command set with Java app --- standard commands are handled by module, extended are implemented in app. However I suspect you'll have to handle call-related commands manually (if you are going to let the user send ATD), emulate ATE etc.

Best regards,
Anton Belokrylov


2013/1/18 Nikita Kapitonov <nikita.k...@teplomonitor.ru>

Florent Clairambault

unread,
Jan 20, 2013, 8:12:50 PM1/20/13
to javacint
There's also something that might be worth testing:

- Making a runnable class that would only copy data from an input stream to an output stream
- Opening the input and output streams of the CommConnection
- Opening the input and output streams of the ATCommand instance
- Connecting the serial's input to the at's output and the at's input to the comm's output

I have never tested it myself but according to the documentation, it should work with a lot of things, including ATD calls.

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