Slamtec / rplidar_sdk

Open source SDK for Slamtec RPLIDAR series products
BSD 2-Clause "Simplified" License
428 stars 262 forks source link

RPLIDAR S2 : Error, cannot bind to the specified serial port /dev/ttyUSB0. #77

Closed Abdulhadiasa closed 2 years ago

Abdulhadiasa commented 2 years ago

I am using Ubuntu 18.04, when I run sudo ./ultra_simple --channel --serial /dev/ttyUSB0 I run into the folowing Error Error, cannot bind to the specified serial port /dev/ttyUSB0. there was no new output after I added DEBUG=1 in the make command

I checked that the serial port is correct by running : dmesg | grep ttyUSB it showed : [2767580.359031] usb 1-8: cp210x converter now attached to ttyUSB0 I tried doing the make in both the master branch and feature/release-2.0 since Release Notes v2.0 shows added support for RPLIDAR-S2 with the same result

pls help

Abdulhadiasa commented 2 years ago

for those facing the same issue, I got it to work by setting baudrate to 1Million, so the run command becomes sudo ./ultra_simple --channel --serial /dev/ttyUSB0 1000000 for other models : For serial channel ./output/Linux/Release/simple_grabber --channel --serial <com port> [baudrate] The baudrate is 115200(for A2) , 256000(for A3 and S1), 1000000(for S2). I found them when running sudo ./simple_grabber