[RESOLVED] Manipulating sound data FROM a modem (this is prob. one for the techies :-))
I've been considering this idea for a while (I specifically need it for something :-))
The idea is simple...I want to record a 2-way data conversation over a phone line as I have a piece of hardware which communicates with its server and I want to know what it sends and receives. I can handle the "listener" section that goes on the wire between the device and the wall, but I am thinking about how easy it would be to decode the data from a *saved* WAV file. The WAV, I assume, would have 2-way traffic divided into two lines (left and right audio, perhaps, or maye stored in 2 WAV files, I dunno)
Basically, how simple do people think it would be to convert the tones to values (0-255 a byte at a time, I would assume, although 0 and 1...which would then be converted to 0-255...would work just as well)?
I'm sure there must be a way to do this...although I am sure there would be tons of complications :-)
(BTW, excuse my not replying if anyone answers...I'm off to work until about 8pm, about 8 hours after this is posted...I'll read the replies when I get back and make any replies I need to :-))
Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))
Assuming you're talking about a data connection over the phone line (like using a modem to connect to another modem, or to your ISP), you can't do that in VB, you'd have to use the sound card to decode it. You're talking about phase modulation, and there's nothing in VB that would allow you to determine phase change in an audio wave form. Depending on how you recorded it, the phase information might not even be recorded accurately enough to recover the data.
Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))
Let's assume for the moment that the audio was saved as a WAV file to my HD at the right frequency to allow for decoding to values that can be built into recognisable data...if it was 56k modem data, that should be about 60000 bytes of data being sent per second (and recorded) so
Alternatively, would it be easier to have a VB program acting as a passthrough and taking in and sending out data from both sides and using the PC's modem to send the data out? Or some way of recording electrical charge changes in the line and storing the timecode (millisecond) to rebuild the data as a string of 0s and 1s? The last might need something more powerful than VB though :-)
I probably will never actually do this if it is as difficult as I think it will be...if I don't get the recording frequency right when recording the WAV then the data I need will be partially (or fully) corrupted.
(and I'm not home...well, I am, but I am off again soon :-))
Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))
Quote:
Originally Posted by smUX
Let's assume for the moment that the audio was saved as a WAV file to my HD at the right frequency to allow for decoding to values that can be built into recognisable data.
You'd need at least 20 samples per cycle (10/half cycle to be able to distinguish a 90 degree phase change fairly reliably) at the highest bit rate.
Quote:
...if it was 56k modem data, that should be about 60000 bytes of data being sent per second
Which would need about 1.2Meg sample/second - a little more difficult than the normal 44k used for fairly decent audio. Even a tape recording of modem tones is difficult for a modem to decode - the slight variation in tape speed messes everything up even at 2400 bps.
Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))
I had a feeling it would be too difficult...maybe there's ways to filter the data to calculate what the values are or something, but I'm not experienced enough to do it...case closed for now, I guess...I'll resolve it.
Thanks, Al
Re: Manipulating sound data FROM a modem (this is prob. one for the techies :-))
Quote:
Originally Posted by smUX
maybe there's ways to filter the data to calculate what the values are or something
It's why modem manufacturers usually buy a Rockwell modem chipset - "easy" is something not associated with phase detection in software. Think "bald", "head-shaped hole in wall", etc.
But if you learn to manipulate the sound card, there are lots of things you can do - probably even decode raw modem audio. I know you can decode fax audio and similar data using one.