PDA

View Full Version : Reading modem data over phone line



nika
05-09-2006, 01:46 PM
Hey everyone I need a little bit of help.
I would like to log data transmitted by a modem over my phoneline. The interface im using is a 250v cap connected to a 600ohm transformer and that connected to my stamp. To start off I would like to pipe the data to the debug window as it is being recived. I don't need help with the code as much as I need help with the baud rate and such. I'm sure this has been done before, any links would be appreciated. Thanks, nik

stamptrol
05-09-2006, 08:08 PM
Nika,

Set up one modem to auto answer, any reasonable baudrate. Its serial data will be sent to the Stamp which will then re-send it to the debug window.

At the remote end, the other modem will dial the stamp's modem, connect and send the data from whatever source is there.

Other than getting the remote modem to dial, ( it can be done maually, or the remote data source may be smart enough) this is a pretty straight-forward exercise.

From your description of the cap and transformer, it sounds more like you're trying to read DTMF signals, without a modem.

Cheers

nika
05-09-2006, 09:14 PM
Would it be possible to use the SERIN command to read the data between two modems from the simple interface I described and display it in the debug window? I really don't want to add another modem.

allanlane5
05-09-2006, 11:18 PM
No.

The signal a modem puts on the phone line is called "DTMF". It's NOT RS-232. It uses various 'tones' to signal to the other modem the state of the bits. The only way to recieve this signal is with a DTMF reciever. And the cheapest, easiest, and most reliable way to get a DTMF reciever is ... to buy another modem.

And the BS2 is not the most reliable module to use for this in any event. Since it's single-tasking, you must be 'pended' in a SERIN command to get serial data. Then, when you're sending that data one, you're no longer 'listening', and can miss data.

Having said all that, the best way to implement what you want is a PC, with two serial ports (possibly a USB to 4 serial port adapter) and write a VB program to 'listen' to both sides of the 'conversation' on the RS-232 line BEFORE it gets to the modem.

nika
05-09-2006, 11:53 PM
Ah ok thanks, I totally misunderstood the protocol. Thanks, nik

Bruce Bates
05-09-2006, 11:56 PM
Allan -

A bi-level modulated signal is output from a telephone modem, but it it by no means DTMF. DTMF are specific tones pairs, usually output from a telephone style keypad, or by a computer or microcontroller.

Whether one uses a modem between two Stamps or not, is pretty much defined by the transport layer between them, or by the distance that must be spanned. Short haul, one can go Stamp-to-Stamp without a modem (SEROUT ==> SERIN).

Regards,

Bruce Bates

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->