> -----Original Message----- > From: Steinar Olsen [SMTP:steinar@NEO.NO] > Sent: Thursday, May 18, 2000 9:27 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: [OT] PIC and modem problems > > Hi, > > I use a PIC to communicate with a standard Hayes compatible modem on 9600 > baud RS-232. > The main issue is to call up the system with another modem, get the > remote modem to pick up the call automaticly, and communicate via RS-232 > to > the uProc. > > The system works fine, but there is one problem. > During the time the two modems are communicating after picking up the > call, > to set speeds and other initialising before starting the main data > comunication, > it will hang up immidiatly if it gets a input on the RS-232 port. > > This is a problem on the uProc side > beacuse the system outputs regulary data on the RS-232, and if this > output comes before the modem is finished seting up (Online indicator > lights) > the modem will hang up. > > Yes, there is a number of "no good" sollution to this, like > stop the dataoutput when reading "RING" at the RS-232, or use the > "Call indicator" and "online output" to disconnect RS-232 during > init.. > Why is this a "no good" solution? > But there must be another way to prevent this from happening. > Is there something I overlook in the AT command set? > Why is this happening, is there a meaning behind this function? > (And no, my datapakages does not contain ATH in the start. ;-) Just > numbers > and I have tried with different outputs as well) > > Help?? > Anybody?? > :-) > So if I understand correctly, you are sending data to the modem all the time, even if it isn't "on-line". IMHO this isn't a good idea. If your data ever included valid AT commands (whether you put them there on not) you could seriously screw up the settings on this modem. You really should be checking at least the Carrier Detect line and maybe the CTS line. Mike > Steinar Olsen > Electronics Engineer > ________________________________________________________________ > Norsk Elektro Optikk A/S Work: mailto:Steinar@neo.no > Home: mailto:Stolsen@c2i.net > Solheimsveien 62A Web: http://www.neo.no > P.O. Box 384 Direct: +47 67 91 11 58 > N-1471 SKAARER Phone: +47 67 97 47 00 > NORWAY Fax: +47 67 97 49 00 > ================================================================