From owner-freebsd-questions@FreeBSD.ORG Fri Nov 5 08:23:20 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9750A106564A for ; Fri, 5 Nov 2010 08:23:20 +0000 (UTC) (envelope-from four.harrisons@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1523C8FC08 for ; Fri, 5 Nov 2010 08:23:19 +0000 (UTC) Received: by bwz3 with SMTP id 3so2415314bwz.13 for ; Fri, 05 Nov 2010 01:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:subject:from:to:cc :date:mime-version:content-type:content-transfer-encoding; bh=0RRx1WAxy5YMPHjYUL4bngieD6OffIbDbDcLkeg3+M8=; b=g68qRMo9L5coEpWlh23MsFI2i5FKf30s5rwXrBJkxsdTOgDRqcERWjE0CRHCLQ7P4t s0FgX6G5x0Y9r0eZigTy575Ulkmll8xfMGlwRc1xfwO+7hn5LuvAuXbHtE/qWC7UmQwx slaMHUMR3nmzUguJ94ku/YVCqC7QJTO9I7v6s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:subject:from:to:cc:date:mime-version:content-type :content-transfer-encoding; b=hLA71BYsGFyQexoWGcaAOqdFqUTCrY3SPzo1nxDnoQ6Sya8ZTi2U0a/I3jV+ya8Gyi HdfkKQPpKj4ZyVTtOqzRHgAoopbqLeQRXsKroNyC+NYYpGJ/KRjs09FlTqUggYhHrtoZ saIys6e0nNUEfxDbPEQ1QruGfVHCum07mx1vw= Received: by 10.204.102.76 with SMTP id f12mr1623755bko.57.1288945396964; Fri, 05 Nov 2010 01:23:16 -0700 (PDT) Received: from ecs ([213.8.162.222]) by mx.google.com with ESMTPS id c40sm1071950fay.0.2010.11.05.01.23.14 (version=SSLv3 cipher=RC4-MD5); Fri, 05 Nov 2010 01:23:16 -0700 (PDT) Message-ID: <4cd3bef4.28a4df0a.5edf.56ec@mx.google.com> From: four.harrisons@googlemail.com To: freebsd-questions@herveybayaustralia.com.au, ait@p2ee.org, ivoras@freebsd.org Date: Thu, 4 Nov 2010 11:28:35 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: Android usb tethering 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: Fri, 05 Nov 2010 08:23:20 -0000 =0D=0A=0D=0AOn Tue 2/11/10 11:37 AM , freebsd-questions@herveybayaustral= ia.com.au=0D=0Awrote:=0D=0A On Tue 2/11/10 10:11 AM , Alejandro Imass w= rote:On Mon, Nov 1, 2010=0D=0A at 6:25 PM, Ivan Voras wrote:=0D=0A > On= 11/01/10 15:42, Mark Atkinson wrote:=0D=0A >>=0D=0A >> -----BEGIN PGP = SIGNED MESSAGE-----=0D=0A >> Hash: SHA1=0D=0A [...]=0D=0A > In the abo= ve messages, the kernel detaches the storage device=0D=0A (umass) and=0D=0A= > tries to attach the new device, which doesn't have a driver so=0D=0Ai= t's=0D=0A attached=0D=0A > as "ugen" - generic USB.=0D=0A >=0D=0A Yes.= One has to remember that USB is just the bus just like pci,=0D=0A micro= channel, etc. Even though you have access to the device on the=0D=0A bus= you still need a driver for that specific ethernet chip your=0D=0A kern= el. This is analogous to having a video card on the pci bus, you=0D=0A s= till need for the kernel to drive the specific chipset of the card=0D=0A = regardless if it can see it on the bus.=0D=0A I have an HTC Nexus One s= o I may fiddle with this and see if I can=0D=0A help some more here. I a= m wishful that at least we can get a tty=0D=0Ajust=0D=0A like other gsm = modems and from there it's pretty straight forward=0D=0A using wvdial or= alike. If it's only the Ethernet over usb like you=0D=0A mention, then = the chipset driver would have to be translated/ported=0D=0A to=0D=0A the= FBSD kernel, if it's not already there ?=0D=0A Ok. But I will clarify he= re:=0D=0A The HTC Android systems uses an "Internet Sharing" feature-=0D=0A= essentially Google has coded in routing/nat system into the base OS=0D=0A= (probably moding the leftover code already in the linux base), and is=0D= =0A trying to allow similar using bluetooth and wifi at a later date as=0D= =0A well. The RNDIS is a M$ system that allows sharing anything over USB=0D= =0A (network, files, etc- but all essentially operated as network=0D=0Aan= yway),=0D=0A something they've been playing with for some years- I was lo= oking for=0D=0A an A-A USB cable since around 2003 or so to quickly trans= fer files=0D=0A when needed. Apparently M$ opened the specs a year or two= ago and=0D=0A everyone's jumped on to use it. So where Google started wa= s to start=0D=0A allowing the use of the router/nat via RNDIS USB - someh= ow this was=0D=0A easier than allowing bluetooth or wifi (probably securi= ty and=0D=0A available hardware features).=0D=0A So yes, apparently the p= hone hooks up as a usb mass storage device,=0D=0A uploads a file to the c= omputer, and disconnects and becomes a network=0D=0A device. Here is the = output from linux:=0D=0A usb 2-2.2: new high speed USB device using ehci_= hcd and address 4=0D=0A usb 2-2.2: configuration #1 chosen from 1 choice=0D= =0A scsi9 : SCSI emulation for USB Mass Storage devices=0D=0A usb-storage= : device found at 4=0D=0A usb-storage: waiting for device to settle befor= e scanning=0D=0A usb 2-2.2: New USB device found, idVendor=3D0bb4, idProd= uct=3D0ff9=0D=0A usb 2-2.2: New USB device strings: Mfr=3D3, Product=3D2,= SerialNumber=3D1=0D=0A usb 2-2.2: Product: Android Phone=0D=0A usb 2-2.2= : Manufacturer: HTC=0D=0A usb 2-2.2: SerialNumber: SH07TNX00726=0D=0A usb= -storage: device scan complete=0D=0A scsi 9:0:0:0: Direct-Access HTC = Android Phone 0100 PQ: 0=0D=0A ANSI: 2=0D=0A sd 9:0:0:0: [sdf] At= tached SCSI removable disk=0D=0A sd 9:0:0:0: Attached scsi generic sg6 ty= pe 0=0D=0A usb 2-2.2: USB disconnect, address 4=0D=0A usb 2-2.2: new high= speed USB device using ehci_hcd and address 5=0D=0A usb 2-2.2: configura= tion #1 chosen from 1 choice=0D=0A usb 2-2.2: New USB device found, idVen= dor=3D0bb4, idProduct=3D0ffe=0D=0A usb 2-2.2: New USB device strings: Mfr= =3D3, Product=3D2, SerialNumber=3D1=0D=0A usb 2-2.2: Product: Android Pho= ne=0D=0A usb 2-2.2: Manufacturer: HTC=0D=0A usb 2-2.2: SerialNumber: SH07= TNX00726=0D=0A usbcore: registered new interface driver cdc_ether=0D=0A u= sb0: register 'rndis_host' at usb-0000:00:04.1-2.2, RNDIS device,=0D=0A a= e:f6:3d:da:20:39=0D=0A usbcore: registered new interface driver rndis_hos= t=0D=0A usbcore: registered new interface driver rndis_wlan=0D=0A usb0: n= o IPv6 routers present=0D=0A usb 2-2.2: USB disconnect, address 5=0D=0A u= sb0: unregister 'rndis_host' usb-0000:00:04.1-2.2, RNDIS device=0D=0A So.= What would be my next step to make this work? OpenMoko have=0D=0A someth= ing similar and I tried moding some of their scripts (they've=0D=0A made = theirs work with ALL OS- not just linux and Winblow$! Take heed=0D=0A man= ufacturers!) but it didn't mesh on the Android. I still end up=0D=0Awith=0D= =0A a generic host.=0D=0A As I mentioned, I tried modifying the cdce driv= er and the device list=0D=0A but that didn't help either, so when I moded= the scripts and=0D=0Adevd.conf=0D=0A I figured that was the missing piec= e of my puzzle.=0D=0A I'd actually pay someone to do this, but I do need = to figure this out=0D=0A for myself anyway so I'm diving in deep and goin= g to keep on=0D=0A struggling till I get it. I need it figured out before= the year's end=0D=0A so I'm not going to sit on my laurels :) That, and = a usb mass storage=0D=0A device emulator to trick a dumb digital photo fr= ame....=0D=0A >=0D=0A >=20=0D=0ASo I have more on this: sourceforge.jp = has a project rndis for=0D=0Afreebsd.=0D=0A=0D=0AIts a little hard to nav= igate, but I downloaded the source code and=0D=0Atried to build it on 8.0= =2E No go, but I'm not sure what usb library its=0D=0Ausing. I think it s= aid usb2, but I'm not exactly sure what that meant=0D=0A(usb2.0, or libus= b2, whatever).=0D=0A=0D=0ANow, I've only just quickly grabbed it and trie= d to make- I haven't=0D=0Ahad a chance to look too deeply into it as yet-= but these are the=0D=0Aerrors if someone could throw me a clue as to wha= t it might be=0D=0Aindicating? (wrong library? generic error I have to de= bug?)=0D=0A=0D=0Aif_rndis.c: In function 'rndis_recv_message':=0D=0Aif_rn= dis.c:985: warning: format '%d' expects type 'int', but argument=0D=0A3 h= as type 'long unsigned int'=0D=0Aif_rndis.c: In function 'rndis_bulk_read= _callback':=0D=0Aif_rndis.c:1167: warning: format '%d' expects type 'int'= , but argument=0D=0A4 has type 'long unsigned int'=0D=0Aif_rndis.c:1187: = warning: format '%d' expects type 'int', but argument=0D=0A4 has type 'lo= ng unsigned int'=0D=0Aif_rndis.c:1204: warning: format '%d' expects type = 'int', but argument=0D=0A4 has type 'long unsigned int'=0D=0A*** Error co= de 1=0D=0A=0D=0AI did get from the site that it was for Windows Mobile, b= ut I believe=0D=0Athat this is a generic system coming out now. It might = help?=0D=0A=0D=0ACheers=0D=0A-------------------------=0D=0AMessage sent = via Atmail Open - http://atmail.org/=0D=0A_______________________________= ________________=0D=0Afreebsd-questions@freebsd.org mailing list=0D=0Ahtt= p://lists.freebsd.org/mailman/listinfo/freebsd-questions=0D=0ATo unsubscr= ibe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"=0D=0A