Cannot receive data from UART connection /dev/ttyS0

I connected the serial COM port using UART hSen3.serial pin 3 & pin4 and /dev/ttyS0.
However, I cannot receive data.
When I connect it on a Raspberry Pi with Devian, it works. I can receive data.
Could you please help me with what I should do to get the data from the UART interface?
Could I please have some document about hSen3.serial pins?
Also, I need 3.3V power. I only see 5V. Could you please help me on this?

Thank you!

Could you try to be a little more specific? Are you trying to receive or send data through hSens port? Is /dev/ttyS0 a serial port on your computer or RPi? Are you connecting RPi to Husarion or some other device which sends data through UART? What’s Devian? I’m a little confused.

Would this be helpful?

Hi Blazej,

We plan to use Leo Rover to collect sidewalk slope data.
The slope data is collected at a digital level [https://www.johnsonlevel.com/files/manuals/40-6250%20English%20Manual.pdf]
The digital level read slope. However, the digital level does not store data.

Thus, we want to transfer the slope data from the digital level to Raspberry Pi and store them as we collect them.

Since the digital level provides RS232 COM port, we use COM port to UART adapter (Adapter

Then, connect the UART port to Pi to get the data from the digital level.

After I connect the UART to hSen3, it seems like the port is open. However, I cannot read the data.
Thus, I tried with GPS module on hSen3, it works. I get the data.
However, it does not work with the digital level.
I checked the UART adapter on another Raspberry Pi and it worked.

Could you please help me with this?

Thank you very much!

I think you might have the wrong idea of how the electronics in Leo work, so let me explain it briefly:

There are actually two main components: The Raspberry Pi which acts as a mini PC and the Husarion CORE2 board which has its own microcontroller.

They communicate with each other through UART using the rosserial protocol. The CORE2 board has a firmware which controls what to send to the RPi and what data to receive.

Now, when you connect your level to the hSens port, you don’t actually connect it to the RPi. To make the data available on Rapsberry Pi, you have 3 options:

  1. Modify the firmware to read and interpret the data from the level and send it on some ROS topic to make it available on Pi.

  2. The Raspberry Pi 4 includes 4 additional UARTs which can be enabled throught device tree overlays. As the main UART port is used for communication with the CORE2 board, you can try to enable an additional one which uses non-occupied GPIO pins on RPi and connect your level directly to these pins.

  3. A simplest method would be to buy an USB <-> RS-232 converter and connect it to RPi (there is one USB port from available on top of the Rover). Then, it should be available on the system as a serial device which you can use to read data from the level.

Hi Blazej,

Thank you for your explanation!

The Leo rover that we got has a core2 v1.1 board and it does not have a USB port. It only has a micro USB port. Please refer to the attached image


Could I please request to replace my core2 board?
Could you please send me a core2 v1.0 board? Then, I will return the core2 v1.1 board that I received with my Leo Rover.

Thank you very much!

If we modify the firmware, we would not be able to update the newest firmware from the Leo team. Also, accessing the pins from Raspberry Pi GPIO is not easy due to the tight space. If you could swap the Core2 microcontroller board, that will be great!
Thank you very much!

@jungsoolim The USB port in the 1.0 version of the board is not the typical USB. It was used only to flash firmware, nothing else, and we found a way to flash it using the GPIO pins of the RPi-to-Core2-ROS interface without any need of additional connections.
In your case there’s no need of switchin to the older board and to be honest we can’t do it as we don’t have any spare ones.

I was actually referring to the mini-USB port located at the top mounting plate of the Rover. See the attached image below:

It is connected directly to the USB port on RPi. You should have received the mini-USB <-> USB adapter with your kit. It should enable you to connect the RS-232 converter.

Hi Blazej,

Yes, I got it to work. Using RS-232 to USB adapter, I can read data from ttyUSB0.
Great! Thank you very much, Blazej!