RS232 connection to an Arduino

Hello!

I cannot find much documentation about how to connect from the Jetson Orin AGX (Ubuntu) to a second board using RS232. In my case, the second board is is a shield, sitting on an Arduino Duo.

Following to the userguide page 19/30, I connected P

  • IN31 (Ground)
  • PIN 35 (RS232A_TX/) and
  • PIN 35 (RS232A_RX/)

of the “40 pin General Purpose 3.3V I/O Connector” to the Arduino shields RS232 interface. Now, I’d like to check if the connection works.

  • When I plug in the cables, I cannot see any log entry using dmesg in the jetson.
  • I cannot detect a new entry in /dev/ in the jetson.
  • Also I do not know which serial-connection properties (baudrate etc.) are supported.

Can you please advise on these three things?

My end-goal is to send and receive data between both boards using Python. Bur for a start, I use minicom.

Thank You in advance.

Hi,
Here are some suggestions for the common issues:

1. Performance

Please run the below command before benchmarking deep learning use case:

$ sudo nvpmodel -m 0
$ sudo jetson_clocks

2. Installation

Installation guide of deep learning frameworks on Jetson:

3. Tutorial

Startup deep learning tutorial:

4. Report issue

If these suggestions don’t help and you want to report an issue to us, please attach the model, command/step, and the customized app (if any) with us to reproduce locally.

Thanks!

Hi dejhost,

It seems you are using the custom carrier board from Connect Tech.
What’s the Jetpack version in use?

Which UART interface are you using?

Please share the full serial console log for further check.
You should be able to get that log through Micro-USB port.
image

Hi!
Thank you for looking into this.

  1. Jetpack4. : Version: 5.1.1-b56.
  2. UART interface. Not sure what you are asking here. In the user manual, it says “RS232A ttyTHS1 serial@3110000”,
  3. full serial console log: I cannot connect using the RS232 connection so far. I have tried logging it using:
  • usb-cable between jetson and the usb-port of my arduino due
  • Minicom
  • The Arduino code below.

But minicoms says Device /dev/ttyTHS1 is locked when I type minicom -D /dev/ttyTHS1 -b 115200
The logfile stays empty.

This is the arduino code I use:

void setup() {
    Serial.begin(115200); // USB Serial for logging
    while (!Serial) {}    // Wait for Serial to be ready

    Serial1.begin(9600);  // RS232 UART Serial for Jetson communication
    Serial.println("Starting RS232 troubleshooting with Jetson...");
}

void loop() {
    // Check for data from Jetson over RS232 and log it over USB Serial
    if (Serial1.available()) {
        char rs232Data = Serial1.read();
        Serial.print("Received from RS232 (Jetson): ");
        Serial.println(rs232Data);
    }

    // Send data from USB serial to RS232 (Jetson) for bidirectional testing
    if (Serial.available()) {
        char usbData = Serial.read();
        Serial1.write(usbData); // Send to Jetson
        Serial.print("Sent to RS232 (Jetson): ");
        Serial.println(usbData);
    }

    delay(10);  // Small delay to prevent overwhelming serial interface
}

Are you using JP4 or JP5.1.1?

Okay, it seems UART5 on AGX Orin (uartb).

Do you get /dev/ttyACM0 from your host after connecting the micro-USB port?
If so, please open that port from your host and you should get the serial console log.

The Jetpack is version:

Package: nvidia-jetpack
Version: 5.1.1-b56

Sorry I - don’t know how the “4” sneaked in there in my previous post.

Yes, /dev/ttyACM0 apears when I connect to the arduino through USB. I also created a udev-rule, so I can address the arduino as /dev/due.

minicom -D /dev/due -b 9600

I wrote a little .ino-skript that sends “Hello” once a second.I can see this text in the minicom log.

But plugging in the RS232 connector doesn’t add any device in /dev/.

Please share how the block diagram of your conenctions.

Why you said PIN35 for both TX/RX of RS232?

If you want to connect the peripheral device like Arduino through UART interface, you can just connect them from PIN6(GND), PIN8(UART1_TX), PIN10(UART1_RX) of 40-Pin Expansion Header(J30) on AGX Orin.

I reviewed the cableing and here is the new block-diagram:

I am using the 40 pin General Purpose 3.3V I/O Connector. It seems, that the PIN configuration is different for my custom carrier board from Connect Tech.

Do you mean PIN31, PIN33, PIN34 of 40-pins expansion header?

Please share the full dmesg and device tree for further check.

The userguide refers to the connector as “40 pin General Purpose 3.3V I/O Connector”

attached you will find the two requested files: dmesg-log and the device tree

dmesg.txt (84.5 KB)
devicetree.txt (412.0 KB)

It seems they have totally different pin usage for 40-pins expansion header on custom carrier board.
You have to check with your vendor(Connect Tech) about the pinmux configuration and usage for RS232.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.