Failed to connect to local socket /dev/ttyUSB0

Discussions related to using VirtualBox on Linux hosts.
Post Reply
TylerMD
Posts: 2
Joined: 23. Jun 2008, 21:29

Failed to connect to local socket /dev/ttyUSB0

Post by TylerMD »

Hi,

I'm trying to pipe the host's serial port /dev/ttyUSB0 to guest's (Windows XP) COM1 but I'm getting the following error:

Code: Select all

NamedPipe#0 failed to connect to local socket /dev/ttyUSB0.
VBox status code: -461 (VERR_NET_CONNECTION_REFUSED).

Result Code: 
0x80004005
Component: 
Console
Interface: 
IConsole {d5a1cbda-f5d7-4824-9afe-d640c94c7dcf}
Host is Arch Linux i686 with a 2.6.25 kernel.
Guest is Windows XP SP2.

I'm trying to map it with the following configuration:
Port number COM1.
Port mode Host Pipe.
Create pipe: disabled.
Port path: /dev/ttyUSB0

I'm running VirtualBox non-free 1.6.2 with "sudo" so permissions shouldn't be a problem. However, also tried to change them without success.

The serial port is in fact a USB to serial converter that seems to be properly detected by Linux:

Code: Select all

lrwxrwxrwx 1 root root 8 2008-06-23 21:30 /dev/ttyUSB0 -> tts/USB0
crw-rw---- 1 root uucp 188, 0 2008-06-23 21:30 /dev/tts/USB0
I am member of uucp group. Same results with /dev/tts/USB0.

Code: Select all

$ sudo setserial -a /dev/tts/USB0 
/dev/tts/USB0, Line 0, UART: unknown, Port: 0x0000, IRQ: 0
        Baud_base: 24000000, close_delay: 0, divisor: 0
        closing_wait: infinte
        Flags: spd_normal low_latency
I get no errors when issuing "echo" or "cat" on the device.

Any ideas? I'm completely stuck with this. Thanks in advance!
aeichner
Oracle Corporation
Posts: 196
Joined: 31. Aug 2007, 19:12

Post by aeichner »

You have to use Host device as port mode to be able to use the physical serial device of your computer or a serial to usb converter
TylerMD
Posts: 2
Joined: 23. Jun 2008, 21:29

Post by TylerMD »

thanks!!! That let me boot the machine and install the COM1 port as a new device.

Now I'm getting errors when using the port with my application and experiencing the problem of long time shutdowns. I'll keep working on it.
Post Reply