Dear Abhishek, It would be easier to help you if you can post your st. cmd and also a console log from the IOC. If your computer can communicate with the device using python and the 125000 baud rate, unless there is something special happening
Dear Abhishek,
It would be easier to help you if you can post your st.cmd and also a console log from the IOC.
If your computer can communicate with the device using python and the 125000 baud rate, unless there is something special happening in the python code, you should be able to communicate using EPICS as well. There are
much better experts on this kind of issues in the community than myself, but as far as I know, the drivers do not limit the baud rate, the hardware UART does. And as you can communicate with the device, the hardware is apparently OK.
I assume you are using asyn, and your st.cmd contains something like
drvAsynSerialPortConfigure("L0",
"/dev/ttyUSB0")
asynSetOption("L0",
-1, "baud",
"115200")
asynSetOption("L0",
-1, "bits",
"8")
asynSetOption("L0",
-1, "parity",
"none")
asynSetOption("L0",
-1, "stop",
"1")
(your setup is probably different, using 125000 as the baud rate, etc.)
The IOC console log would probably give good hints about what is going wrong.
Best regards,
Timo
From:
Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Abhishek Mazumdar - STFC UKRI via Tech-talk <tech-talk at aps.anl.gov>
Reply to: Abhishek Mazumdar - STFC UKRI <abhishek.mazumdar at stfc.ac.uk>
Date: Wednesday, 28 February 2024 at 14:40
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: Reg : How to use custom baud rate such as 125000 for ioc running on Linux
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
This Message Is From an External Sender
|
This message came from outside your organization.
|
|
|
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 ?