You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the serial library of version 1.0.1 to open the FTDI USB Serial Device, but it failed. The error prompt shows garbled code.
I use the library like this:
try{
serial::Serial* m_Serial = new serial::Serial(port, baudrate, serial::Timeout::simpleTimeout(1), serial::eightbits, serial::parity_none, serial::stopbits_one);
if(m_Serial->isOpen())
{
std::cout << "serial open success" << std::endl;
}
else
{
std::cout << "serial open failed" << std::endl;
}
}
catch(std::exception& e)
{
std::cout << "serial open failed of exception: " << e.what();
}
``I gived the parameters like this:
port : /dev/ttyUSB1
baudrate: 2500000
When I debug the code, the prompt showed in the terminal like this:
"serial open failed of exception: oo/o"
When I used the serial port debugging assistant to connect the serial with the same parameters, it succeed. During the above test, I was clear the assistant was closed.
Before this test, I also tried to use the same library to open the CH341 usb serial device, and it succeeded. I was confused why? Thank you for any help.
The text was updated successfully, but these errors were encountered:
I used the serial library of version 1.0.1 to open the FTDI USB Serial Device, but it failed. The error prompt shows garbled code.
I use the library like this:
The text was updated successfully, but these errors were encountered: