Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same USB / Serial Converter works in 485 mode on Mac but not Nerves #179

Open
CaptChrisD opened this issue Nov 4, 2024 · 0 comments
Open

Comments

@CaptChrisD
Copy link

Setup

  • Version: latest
  • OS: OSX and Nerves
  • Platform: MacBook / BBB

Expected Behavior

The port should be able to open on both system in RS485 mode.

Actual Behavior

I am using the waveshare USB -> RS485 convertor (uses FTDI FT232RL) and on the Mac and in Nerves. On the Mac I am able to open the port but on Nerves I get {:error, :enotty}

Steps to Reproduce the Problem

      serial_port = "/dev/ttyUSB0" # "/dev/cu.usbserial-A10KV16U" on Mac
      {:ok, port} = Circuits.UART.start_link()

      Circuits.UART.open(
        port,
        serial_port,
        speed: 250_000,
        rs485_enabled: true,
        stop_bits: 2,
        parity: :none
      )

Additional Information

The USB adapter is detected on Nerves and loads sio driver

[    9.259140] usb 1-1: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[    9.259167] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    9.259177] usb 1-1: Product: FT232R USB UART
[    9.259185] usb 1-1: Manufacturer: FTDI
[    9.259218] usb 1-1: SerialNumber: A10KV16U
[    9.262701] ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
[    9.262940] usb 1-1: Detected FT232RL
[    9.263907] usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0

The port can be opened with rs485_enabled: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant