Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Comm API and Modem Telephone Communication

 
thasli
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a problem can u help me?
Using a modem I am dialing to telephone .I am using AT command wirting
through the serial port using java Comm API and RXTX in Linux plat form ,the
phone is ringing ,but I am unable to identify wether the receiver is picked
up or not.
I am looking for a tool or software which can perform the following
functionalities.
1)Detecting when the telephone receiver is picked up
2)Trasfer the line (which modem is connected )to some other line.
3) Indicating if the line is busy or engaged.
I will be much thankfull if u can help me.
Thanks in advance
Thasli
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"thasli",
Please change your name to comply with the naming policy to which you agreed when you registered here..

For your publicly displayed name,
use a first name, a space, and a last name.

You can change your name here:
here

You can also find the naming policy here:
http://www.javaranch.com/name.jsp
Thank You!
 
Ta Ri Ki Sun
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check the event SerialPortEvent.DATA_AVAILABLE:
i'm sure you're already doing that to know its ringing to begin with.
based on the incoming data you can deal with those issues, not sure about trasferring, i haven't done that, but it should the same process

3) "BUSY 7 Busy signal detected"
so you can check if( incomingData.startsWith("BUSY"))
 
Colin Spear
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not a specifically Java problem but how the modem behaves with the AT command set.
Its been a while, so I am rusty on the commands to use. A complete set of Hayes AT commands are freely available all over the net.
To tell if a modem is currently connected, you detect a carrier, see ATOx (where x is a number)
To transfer the line, return the phone to a command state and then send it the appropriate Tone signals. (Phone is returned to command state through ATOx as above)
Also, see ATXx and ATWx commands for result codes and extended result codes for detecting such things as the carrier, busy signals, or related error conditions.
here is a link that can help:
http://vk.pp.ru/docs/hayes/00000110.htm
have fun.
Originally posted by thasli:
Hi
I have a problem can u help me?
Using a modem I am dialing to telephone .I am using AT command wirting
through the serial port using java Comm API and RXTX in Linux plat form ,the
phone is ringing ,but I am unable to identify wether the receiver is picked
up or not.
I am looking for a tool or software which can perform the following
functionalities.
1)Detecting when the telephone receiver is picked up
2)Trasfer the line (which modem is connected )to some other line.
3) Indicating if the line is busy or engaged.
I will be much thankfull if u can help me.
Thanks in advance
Thasli

AT Commands
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thasli
I,am new to port programming. I couldn't fine an AT command in comport class . How can you write this event to the modem .
thanks.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Commands to the modem are written to the serial port which the modem is connected to as lines of text starting with AT, so look at the modem docs, not the serial port docs.
(Deja-vu - I remember typing those AT commands by hand in "terminal" programs.)
Bill
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but how do you write a command . Are we not suppose to use the ComportEvent interface commands ?
Please explain . It would abe a great help to me

Originally posted by William Brogden:
Commands to the modem are written to the serial port which the modem is connected to as lines of text starting with AT, so look at the modem docs, not the serial port docs.
(Deja-vu - I remember typing those AT commands by hand in "terminal" programs.)
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic