Page 1 of 1

Modem Emulation Software

Posted: Thu Oct 25, 2012 1:33 am
by swhite
Hi

I have to interface to a piece of equipment that is designed to communicate with a modem. So I was wondering if anyone had done any modem emulation with PureBasic. I can receive the modem configuration the equipment sends but I am not sure what response a real modem would give so I am not sure how to respond. As a result the equipment hangs up thinking that the modem is not working. So I am looking for information on modem emulation. I need to know the sequence of events so that I could write a Purebasic program that would act like a modem. I need to be able to send data to and receive data from this equipment.

Any suggestions or ideas appreciated.

Thanks,
Simon

Re: Modem Emulation Software

Posted: Thu Oct 25, 2012 2:37 am
by IdeasVacuum
While waiting for someone that actually knows what they are talking about (instead of me), you might like to take a look at the MVCOM lib for PB: http://marc.vitry.pagesperso-orange.fr/purebasic

Re: Modem Emulation Software

Posted: Thu Oct 25, 2012 9:18 am
by Fred
This lib is now included in PB: see 'Serial Port'

Re: Modem Emulation Software

Posted: Thu Oct 25, 2012 11:27 am
by dhouston
Modems do as they are told - they have no personality of their own. The specifics of what occurs in any modem link are determined by the communications protocol which will detail the prompts/responses required to establish and maintain the link. Communications protocols will differ from one bit of equipment to another and are specific to that equipment.

Re: Modem Emulation Software

Posted: Thu Oct 25, 2012 9:47 pm
by swhite
The equipment expects to be connected to a Hayes compatible modem at 2400 baud 7E1. I have no difficulty receiving the data it sends and the protocol of the data is documented so it seems I need to find out what the normal modem responses are to receiving initializations strings etc. so the equipment does not hang-up saying the modem is not configured.

Re: Modem Emulation Software

Posted: Fri Oct 26, 2012 2:44 am
by Demivec
swhite wrote:The equipment expects to be connected to a Hayes compatible modem at 2400 baud 7E1. I have no difficulty receiving the data it sends and the protocol of the data is documented so it seems I need to find out what the normal modem responses are to receiving initializations strings etc. so the equipment does not hang-up saying the modem is not configured.
Maybe the Hayes command set is what you are looking for?

Re: Modem Emulation Software

Posted: Sat Oct 27, 2012 10:55 pm
by infratec
It's difficult, because the answers depends on the initialization.

Normally the answer to an AT command is 'Ok'.
But after a dial command it is first 'RING' than 'ATA' and 'CONNECT'.

Than it depends on the initialization string if the modem sends echos back or not.

If the modem hangs up it sends an 'ATH'.

The easiest way is to 'listen' a real communication.

Bernd