how to assign "virtual " serial port in C/C++ code ?
-
I am replacing physical cable (RS232 /EIA232) connecting PC (host/server) to a remote device (client) with Bluetooth. According to many resources – if I use “rfcomm” - as part of the (wireless) solution I need to also have “virtual (serial) port”. I need to keep the RS232 communication configuration , irregardless if rfcomm does not care about it. It needs to pass the data in SAME format as the cable did. My PC has these “devices” - one real USB to serial device and one USB to Bluetooth device. I am asking the forum - how do I assign – in C /C++ code the USB to serial device as “virtual serial port “? I am using QT QSerialPort example code application and having trouble identifying the “virtual port” to use in C / C++ code , I do not want to use command to do so. Any suggestions / code example would be appreciated , very much. PS Some documents use term pty ("pseudo-teletype" ) – is that a same as “virtual” port ? Still need to know how to assassin ...if so. https://unix.stackexchange.com/questions/127259/what-is-the-tty-major-number-of-your-unix/127260#127260 Bus 001 Device 021: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910P Bus 001 Device 020: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)