Simple Terminal runtime error when opening port
-
Hello all,
I am using Creator 3.3.2 (Qt 5.4.1) on OS X 10.8.5 and having trouble running "Simple Terminal".
When I am trying to open any port I get the error msg: "No such file or directory".Has anyone seen this before?
Thanks
M. -
Hi and welcome to devnet,
Can you print what port you have ? And which one is it trying to open ?
-
Currently I have the following serial devices:
Bluetooth-Modem
Bluetooth-PDA-Sync
Bluetooth-Serial-1
Bluetooth-Serial-2
usbmodem1411
I tried all of them with the same result. -
How are you setting up your serial port ?
-
Not sure I understand the question. Do you want me to copy the code from the Qt examples?
Update: I tried the same code on a friends mac running OS X 10.9.5 with Creator 3.1.2 (Qt 5.3.1) and there is no problem
-
Can you please run another example (e.g. the console enumerator), and paste here an output (for a device names and their locations)?
-
@kuzulis here is the printout:
"Port: Bluetooth-Serial-1
Location: /dev/cu.Bluetooth-Serial-1
Description: incoming port - Bluetooth-Serial-1
Manufacturer:
Serial number:
Vendor Identifier:
Product Identifier:
Busy: No
"
"Port: Bluetooth-Serial-2
Location: /dev/cu.Bluetooth-Serial-2
Description: incoming port - Bluetooth-Serial-2
Manufacturer:
Serial number:
Vendor Identifier:
Product Identifier:
Busy: No
"
"Port: Bluetooth-Modem
Location: /dev/cu.Bluetooth-Modem
Description: Bluetooth-Modem
Manufacturer:
Serial number:
Vendor Identifier:
Product Identifier:
Busy: No
"
"Port: Bluetooth-PDA-Sync
Location: /dev/cu.Bluetooth-PDA-Sync
Description: incoming port - Bluetooth-PDA-Sync
Manufacturer:
Serial number:
Vendor Identifier:
Product Identifier:
Busy: No -
Thanks, now all is clear, it is a bug in library. Recently (in Qt5.4.1) was "improved" a code for conversion from the port location to the port name and back. Was implied that on OSX the QSerialPortInfo will be returns the port name in "cu.blabla" form, but it is returns in "blabla" form. Thus the back conversion to the port location is wrong (result is "/dev/blabla" instead of "/dev/cu.blabla"). And as result - opening is failed, because this device does not exists.
So, as workaround, need to manually pass to SimpleTerminal the port name as a custom, in "cu.blabla" form.
-
@kuzulis where's that "improvement" ?
-
sorry?
in here: ab51ad6a5f4e533c31bd8e5b6f16a3bcd09a3ee6
Simply forgot to make changes and in QSerialPortInfo for MacOSX. :)
Watch for a patch: https://codereview.qt-project.org/#/c/108571/
-
@kuzulis Thanks, that solved the problem.
-
@kuzulis I wanted to see what happened that triggered the "improvement" :)
Thanks for the pointer