Problems enabling UART serial console on Orange Pi Lite 2


Recommended Posts

I want to do some debugging in the Orange Pi Lite 2 and it requires the ability to output the kernel log to the serial console. I am using an Arduino as a TTL-to-USB serial converter (shorting the Reset and GND pins) with the TX pin from the OPi Lite 2 UART header connected to RX on the Arduino (Digital pin 0), the RX pin from OPi connected to Arduino's TX (Digital pin 1), and Ground to Ground.

 

I tried to enable the serial console by enabling all the UART overlays in armbian-config (ruart, uart1, uart2, uart3), setting the "console" environment variable to "ttyS0,115200", setting the "loglevel" variable to "7" and disabling the login on ttyS0 by executing the command "sudo systemctl disable serial-getty@ttyS0"; but it still doesn't work, the TX and RX LEDs on the Arduino never light up and no serial output is given on the other device. Am I doing something wrong or omitting something?

 

Here is my "armbianEnv.txt" file:

 

verbosity=1
console=ttyS0,115200 loglevel=7
overlay_prefix=sun50i-h6
rootdev=UUID=58a69432-a39f-4567-83e2-4696510afc4b
rootfstype=ext4
overlays=ruart uart1 uart2 uart3
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

36 minutes ago, martinayotte said:

Beware that TX output of OPiLite2 is 3.3V while your Arduino RX expect 5V, so it is maybe the reason why you don't see any output ...

Better purchase a 3.3V compatible USB-TTL dongle.

I just tried with a MAX3232 TTL-to-RS232 adapter, connecting the VCC pin from the adapter to 3.3V with no luck. I'm thinking of buying one of those cheap TTL-to-USB adapters (CP2102) if it turns out to be the only way to connect serial to this devices.

Link to post
Share on other sites

5 minutes ago, JORGETECH said:

I just tried with a MAX3232 TTL-to-RS232 adapter

Don't do that, it can burn your H5 UART, RS232 are using inverted level of +/- 9V to 12V !!!

6 minutes ago, JORGETECH said:

I'm thinking of buying one of those cheap TTL-to-USB adapters (CP2102) if it turns out to be the only way to connect serial to this devices.

Right ! Not only CP2102, but there are others, such CH340.

Seeing your footer, in the meantime, you can use your OPiZero since it has UART1 on header.

Link to post
Share on other sites

10 minutes ago, martinayotte said:

Don't do that, it can burn your H5 UART, RS232 are using inverted level of +/- 9V to 12V !!!

Good advice! I don't think anything was burnt since the UART pins still output 3.3V to the multimeter.

 

11 minutes ago, martinayotte said:

Right ! Not only CP2102, but there are others, such CH340.

Seeing your footer, in the meantime, you can use your OPiZero since it has UART1 on header.

I do have an OPi Zero to test, but I want to debug something running on the OPi Lite 2 (which has the same UART header). The MAX3232 seems to only work with the Raspberry PI (I bought it for that), I'm going to buy a better adapter and report back my findings.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

1 1