# Need advice on usb-to-serial connection



## jkdrouter (Nov 2, 2009)

Hi.

I'm trying to connect to my switch console port with usb to serial adapter, as i don't have serial port on my laptop. I should mention that i'm fairly new to unix-like systems ie. newb if you prefer.
Before i discredit this adapter as simply not working, i'd ask some help first.

part of dmesg shows 


```
ucom0: <Prolific Technology Inc. USB-Serial Controller, class 0/0, rev 1.10/3.00, addr 2> on uhub4
```

when i plug adapter in my laptop.

but there is no ucom0 in /dev only hub4 to which ucom0 looks to be converted.

So i installed minicom and tried to log in to /dev/usb4 but to no avail. Also tried to log in to /dev/ttyd0 (no idea what's that for). 

Finally after reading some poorly written tutorial on this  i went to /usr/src/sys/modules/ucom and make; make install it. Again not really sure what I'm doing. 

On my desktop which does have serial connection and linux i simply minicom into /dev/ttyS0.

So how do i go about doing this in freeBSD with usb adapter?

Thanks for any help guys.


----------



## crsd (Nov 2, 2009)

Check FILES section in ucom manpage for list of devices it creates.


----------



## jkdrouter (Nov 2, 2009)

thank you for help,

minicom: cannot open /dev/ttyU0: Permission denied

Why Permission denied? I'm running as root.


----------



## jkdrouter (Nov 2, 2009)

```
i7-server# ls -l /dev/ttyU0
crw-------  1 root  wheel    0, 160 Nov  2 16:25 /dev/ttyU0
```


----------



## aragon (Nov 2, 2009)

Strange.  Have you tried cu(1)?


```
cu -l /dev/ttyU0
```

(~. to disconnect - same as ssh)


----------



## jkdrouter (Nov 2, 2009)

```
cu -l /dev/ttyU0 -s 9600
```

that *get's me in it says connected but then just freezes. 

dmesg when i cu in ->

```
ucom0: ucomreadcb: IOERROR
ucom0: ucomwritecb: IOERROR
```

I will have to try getting a new cable.

For now i'm just not used to seeing "permission denied" as a root! ï¿½jr whats that all about..

thx!


----------



## mickey (Nov 2, 2009)

Have you tried using the callout device (/dev/cuaU0) ?

Not sure how this applies to USB serial ports, but call-in devices (/dev/ttyXX) usually block until a hardware carrier-detect signal is present on the corresponding port.


----------



## Zauron (Sep 27, 2011)

Hi,

minicom has the sticky bit set, so it tries to open /dev/ttyU0 as uucp user.

I fixed it with: `chown -s /usr/local/bin/minicom`

Regards


----------

