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  2018  2019  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  2018  2019  2020  2021  2022  2023  <2024
<== Date ==> <== Thread ==>

Subject: Re: Reg : How to use custom baud rate such as 125000 for ioc running on Linux
From: Mrinal Bera via Tech-talk <tech-talk at aps.anl.gov>
To: Abhishek Mazumdar - STFC UKRI <abhishek.mazumdar at stfc.ac.uk>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 28 Feb 2024 19:35:09 +0000
Hi Abhishek, Maybe you can run this script as root/sudo to check the supported baud rates in your linux system: ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
Hi Abhishek,
Maybe you can run this script as root/sudo to check the supported baud rates in your linux system:

for bauds in $(
    sed -r 's/^#define\s+B([1-9][0-9]+)\s+.*/\1/p;d' \
        /usr/include/asm-generic/termbits*.h ) ;do
    echo $bauds
    stty -F /dev/ttyS0 $bauds && echo Ok.
done  2>&1 |
    pr -at2
The output of the script on RHEL-8 system, I am running in one of my computer looks like this:

50     Ok.

75     Ok.

110     Ok.

134     Ok.

150     Ok.

200     Ok.

300     Ok.

600     Ok.

1200     Ok.

1800     Ok.

2400     Ok.

4800     Ok.

9600     Ok.

19200     Ok.

38400     Ok.

57600     Ok.

115200     Ok.

230400     Ok.

460800     Ok.

500000     Ok.

576000     Ok.

921600     Ok.

1000000     Ok.

1152000     Ok.

1500000     Ok.

2000000     stty: /dev/ttyS0: unable to perform

2500000     stty: /dev/ttyS0: unable to perform

3000000     stty: /dev/ttyS0: unable to perform

3500000     stty: /dev/ttyS0: unable to perform

4000000     stty: /dev/ttyS0: unable to perform



Best,
Mrinal



On Feb 28, 2024, at 4:42 AM, Abhishek Mazumdar - STFC UKRI via Tech-talk <tech-talk at aps.anl.gov> wrote:

This Message Is From an External Sender
This message came from outside your organization.
Hello,

I am running an ioc for a device in linux which supports 125000 baud rate using UART communication.

The vendor of the device has provided python libraries through which I am able to communicate with the device without any issues.
The vendor's python libraries uses python serial package to communicate with the port /dev/ttyUSB1 (for example) using baud rate 125000.

But when I am using the baud rate 125000 in my ioc's st.cmd , I am not able to communicate with the device.

How to communicate with the device using 125000 baudrate using EPICs IOC ?

Thanks,
Abhishek Mazumdar


References:
Reg : How to use custom baud rate such as 125000 for ioc running on Linux Abhishek Mazumdar - STFC UKRI via Tech-talk

Navigate by Date:
Prev: Re: Reg : How to use custom baud rate such as 125000 for ioc running on Linux Mrinal Bera via Tech-talk
Next: archiver appliance quickstart installation Rong Huang via Tech-talk
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  2018  2019  2020  2021  2022  2023  <2024
Navigate by Thread:
Prev: Re: Reg : How to use custom baud rate such as 125000 for ioc running on Linux Mrinal Bera via Tech-talk
Next: Re: Reg : How to use custom baud rate such as 125000 for ioc running on Linux Timo Korhonen via Tech-talk
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  2018  2019  2020  2021  2022  2023  <2024
ANJ, 11 Sep 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·