cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
403
Views
0
Helpful
3
Replies

Configuration Issues : Serial RS485 Modbus data in a Cisco IR1835

atheerth
Level 1
Level 1

Hello community,

I'm encountering an issue while trying to run an RS485 Modbus RTU script on a Cisco IR1835 router. The script is designed to collect flow sensor data and send it to Azure IoT Hub. I'm hoping someone can help me troubleshoot this problem.

Background:

  • The script was previously working on a Cisco IR829 router.
  • We're now trying to run it on a Cisco IR1835 router (standalone, not onboarded to any NMS).
  • We're using Python version 3.11

Issue: We're encountering an error at the serial.Serial function. The script is attempting to use the serial port defined by the HOST_DEV1 environment variable, which should map to /dev/ttySerial1 on the IR1835.

We've done some debugging by entering inside the container and deploying dummy scripts, but we're still facing issues.
attached the screenshot of debugging inside iox app and running config

  • Screenshot 2024-08-29 223240.png

Our use case is to collect flow sensor data via Modbus RTU and transmit it to Azure IoT Hub for further processing and analysis.

Has anyone encountered similar issues or have suggestions on how to resolve this? Any assistance would be greatly appreciated.

Thank you in advance for your help!

1 Accepted Solution

Accepted Solutions

Emmanuel Tychon
Cisco Employee
Cisco Employee

Hello, 

Since you are using /dev/ttySerial1 can you please try to configure:

relay line 0/2/1 0/0/1

(you currently have "relay line 0/2/1 0/0/0")


View solution in original post

3 Replies 3

Emmanuel Tychon
Cisco Employee
Cisco Employee

Hello, 

IR829 was using Classic IOS, while IR1835 runs IOS-XE. A number of changes have been done under the hood, such a removing the Hypervisior and running IOx directly on the underlying Linux kernel. That being said this should work, so let's investigate. 

First of all all have you configured the required commands in IOS-XE config to enable passing the serial data to IOx?
https://www.cisco.com/c/en/us/td/docs/routers/access/IR1800/software/b-cisco-ir1800-scg/m_serial-relay.html

Can you read data using non-Python commands? (such as "cat")

Thanks,
Emmanuel

Thanks for your response.

we tried with non python command .
Screenshot 2024-09-12 181853.png
serial data was simulated but still not able to access the serial port. 
in dockerfile the base image is  arm64v8/python:3.11-slim-buster.
also in config i have the below things.

interface Async0/2/1
no ip address
encapsulation relay-line
media-type rs485
half-duplex
!

line 0/0/0 0/0/1
line 0/2/0 0/2/1
line vty 0 4
login
length 0
transport input ssh
line vty 5 14
login
transport input ssh
!
relay line 0/2/1 0/0/0


 

 
 



Emmanuel Tychon
Cisco Employee
Cisco Employee

Hello, 

Since you are using /dev/ttySerial1 can you please try to configure:

relay line 0/2/1 0/0/1

(you currently have "relay line 0/2/1 0/0/0")