usb/158650: uplcom USB To COM Device doesn't transmit data, only receive

Hans Petter Selasky hselasky at c2i.net
Wed Jul 6 19:37:11 UTC 2011


On Wednesday 06 July 2011 17:37:53 Renato Tambellini wrote:
> Hi Hans,
> 
> Follow the logs of my application and cu(1) trying to access my
> another BSD machine.
> 
> The files .dump are stdout of usbdump and .log are the logs of debug from
> cons.
> 
> In cu, I get the "login: " and a write error when I try to send the
> chars to the remote console:
> 
> # cu -l /dev/ttyU0
> Connected
> ]Jj
> 
> login: write: Device not configured
>                                    write: Device not configured
> ...
> 
> The kernel reconnects the device on error and the speed are set
> correctly, 19200 for my app and 9600 to access the remote console from
> cu.
> 

Hi,

What are the values of the following sysctls?

sysctl hw.usb.ucom.cons_unit
sysctl hw.usb.ucom.cons_baud

Could you set: 
sysctl hw.usb.ucom.debug=15

Then type something on the cu terminal and see if you get something through.

I have an uplcom adapter here and I cannot reproduce except if I do the 
following:

cu -l /dev/cuaU0

Unplug uplcom. Then type something:

cu -l /dev/cuaU0
Connected
write: Device not configured
write: Device not configured

Then I need to "killall -KILL cu" to get back to normal.

NOTE: If applications opening a USB TTY device does not close on error, then 
the USB stack will wait until that happens before it can enumerate more 
devices. This is a TTY stack problem.

You can try to remove the force_short_xfer=1 flag in 
sys/dev/usb/serial/uplcom.c for the BULK TX transfer. I'm not sure if it 
helps. Really strange if your uplcom crashes on a ZLP!

--HPS


More information about the freebsd-usb mailing list