u3g(4) incorrectly returning EOF

Hans Petter Selasky hselasky at c2i.net
Mon Jan 31 20:09:15 UTC 2011


On Monday 31 January 2011 21:06:27 Hans Petter Selasky wrote:
> On Monday 31 January 2011 20:59:21 Peter Jeremy wrote:
> > I use a Huawei E176 on FreeBSD 8.1 for portable 3G connectivity.
> > Occasionally, ppp(8) reports:
> > Phase: deflink: read (2): Got zero bytes
> > Phase: deflink: open -> lcp
> > and ppp(8) brings the link down.  Trying to restart the link shows
> > that the E176 still thinks the link is up (entering 'term' and then
> > '~p' restores connectivity).  grog@ has similar problems with an E1762.
> > 
> > Can anyone suggest why u3g(4) is incorrectly reporting EOF to an
> > application?
> 
> Hi,
> 
> Try enabling u3g debugging.
> 
> sysctl hw.usb.u3g.debug=15
> 
> This might require compiling a kernel having:
> 
> options USB_DEBUG
> 
> Maybe the zero length data comes from USB. Else it is a TTY problem.


Reference:

sys/dev/usb/serial/usb_serial.c:ucom_put_data()

There is already a check there for zero length data, so I guess the problem is 
in the TTY layer.

--HPS


More information about the freebsd-usb mailing list