From owner-freebsd-usb@FreeBSD.ORG Wed Nov 3 14:52:11 2004 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11BD216A4D6 for ; Wed, 3 Nov 2004 14:52:11 +0000 (GMT) Received: from mail3.verkstad.net (mail3.verkstad.net [192.71.20.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AF2343D45 for ; Wed, 3 Nov 2004 14:52:10 +0000 (GMT) (envelope-from vicknesan@bigfoot.com) Received: from homer (138.206.216.81.nvik.siw.siwnet.net [81.216.206.138]) by mail3.verkstad.net (Postfix) with ESMTP id 49A133C0FE; Wed, 3 Nov 2004 15:52:08 +0100 (CET) Date: Wed, 3 Nov 2004 15:52:07 +0100 (CET) From: Vicknesan AYADURAI X-X-Sender: vick@homer.ark.homeunix.org To: Danny Braniss In-Reply-To: <20041102133931.5ED113C0DC@mail3.verkstad.net> Message-ID: <20041103154419.K28078@homer.ark.homeunix.org> References: <20041102133931.5ED113C0DC@mail3.verkstad.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-usb@freebsd.org Subject: Re: Netgraph/mpd over USB modem problems X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 14:52:11 -0000 Hi Danny, Thanks for the links, which helped show a way to fix this: http://lists.freebsd.org/pipermail/freebsd-bugs/2004-April/006379.html indicated that there's a problem with the ucomstop function in /sys/dev/usb/ucom.c which hardware-disables the receiver. I had earlier also observed that the communication would 'break down' soon after a call to ucomstop, but hadn't realised that it was actually the _cause_ of the problem. I've worked around this by #ifdef'ing contents of the ucomstop function so it doesn't do anything useful (harmful?), and the problem seems to have gone away. I'll do more testing now to see if this introduces any other problems, but so far, it looks good. Thanks for the help, vick On Tue, 2 Nov 2004, Danny Braniss wrote: > take a look at: > http://lists.freebsd.org/pipermail/freebsd-bugs/2004-April/006379.html > and > http://groups.yahoo.com/group/freebsd-hackers/message/82879 > > > Hi Danny, > > > > Couldn't find: > > > > > look for a tcflush(..., TCIFLUSH) > > > > anywhere in /sys/dev/usb or /sys/netgraph, although there were some > > other flush-related strings though. > > > > What did you do (to tcflush...) to fix it then? Not sure if the > > problems are related, but I'm taking all offers at this stage... > > > > Thanks, > > vick > > > > On Tue, 2 Nov 2004, Danny Braniss wrote: > > > > > look for a tcflush(..., TCIFLUSH) > > > this did not work properly last time i checked, and screwed up the > > > communicarions with a smart card usb reader. > > > > > > danny > > > > > > > Hi all, > > > > > > > > I've been battling this unsuccessfully for a while now, and hope > > > > someone can shed some light on how to fix this. > > > > > > > > I'm trying to achieve a PPP dialup connection via a USB modem using > > > > netgraph mpd. However there appears to be a problem between netgraph's > > > > ng_tty node and /dev/ucom0, which I can't figure out/fix. > > > > > > > > The initial mpd chat script works fine, and AT commands successfully > > > > establish a call between the local (USB) and remote modem. When DCD > > > > comes up, the netgraph nodes kick in, and the netgraph chain (ng_ppp > > > > -> ng_tty -> etc) is automatically (and correctly) formed. > > > > > > > > LCP packets are then sucessfully transmitted to the remote PPP host > > > > via the USB port and modem. However, the subsequent responses arriving > > > > at the local USB port, are not forwarded up the stack i.e., are not > > > > received by the netgraph node(s). > > > > > > > > It's possible (although not completely confirmed) that this is somehow > > > > related to the changing line-disciplines from TTYDISC (during the chat > > > > phase) to NETGRAPHDISC (during LCP/PPP phase) when the netgraph nodes > > > > are formed. > > > > > > > > I've verified that with the USB & serial modems (same modem actually): > > > > > > > > a. user-space PPP works on both /dev/cuaa0 and /dev/ucom0 > > > > b. mpd works on /dev/cuaa0 but NOT /dev/ucom0 > > > > > > > > indicating that the individual components seem to work, but the > > > > netgraph/USB combination has problems. The only difference between the > > > > relevant serial and USB config files is: /dev/cuaa0 is changed to > > > > /dev/ucom0 when switching from serial to USB. > > > > > > > > I've tested this on GENERIC FreeBSD versions 4.9R, 5.2.1R and > > > > yesterday, on a new installation of 5.3-RC2 -- all without success. > > > > All releases display seemingly identical behaviour, i.e., establishing > > > > the call successfully, but not receiving incoming LCP frames. :-( > > > > > > > > Anyone have any experience running netgraph nodes with USB modems? > > > > Even more generally, anyone know if netgraph is even _meant_ to work > > > > with USB...? > > > > > > > > Desperately, > > > > vick > > > > _______________________________________________ > > > > freebsd-usb@freebsd.org mailing list > > > > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > > > > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" > > > > > > > > > > > > > > > > > > > >