[Mono-bugs] [Bug 445520] New: can't set 460800 or 921600 baud with System.IO.Ports. SerialPort.BaudRate

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Nov 16 18:31:57 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=445520


           Summary: can't set 460800 or 921600 baud with
                    System.IO.Ports.SerialPort.BaudRate
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: 32bit
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tombi at gmx.li
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development


description:
------------
The following problem occurs on ubuntu 8.10 (mono 1.9.1) and openSUSE 11.0 live
cd with mono 2.0.1.

I'm using a FTDI USB to Serial converter (FT232RL) which supports up to 921600
Baud. With "stty -F /dev/ttyUSB0 speed <baud rate>" I can set the baud rate to
921600. But the highest value I can set in my SerialPort instance is 230400. If
I set it to 460800 or 921600 "stty -F /dev/ttyUSB0" shows me that the device
actually runs with 9600 baud.


steps to reproduce:
-------------------
0) I think you need a device which supports at least 460800 baud.

1) run the following code and compare the values with the output from "stty -F
/dev/ttyUSB0":

using System;
using System.IO.Ports;

namespace SerialPortTest
{
    class MainClass
    {

        public static void Main(string[] args)
        {
            SerialPort sp = new SerialPort("/dev/ttyUSB0");

            sp.Open();

            sp.BaudRate = 38400;
            Console.WriteLine("stty should now display " + sp.BaudRate +
                              " baud. press a key to continue");
            Console.ReadKey();

            sp.BaudRate = 115200;
            Console.WriteLine("stty should now display " + sp.BaudRate +
                              " baud. press a key to continue");
            Console.ReadKey();

            sp.BaudRate = 230400;
            Console.WriteLine("stty should now display " + sp.BaudRate +
                              " baud. press a key to continue");
            Console.ReadKey();

            // ----- from here stty shows only 9600 baud -----
            sp.BaudRate = 460800;
            Console.WriteLine("stty should now display " + sp.BaudRate +
                              " baud. press a key to continue");
            Console.ReadKey();

            sp.BaudRate = 921600;
            Console.WriteLine("stty should now display " + sp.BaudRate +
                              " baud. press a key to continue");
            Console.ReadKey();

            sp.Close();
        }
    }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list