LD19 - Process the signal from the LIDAR directly

Hello everyone
I am using a FHL-LD19 for my drone project. I would like to use the LIDAR without the LD_CONTROL_SPEED_BOARD to save weight. Instead of it I want to connect the lidar directly to the pins of my Raspberry PI. Because I don’t want to use ROS I wanted to ask what kind of signal comes out of the LIDAR directly. I have already seen with a logic analyzer that there is a signal coming from the T+ pin of the LIDAR. But I was not yet able to process it because it does not follow the data protocol described in the documentation. Thanks for the help.
Best regards

Please check the wiki.

  1. lidar pinout

  2. linux development
    image

  3. communication protocol

Thank you for the quick reply. I apologize that it was not clear that I had already read the wiki. As you suggested I tried to use the SDK on Linux. Unfortunately it did not work with the error code:

input [product_type]=LD19
input [communication_mode]=serial
input [serial_port_number]=/dev/ttyUSB0
input [server_ip]=
input [server_port]=
start_node.sh: 46: [: serial: unexpected operator
start_node.sh: 55: [: serial: unexpected operator
input [communication_mode] is error.

Maybe you can tell me where I made a mistake.

And the other thing is are you sure that the data coming directly from the LIDAR follows the format from the wiki. If I connect the LIDAR directly to the Raspberry Pi without the CP2102 and try to read the data stream with for example pyserial I get no result. But if I connect the LIDAR via USB to the Raspberry with the CP2102 reading the data stream via pyserial is possible

So my question is now what am I doing wrong that I can’t read the data stream which comes directly from the Lidar?

Translated with DeepL.com (free version)

Please provide your code on pyserial.

Maybe you didn’t set the correct baud rate or the wires are not properly connected.

You can check it with some serial port debugging software.



Thank you very much for your answer. I have now found a solution to my problem. However, a new problem has now arisen, namely that the data I get from the LIDAR does not follow the format from the wiki. My new question is therefore whether there is any transformation or something similar that I need to perform to get the desired Data.

The data I get from the LIDAR looks like this:

b’l’, b’\x85’, b’\xbf’, b’\xda’, b’\xa0’, b’\xa0’, b’\xa0’, b’\x13’, b’\x13’, b’9’, b’\x7f’, b’\xa3’, b’\x02’, b’$‘, b’\x00’, b’Z’, b’[‘, b’H’, b’\xd5’, b’\xd5’, b’W’, b’Y’, b’\x85’, b’\xff’, b’\xdd’, b’\x94’, b’S’, b’M’, b’\x7f’, b’L’, b’p’, b’H’, b’\xd5’, b’\x1b’, b’\xff’, b’\x7f’, b’6’, b’\x86’, b’;‘, b’\x7f’, b’7’, b’\xe1’, b’+‘, b’\x7f’, b’\xae’, b’\xae’, b’w’, b’\x89’, b’O’, b’K’, b’~‘, b’\x95’, b’Z’, b’\x85’, b’\xff’, b’I’, b’K’, b’G’, b’?‘, b’A’, b’C’, b’A’, b’A’, b’=‘, b’\x7f’, b’\xfd’, b’\x84’, b’\x96’, b’H’, b’\xd5’, b’\x1b’, b’|‘, b’)‘, b"’“, b”‘", b’)‘, b’)‘, b’)‘, b’)‘, b’%‘, b’)‘, b’)‘, b’)‘, b"’“, b’\x84’, b’\xd5’, b’\x1b’, b’z’, b’%‘, b’#‘, b’)‘, b’)‘, b’%', b”‘", b’%‘, b’#‘, b’?‘, b’5’, b’)‘, b’%']

My pyserial code looks like this:
ser = serial.Serial(‘/dev/ttyLP3’ , 230400 , stopbits=1, )
x = ser.read()
print(x)

And I am now working on a Toradex Apalis iMX8 with an Ixora carrier board. Many thanks in advance

You need to read the data in binary format and output it in hexadecimal format.

Thank you for your answer.
Could you provide a simple source code on how to do that in python.
I have tried a few things but nothing has worked
Thank you very much for your time and help.