From owner-freebsd-questions@FreeBSD.ORG Thu Jan 26 16:12:27 2012 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91E4C1065673 for ; Thu, 26 Jan 2012 16:12:27 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1-6.sentex.ca [IPv6:2607:f3e0:0:1::12]) by mx1.freebsd.org (Postfix) with ESMTP id 4CCEE8FC1B for ; Thu, 26 Jan 2012 16:12:27 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.5/8.14.4) with ESMTP id q0QGCNSg075745; Thu, 26 Jan 2012 11:12:23 -0500 (EST) (envelope-from mike@sentex.net) Message-ID: <4F217B5D.8010909@sentex.net> Date: Thu, 26 Jan 2012 11:12:13 -0500 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Odhiambo Washington References: <4F1EDE5E.4070608@sentex.net> <4F2025B0.70503@sentex.net> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.71 on IPv6:2607:f3e0:0:1::12 Cc: questions Subject: Re: FreeBSD 9 and 3G Modems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jan 2012 16:12:27 -0000 On 1/26/2012 10:58 AM, Odhiambo Washington wrote: > Hi, > kldload u3g > kldload umodem > > > Done, although kldload u3g tells me that file already exists! Perhaps > because I booted up with my Huawei dongle plugged in. > kldstat | grep u3g shows me nothing though. Looks like its already defined in the kernel! > ugen6.2: at usbus6, cfg=0 md=HOST > spd=HIGH (480Mbps) pwr=ON It sees it. > > > > then > > sysctl -a dev.u3g > > > [wash@pcbsd9] /home/wash# sysctl -a dev.u3g > dev.u3g.0.%desc: Huawei Technologies HUAWEI Mobile, class 0/0, rev > 2.00/0.00, addr 2 > dev.u3g.0.%driver: u3g > dev.u3g.0.%location: bus=1 hubaddr=1 port=6 devaddr=2 interface=0 > dev.u3g.0.%pnpinfo: vendor=0x12d1 product=0x1001 devclass=0x00 > devsubclass=0x00 sernum="" release=0x0000 mode=host intclass=0xff > intsubclass=0xff > intprotocol=0xff ttyname=U0 ttyports=3 > dev.u3g.0.%parent: uhub More importantly, the driver sees it and has used cuaU0.* > and > ls -l /dev/cuaU* > > > [wash@pcbsd9] /home/wash# ls -l /dev/cuaU* > crw-rw---- 1 uucp dialer 0, 117 Jan 26 18:23 /dev/cuaU0.0 > crw-rw---- 1 uucp dialer 0, 118 Jan 26 18:23 /dev/cuaU0.0.init > crw-rw---- 1 uucp dialer 0, 119 Jan 26 18:23 /dev/cuaU0.0.lock > crw-rw---- 1 uucp dialer 0, 123 Jan 26 18:23 /dev/cuaU0.1 > crw-rw---- 1 uucp dialer 0, 124 Jan 26 18:23 /dev/cuaU0.1.init > crw-rw---- 1 uucp dialer 0, 125 Jan 26 18:23 /dev/cuaU0.1.lock > crw-rw---- 1 uucp dialer 0, 129 Jan 26 18:23 /dev/cuaU0.2 > crw-rw---- 1 uucp dialer 0, 130 Jan 26 18:23 /dev/cuaU0.2.init > crw-rw---- 1 uucp dialer 0, 131 Jan 26 18:23 /dev/cuaU0.2.lock This is where you need to do a bit of experimenting. Some modems register these "sub ports" and others do not. Some are for out of band control and one will be the device you actually use in your ppp config. The init string sort of depends on your carrier. But a basic one to try in ppp.conf is below. For the set device line, you might need to change it to /dev/cuaU0.1 or /dev/cuaU0.2 invoke with ppp -ddial u3g You might need the authname and auth key, you might not. For the context you might need to change it from internet.com to something else. Again, ask your carrier for that info. Try first without the CGDCONT line as the default in the modem might do the trick. u3g: set device /dev/cuaU0.0 set server /var/run/gprs-internet "" 0177 set speed 921600 set timeout 0 set authname wapuser1 set authkey wap set dial "ABORT BUSY TIMEOUT 2 \ \"\" \ AT OK-AT-OK \ AT+CFUN=1 OK-AT-OK \ AT+CMEE=2 OK-AT-OK \ AT+CSQ OK \ AT+CGDCONT=1,\\\"IP\\\",\\\"internet.com\\\" OK \ AT&v OK \ ATD*99# CONNECT" set crtscts on disable vjcomp disable acfcomp disable deflate disable deflate24 disable pred1 disable protocomp disable mppe disable ipv6cp disable lqr disable echo #nat enable yes enable dns resolv writable set dns 8.8.8.8 set ifaddr 10.1.0.2/0 10.1.0.1/0 255.255.255.255 0.0.0.0 add default HISADDR # See ppp.link* -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/