You should ask the manufacturer what computer hardware and software they have tested as being able to run at 3062500 baud. It does not appear on the list of supported baud rates on my Linux system either.
Mark
________________________________
From: [email protected] <[email protected]> on behalf of Dirk Zimoch <[email protected]>
Sent: Tuesday, June 12, 2018 4:51 AM
To: [email protected]
Subject: Re: Stream device with non-standard baudrate
Hello Konstantin,
StreamDevice does not talk to hardware and thus has no idea about baud
rates. It talks to the asyn driver which in turn cares about baud rates
and such.
In asyn there is a selection of supported baud rates which reflects the
"typical" baud rates supported by many systems. Look at the code in
asyn/drvAsynSerial/drvAsynSerialPort.c. There you will find the
supported baud rates in the setOption() function.
The function uses the pre-defined baud rate macros from
/usr/include/bits/termios.h. In my version, there is no entry for
3062500 baud.
In fact I find:
#define __MAX_BAUD B4000000
That means my Linux does not know how to do 3062500 baud.
If your OS knows how to do 3062500 baud, you probably have an entry like
#define B3062500 .....
in your termios.h. In that case add it to drvAsynSerialPort.c.
If you don't find it, your OS does not know how to do that baud rate.
Maybe you still can program your USB/serial device for that baud rate,
but not using the standard way that asyn uses. Maybe the documentation
of your USB/serial device mentions how to do that. If you are lucky, you
simply have to send the correct baudCode, which you can add to
setOption(). But I cannot tell you what the code for 3062500 baud is.
Dirk
On 12.06.2018 10:20, Konstantin Kr wrote:
Dear All,
I have a device which can be communicated with via serial port but at a
strange baudrate of 3062500. This value has been set by the manufacturer
and cannot be changed. So, I created a simple IOC using StreamDevice to
communicate with it. But when I run the IOC it gives me this:
*drvAsynSerialPortConfigure("SERIALPORT","/dev/ttyUSB5",0,0,0) *
*
*
*asynSetOption("SERIALPORT",-1,"baud","3062500") setOption failed
Unsupported data rate (3062500 baud)*
So, the question is: is it possible to make StreamDevice work with such
non-standard baudrate and how? If not, is there any way around it?
Thank you.
Konstantin
========================================
Dr. Konstantin Kruchinin
Researcher
ELI-Beamlines
Institute of Physics of the Czech Academy of Science
Fyzikální ústav AV CR, v.v.i.
Za Radnicí 835
Dolní Brezany 252 41
========================================