RS-485 half-duplex on the Jetson TX2

Hi all,

Does anyone have any experience with integrating the RS-485 half-duplex interface on the Jetson TX2 platform?

We have tried to use serial_rs485 structure and enable uart RTS pin for Transmit/Receive control. For this purpose we have used serial port available on connector J17, which is accessed via /dev/ttyTHS2. This is port configuration structure:

struct serial_rs485 rs485conf = {0};
rs485conf.flags |= SER_RS485_ENABLED;
rs485conf.flags |= SER_RS485_RTS_ON_SEND;
rs485conf.flags &= ~(SER_RS485_RTS_AFTER_SEND);
rs485conf.flags &= ~(SER_RS485_RX_DURING_TX);

The result is that we get Error (25) - Inappropriate ioctl for device, so we failed to configure the port and don’t see toggling RTS pin using oscilloscope.

Any help is appreciated.

Thanks.

Hi ilija.popadic,

We don’t have experience on this, may I know the background or use casefor using this RS-485 half-duplex with TX2?

Thanks

Hi kayccc,

Thank you for response.

We would like to use this kind of interface for general purpose communication between TX2 and peripheral devices (equipment).
One of our devices is camera with RS-485 interface in half-duplex mode.

Linux generally supports this type of communication interface, but something also depends on hardware platform. We saw in serial_core.c (from TX2 kernel source) that there is some support for RS485, but it doesn’t work when we try to use it.

Do you have/need some closer information or hints what to try to make this work?

Regards,
Ilija

Hi Ilija ,

Did you manage to solve your issue? as i am trying to do a similar task as yours. If you could share your solution, it would be great.

Regards,
Nitish

Hi Nitish,

We didn’t manage to solve this issue on Jetson TX2 by using Jetson Linux resources.
We have used additional hardware component to solve this issue.

Regards,
Ilija

Hi Ilija ,

Which additional hardware did you use?

Regards,
Nitish

Hi Nitish,

Did you manage to solve this issue?

Regards,
Ilija

Yes Sr.

You need to convert from full duplex to half duplex. You can use the IC 74ls241 or any other btristate buffer.

You can search for some tutorials to use Dynamixel motors (half duplex) with raspberry (full duplex) and you will find some examples.

Btw: I got here trying to find if the Jetson had any half duplex possibility for communication.