EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Stream device with non-standard baudrate
From: Dirk Zimoch <[email protected]>
To: Mark Rivers <[email protected]>, "[email protected]" <[email protected]>
Date: Tue, 12 Jun 2018 13:49:07 +0200
Maybe the USB/serial converter comes with a Windows driver that supports 3062500 baud. The Linux driver probably does not. A reason may be that termios uses baud rate codes instead of the baud rate itself. Thus there may be baud rates possible on specific hardware that cannot be used from Linux because of the too limited kernel interface.

Dirk

On 12.06.2018 12:45, Mark Rivers wrote:
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
========================================

Replies:
Re: Stream device with non-standard baudrate Dirk Zimoch
References:
Stream device with non-standard baudrate Konstantin Kr
Re: Stream device with non-standard baudrate Dirk Zimoch
Re: Stream device with non-standard baudrate Mark Rivers

Navigate by Date:
Prev: Re: Stream device with non-standard baudrate Mark Rivers
Next: Re: Stream device with non-standard baudrate Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Stream device with non-standard baudrate Mark Rivers
Next: Re: Stream device with non-standard baudrate Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 12 Jun 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·