• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Modbus identifying serial ports

    Modbus4J general discussion
    2
    2
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vijay chelliah
      last edited by

      I'm working on a data acquisition system wchich should work on linux laptop and i am using Modbus4J and have implemented my own serial port wrapper which will by default ask for port-name(String) which is usually (/dev/ttyUSB1, /dev/ttyUSB2, etc)

      But to my surprise the dev path to USB aren't constant and keeps changing in the order of connection.

      when I connect two serial port converts to two USD ports the first connected ones take /dev/ttyUSB0 and the later /dev/ttyUSB1. This is an issue.

      How is should have been done actually?

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by phildunlap

        Hi vijay,

        There may be more than one solution, but we have solved this on our MangoES product for instance by using udev rules to create a symlink with a consistent name. In our case, we used the attributes identifying which USB port the device was connected to. You may find this stack exchange thread helpful: https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name

        You'll need to use udevadm to find the attributes to identify the port by, and then a /etc/udev/rules.d/ rule to SYMLINK+="ttyNewSymlinkName"

        1 Reply Last reply Reply Quote 0
        • First post
          Last post