PC Review


Reply
Thread Tools Rate Thread

Baudrate error?

 
 
Ole
Guest
Posts: n/a
 
      8th Mar 2007
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


 
Reply With Quote
 
 
 
 
Fabien
Guest
Posts: n/a
 
      8th Mar 2007
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



 
Reply With Quote
 
Ole
Guest
Posts: n/a
 
      8th Mar 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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

>
>



 
Reply With Quote
 
Dick Grier
Guest
Posts: n/a
 
      9th Mar 2007
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.


 
Reply With Quote
 
Ole
Guest
Posts: n/a
 
      9th Mar 2007
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:(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
Dick Grier
Guest
Posts: n/a
 
      10th Mar 2007
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.


 
Reply With Quote
 
Ole
Guest
Posts: n/a
 
      10th Mar 2007
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$(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
Dick Grier
Guest
Posts: n/a
 
      10th Mar 2007
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial Port BaudRate ? Z.K. Microsoft C# .NET 0 8th Oct 2008 08:39 PM
USB To RS232 Interface (V1.0) BaudRate 2400bps =?Utf-8?B?UmljaF9aYXZhbGE=?= Windows XP Hardware 0 18th Jun 2005 11:41 PM
Setting baudrate of the pc UART to 50kbps? lakshmy Windows XP Help 2 27th Apr 2004 08:12 PM
Higher BaudRate than 115200 =?Utf-8?B?QW1qYWQ=?= Microsoft VB .NET 4 9th Feb 2004 10:57 PM
"USB To RS232 Interface (V1.0) BaudRate 2400bps" screwing up Sidewinder? John Smith Windows XP Hardware 0 23rd Nov 2003 11:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:59 AM.