I have installed Ubuntu on VirtualBox as guest and the host is Windows10, I'm working on serial programming and I have made the following configurations for serial port in VirtualBox
This is my code running on Ubuntu in VirtualBox :
...
int main() {
// Open a serial port.
int serial_com = open("COM1", O_RDWR);
if (serial_com < 0) {
cout << "Error while opening device..." << "errno = " << errno << endl;
exit(1);
}
...
However, when I run the program, after connecting my gps with usbuart converter, I get this error:
Error while opening device... errno=2
I tried also names for port path like /dev/ttySX
Where X = 0, 1, 2, 3 but it didn't work it gives me errno:13
Are my configurations correct for serial port in the VirtualBox?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…