Baudrate error?

  • Thread starter Thread starter Ole
  • Start date Start date
O

Ole

Hi,

I'm using the serial port on a Pocket PC (Mobile 2003 - CF 2.0) in my
application, but when i try to set the Baud rate like:
MyPort.BaudRate = 115200;

I get this exception:
{System.ArgumentOutOfRangeException: Argument must be between 0 and 65536.
Parameter name: baudRate
at System.IO.Ports.SerialStream.set_BaudRate()
at System.IO.Ports.SerialPort.set_BaudRate()
....}

But I know for sure that my device support a baud rate of 115200 (have used
it several times in other applications)

Any idea what could be wrong??
Your help is highly appreciated!

Thanks,
Ole
 
I'm not sure I did understand your question - what do you mean by control
panel (it's a Pocket PC). I did succesfully use a baudrate of 115200 on the
very same Pocket PC by using calls to the API.

Thanks
Ole
 
Hi,

I do not see this error (though I am using WM5). Can you double-check to
make sure that there isn't a typo?

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Hi,

BT speed is not material. I suppose there is some sort of driver error.

Can you trap the error and try another speed? Since BT virtual ports don't
rely on the bitrate, this may work for you.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Hi,

I wrote a message yesterday (called 'Bug report') regarding this issue - the
bug seems to be located in the CF layer as there is no problem when using
the API.

Thanks
Ole
 
Hi,

I'm surprised that your API call works and the SerialPort call doesn't. The
underlying API should be the same.

Have you tried other classes, such as CFSerial from my homepage, and
OpenNETCF.org?

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Back
Top