Greetings,

I have been trying to perform modem communications for a
few weeks now without any success.

Using Dick Grier's wrapper, I have been able to connect
to Hyperterminal on my desktop and push keystrokes.

However, when I plug into my modem, it seems that the
modem refuses to process my AT commands. I have tried
the same modem using a full framework serial app and have
had no problems.

One thing I do notice is that the Terminal Ready light on
my modem is not on when I open the serial port using CF.

My connection settings are as follows:

CFSerialClass.SerialIO.SerialPort serial = new
CFSerialClass.SerialIO.SerialPort();
serial.EnableOnComm = true;
serial.CommPort = 1;
serial.BitRate = 57600;
serial.Parity = "N";
serial.DataBits = 8;
serial.StopBits = 1;
serial.PortOpen = true;
serial.Output("ATDT#######" + (char)13);
MessageBox.Show("wait");
serial.PortOpen = false;

Any ideas what might be going wrong?

Cheers, Ian Williamson

Re: Serial Comms w/ modem making me crazy by James

James
Thu Oct 09 22:16:28 CDT 2003

code looks fine, although maybe try & vbcrlf instead of (chr)13?

"One thing I do notice is that the Terminal Ready light on
my modem is not on when I open the serial port using CF."

suggests that the modem is waiting for DTR (Data Terminal ready) to be
raised by the device. Perhaps your device only has a 3 wire serial port?
(such as an iPaq) This would explain why your full framework app works
(your PC probably has a full function 9 wire serial port )

Also - if it still doesn't work - your modem might be set to hardware flow
control (3 wire rs232 doesn't have CTS or RTS, only TXD,RXD and GND). You
can probably get around this by setting the modem to use software or no flow
control using an AT command from hyperterminal on your PC. (AT&K4 from
memory - might be different for your modem though)

If this doesn't work - maybe you are just crazy?

"Ian Williamson" <bmcpeake@nospam.shaw.ca> wrote in message
news:06ab01c38ebc$52cba720$a401280a@phx.gbl...
> Greetings,
>
> I have been trying to perform modem communications for a
> few weeks now without any success.
>
> Using Dick Grier's wrapper, I have been able to connect
> to Hyperterminal on my desktop and push keystrokes.
>
> However, when I plug into my modem, it seems that the
> modem refuses to process my AT commands. I have tried
> the same modem using a full framework serial app and have
> had no problems.
>
> One thing I do notice is that the Terminal Ready light on
> my modem is not on when I open the serial port using CF.
>
> My connection settings are as follows:
>
> CFSerialClass.SerialIO.SerialPort serial = new
> CFSerialClass.SerialIO.SerialPort();
> serial.EnableOnComm = true;
> serial.CommPort = 1;
> serial.BitRate = 57600;
> serial.Parity = "N";
> serial.DataBits = 8;
> serial.StopBits = 1;
> serial.PortOpen = true;
> serial.Output("ATDT#######" + (char)13);
> MessageBox.Show("wait");
> serial.PortOpen = false;
>
> Any ideas what might be going wrong?
>
> Cheers, Ian Williamson
>
>



Re: Serial Comms w/ modem making me crazy by Dick

Dick
Fri Oct 10 12:48:48 CDT 2003

Hi,

Did you set DTREnable = True?

I don't see this in your code. Also... RTSEnable = True will be required by
most modems.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.



Re: Serial Comms w/ modem making me crazy by Ian

Ian
Fri Oct 10 12:50:43 CDT 2003

And there it was staring me in the face. A simple flip
of the DTR override jumper on the modem and I am in
business. Forest for the trees, yadda, yadda.

Thanks for waking me up James, although I still think I
might be crazy.

Cheers.

>-----Original Message-----
>code looks fine, although maybe try & vbcrlf instead of
(chr)13?
>
>"One thing I do notice is that the Terminal Ready light
on
>my modem is not on when I open the serial port using CF."
>
>suggests that the modem is waiting for DTR (Data
Terminal ready) to be
>raised by the device. Perhaps your device only has a 3
wire serial port?
>(such as an iPaq) This would explain why your full
framework app works
>(your PC probably has a full function 9 wire serial
port )
>
>Also - if it still doesn't work - your modem might be
set to hardware flow
>control (3 wire rs232 doesn't have CTS or RTS, only
TXD,RXD and GND). You
>can probably get around this by setting the modem to use
software or no flow
>control using an AT command from hyperterminal on your
PC. (AT&K4 from
>memory - might be different for your modem though)
>
>If this doesn't work - maybe you are just crazy?
>
>"Ian Williamson" <bmcpeake@nospam.shaw.ca> wrote in
message
>news:06ab01c38ebc$52cba720$a401280a@phx.gbl...
>> Greetings,
>>
>> I have been trying to perform modem communications for
a
>> few weeks now without any success.
>>
>> Using Dick Grier's wrapper, I have been able to connect
>> to Hyperterminal on my desktop and push keystrokes.
>>
>> However, when I plug into my modem, it seems that the
>> modem refuses to process my AT commands. I have tried
>> the same modem using a full framework serial app and
have
>> had no problems.
>>
>> One thing I do notice is that the Terminal Ready light
on
>> my modem is not on when I open the serial port using
CF.
>>
>> My connection settings are as follows:
>>
>> CFSerialClass.SerialIO.SerialPort serial = new
>> CFSerialClass.SerialIO.SerialPort();
>> serial.EnableOnComm = true;
>> serial.CommPort = 1;
>> serial.BitRate = 57600;
>> serial.Parity = "N";
>> serial.DataBits = 8;
>> serial.StopBits = 1;
>> serial.PortOpen = true;
>> serial.Output("ATDT#######" + (char)13);
>> MessageBox.Show("wait");
>> serial.PortOpen = false;
>>
>> Any ideas what might be going wrong?
>>
>> Cheers, Ian Williamson
>>
>>
>
>
>.
>

Re: Serial Comms w/ modem making me crazy by Dick

Dick
Sat Oct 11 15:43:34 CDT 2003

Hi Ian,

Don't change the DIP switch. You may want to use DTR to force a modem
disconnect. Use the software properties, DTREnable and RTSEnable to control
the state of these control lines.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.