PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Baudrate error?
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Baudrate error?
![]() |
Baudrate error? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Hi,
Did you check the serial port settings in the ctrl panel? BR Fabien Decret Windows Embedded Consultant ADENEO (ADESET) http://www.adeneo.adetelgroup.com/ On 8 mar, 21:03, "Ole" <o...@blabla.com> wrote: > 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 |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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 "Fabien" <fab_00_2002@msn.com> wrote in message news:1173386054.246327.275330@8g2000cwh.googlegroups.com... > Hi, > > Did you check the serial port settings in the ctrl panel? > > BR > > Fabien Decret > Windows Embedded Consultant > > ADENEO (ADESET) > http://www.adeneo.adetelgroup.com/ > > On 8 mar, 21:03, "Ole" <o...@blabla.com> wrote: >> 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 > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Hi,
I discovered that the port must be a Bluetooth port to show the error. Thanks Ole "Dick Grier" <dick_grierNOSPAM@.msn.com> wrote in message news:OCWR1CoYHHA.3268@TK2MSFTNGP04.phx.gbl... > 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. > |
|
|
|
#6 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#7 |
|
Guest
Posts: n/a
|
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 "Dick Grier" <dick_grierNOSPAM@.msn.com> wrote in message news:Oavm$rzYHHA.4872@TK2MSFTNGP03.phx.gbl... > 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. > |
|
|
|
#8 |
|
Guest
Posts: n/a
|
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. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

