Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problems enabling UART serial console on Orange Pi Lite 2

Featured Replies

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

 

  • Author
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.

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.

  • Author
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.

  • Author

Ok, so I received one of those CP2102 USB to serial adapters and it works well. Now my only problem is that the kernel log is replaced by the systemd log and it stops at the login prompt.

 

How do I make the serial port to just output the kernel log?

 

Thanks in advance

  • Author

I successfully disabled the login prompt by masking the getty services, kernel debug messages are printed to the console now.

 

Thanks for all the help!

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.