Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
GHIElectronics.com
Home
Help
Search
Login
Register
GHI Electronics LLC
>
.NET Micro Framework Devices
>
Embedded Master
>
SerialUSB not changing baudrate
Pages: [
1
]
« previous
next »
Print
Author
Topic: SerialUSB not changing baudrate (Read 257 times)
tomLessing
Newbie
Posts: 12
SerialUSB not changing baudrate
«
on:
April 19, 2010, 06:12:14 PM »
I am trying to change the baudrate on the SerialUSB class but no luck it seems. I have an almost identical piece of code for windows that works well if you open and close the port but I have tried all kinds of tricks on MF.NET like flushing, discarding buffers.
Any help would be appreciated. According to the documentation you can change the baudrate but there is no close like in windows.
MF.NET Snippet:
serial.Write(sendBuffer, 0, sendBuffer.Length);
serial.Flush();
serial.Baudrate = 9600;
serial.DiscardInBuffer();
serial.DiscardOutBuffer();
serial.Open();
Thread.Sleep(500);
bytesRead = serial.Read(readBuffer, 0, 500);
Debug.Print(MyExtensions.ConvertToString(readBuffer, bytesRead));
Windows snippet:
serial.Write(sendBuffer, 0, sendBuffer.Length);
Thread.Sleep(200);
serial.Close();
serial.BaudRate = 9600;
serial.Open();
Thread.Sleep(600);
bytesRead = serial.Read(readBuffer, 0, 500);
Debug.Print(ConvertToString(readBuffer, bytesRead));
Logged
tomLessing
Newbie
Posts: 12
Re: SerialUSB not changing baudrate
«
Reply #1 on:
April 19, 2010, 06:25:17 PM »
O, the serial USB chip is an FTDI chip, according to the documentation there are no known issues and it is not mentioned that you cannot change the serial settings like with the other chips.
From the docs:
FTDI:
No known issues.
SiLabs:
No handshake support.
Serial settings cannot be changed after creating the object.
Prolific:
No handshake support.
Serial settings cannot be changed after creating the object.
CDC:
No handshake support.
Logged
SupportAdmin
Administrator
Hero Member
Posts: 5516
Re: SerialUSB not changing baudrate
«
Reply #2 on:
April 19, 2010, 07:55:53 PM »
Is this on 3.0 or 4.0?
Logged
GHI_Support
Administrator
Hero Member
Posts: 1295
Re: SerialUSB not changing baudrate
«
Reply #3 on:
April 20, 2010, 08:26:40 AM »
When you insert it, did you get a FTDI device type?
What is the before and after baudrates you are changing?
Open you serial port with baudrate, does it work? new SerialPort(...9600...);
Make sure you are using the latest firmawre.
Logged
tomLessing
Newbie
Posts: 12
Re: SerialUSB not changing baudrate
«
Reply #4 on:
April 22, 2010, 07:40:40 AM »
The version I am using is 3.0.
When I insert the device it reports FTDI device type
Before baudrate is 300 and after should be 9600 but once I change the baudrate I don't get a response which strongly suggests that it is not reading the serial data.
Initially I configure the serial for 7 bit, even parity, 1 stop bit and then all I change is the baudrate
Logged
GHI_Support
Administrator
Hero Member
Posts: 1295
Re: SerialUSB not changing baudrate
«
Reply #5 on:
April 22, 2010, 03:12:04 PM »
Please try with a simple C# program and a terminal program on PC. It is possible that the other end of the communication (not EM) is not changing baudrate correctly too...
If you can generate with a simple program, we can look into it. It should be working fine.
Please test on latest V4.
Logged
tomLessing
Newbie
Posts: 12
Re: SerialUSB not changing baudrate
«
Reply #6 on:
May 04, 2010, 10:38:01 AM »
Doing that will be difficult as my USB serial device is optical and I only have one optical serial port lying around. As mentioned earlier I use virtually the same code for windows with exactly the same serial usb optical link and it works fine.
The baudrate just doesn't want to change it seems.
Any help will be appreciated.
Logged
GHI_Support
Administrator
Hero Member
Posts: 1295
Re: SerialUSB not changing baudrate
«
Reply #7 on:
May 04, 2010, 10:45:13 AM »
We tested changing baudrate and it is working fine on our FTDI serial cables with latest version 4.
Logged
tomLessing
Newbie
Posts: 12
Re: SerialUSB not changing baudrate
«
Reply #8 on:
May 06, 2010, 06:20:50 AM »
Upgraded to version 4 and it fixed the issue.
When do you anticipate to release the USB client for version 4.0?
Logged
SupportAdmin
Administrator
Hero Member
Posts: 5516
Re: SerialUSB not changing baudrate
«
Reply #9 on:
May 06, 2010, 07:50:08 AM »
It is all done so it should be anytime now. Maybe 2 more weeks? That is the release of 4.0. For the client support, it will be another month.
«
Last Edit: May 06, 2010, 10:40:21 AM by SupportAdmin
»
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
.NET Micro Framework Devices
-----------------------------
=> General Discussion
=> ChipworkX
=> EMX
=> Embedded Master
=> USBizi
-----------------------------
FAT File System Chipsets and OEM Boards
-----------------------------
=> General Discussion
=> uALFAT
=> USBwiz
Loading...