|
From: Ларионов Д. <scu...@ya...> - 2024-09-20 19:59:59
|
> If you can use c++, there is a great library for discovering and > communicating with serial devices called QSerialPort That's... a stretch, to put it mildly. QSerialPort is a class which is a part of Qt, which in turn is an utterly gargantuan framework. Personally I find it (Qt) great and almost exclusively use it all the time instead of STL, but even I wouldn't blanket-endorse it for all situations. > On 2024-09-20 13:55, Tim Roberts wrote: > >>> How to know the ttyUSBx/ttyACMx/... name with libusb? I could see that when I >>> connect the device in the path dev/serial/by-id/ a file >>> is created where its name is the components of string >>> descriptor and it is linked with the ttyUSBx/ttyACMx/... >>> (path: /dev/tty...) file which I need to open this file >>> descriptor and start the communication. >> >> Well, hang on. If you have a ttyXXX device, then that means >> you already have a driver that is converting the USB device into >> a serial device. You cannot use libusb to talk to a /dev/ttyXXX >> device. /dev/ttyXXX speaks serial protocol, not USB protocol. > > If you can use c++, there is a great library for discovering and > communicating with serial devices called QSerialPort > > Jon |