Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Nov 2010 11:28:35 +0000
From:      four.harrisons@googlemail.com
To:        freebsd-questions@herveybayaustralia.com.au, ait@p2ee.org,  ivoras@freebsd.org
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Android usb tethering
Message-ID:  <4cd3bef4.28a4df0a.5edf.56ec@mx.google.com>

next in thread | raw e-mail | index | archive | help
=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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4cd3bef4.28a4df0a.5edf.56ec>