Nexus One USB host driver

Search This thread

TommyPickles

Senior Member
Jan 9, 2008
96
3
Sonic74, is it possible to upload a pre-built .img that we can flash instead of having to download kernel trees, patching, building etc.?

From what we've seen at XDA many users simply want to try new modifications quickly and easily without having to go into too much detail.

However once they experience it, then the passion kicks in and they'll want to learn how to hack from scratch themselves. In this way I'm sure you'll get a greater adoption of users then trying your mod, building and most importantly contributing.
 
Last edited:

TommyPickles

Senior Member
Jan 9, 2008
96
3
Ah, thanks for that Sonic74. So to confirm then, if people want to play with your mod rather than build from scratch they should:

- Download binaries from your page (boot.img and modules.tbz)
- Flash across the boot.img ie. fastboot flash boot boot.img

To load the modules you will need to use ConnectBot or Android SDK and:
- Move to protect your existing Android modules ie. adb shell mv /system/lib/modules /system/lib/modules.orig
- Create a new modules directory on your Android ie. adb shell mkdir /system/lib/modules
- Extract the modules.tbz tarball onto PC, including subdirectories
- Copy bcm4329.ko driver into new modules directory ie. adb push \yourpcdirectoryhere\drivers\net\wireless\bcm4329\bcm4329.ko /system/lib/modules
- Push individual drivers across for eg. USB keyboard ie. adb push yourpcdirectoryhere\usbhost\drivers\hid\usbhid.ko /system/lib/modules/usbhid.ko

Can you clarify, particularly with regards to modules? Greatly appreciated! :)

Cheers
Leon
 
Last edited:

Kermee

Senior Member
Sep 1, 2009
184
11
Waiting on the USB OTG cable now. Guessing it'll be two-weeks or so to get it from HK. -- The other end of the USB OTG cable is a USB Type-A female so I'm having problems locating a dual power USB Type-A male to single USB Type-A male... Or maybe I hunt down one of those easier to find dual USB Type-A male to microUSB male and find some type of converter from microUSB male to USB Type-A male...

Cheers,
Kermee
 

huanix

Member
May 1, 2010
18
6
Tennessee
dealextreme.com/details.dx/sku.13526 - building it.... only uncool people build their own cables /sarcasm

but for those who can't here is something that might help out a little also you can charge your old g1 with it :)

Just a heads up, I think that cable has mini usb rather than micro usb.

I had to buy 3 of them to meet the minimum charge, but you can get 3 of the referenced cables for $15 (free shipping): go to thefinalclick and search for 28108

It would be AWESOME to find the right one on deal extreme - i really liked the squid-style you found.
 

sonic74

Senior Member
Jan 3, 2010
163
18
Schwabach
sven.killig.de
- Download binaries from your page (boot.img and modules.tbz)
- Flash across the boot.img ie. fastboot flash boot boot.img

I recommend to download the zImage and boot it from RAM with
Code:
fastboot boot zImage
to try it out first.

To load the modules you will need to use ConnectBot or Android SDK and:
- Move to protect your existing Android modules ie. adb shell mv /system/lib/modules /system/lib/modules.orig
- Create a new modules directory on your Android ie. adb shell mkdir /system/lib/modules
- Extract the modules.tbz tarball onto PC, including subdirectories
- Copy bcm4329.ko driver into new modules directory ie. adb push \yourpcdirectoryhere\drivers\net\wireless\bcm4329\bcm4329.ko /system/lib/modules
- Push individual drivers across for eg. USB keyboard ie. adb push yourpcdirectoryhere\usbhost\drivers\hid\usbhid.ko /system/lib/modules/usbhid.ko

jmgrosen got these commands from my scratchpad text file. They are needed only if you want to flash my boot.img for everyday use. Otherwise, just copy the modules somewhere to /data/local and insmod them from there.
Mind that you lose device mode with my mod at the moment.
 
Last edited:

TommyPickles

Senior Member
Jan 9, 2008
96
3
Thanks very much for the clarification. I think you helped a number of members with that single post!

Does the boot.img load any or all modules? If not I presume that insmod via shell or terminal on phone stored locally on phone is required, as you've stated.

Lastly, do you have any documentation on different driver modules? Like what should be used where. Eg Media > Video > GSPCA compared to PWC. Is there any issues with insmod loading all modules?
 

huanix

Member
May 1, 2010
18
6
Tennessee
Thanks for sharing your work Sven - i am incredibly excited about the possibilities this brings!

I'm waiting on parts- probably like everyone else. Has anyone else gotten this up and running/working yet?

Hey Sven - do you have a paypal account? (I'm only a $10 giver, but I do it when i can!)
 
Last edited:

agentkalaw

Senior Member
Jul 22, 2009
128
11
So do you guys think we could use the desktop dock and connect it to a monitor and use the rca out for speakers as a simple home theater pc?

-------------------------------------
Sent via the XDA app
 

Kermee

Senior Member
Sep 1, 2009
184
11

Hi sonic74,

Do you think either of these USB 2.0 to DVI adapters will work?

Both point to DisplayLink for the drivers. The first link claims to support 1920x1080 which would be great for HDTV sets or 1920x1080 monitors...

Cheers,
Kermee

EDIT: Wonder if any of these would work too under Debian?

They look like they're DL-165 based and 3 of the 4 units have 4 USB ports so I could power the USB OTG cable with two USB ports leaving two USB ports available.

This one is kinda sexy... Toshiba dynadock V.
 
Last edited:

sonic74

Senior Member
Jan 3, 2010
163
18
Schwabach
sven.killig.de
Do you think either of these USB 2.0 to DVI adapters will work?

I don't have experience with combined devices. In theory they should work, they should be modeled with an internal hub. I'm a bit cautious because I use a quite old driver version from 6/2009 because the staging driver resets my Nexus One. I'm in contact with Bernie Thompson from the libdlo mailing list to make it work.
 
Last edited:

Kermee

Senior Member
Sep 1, 2009
184
11
I don't have experience with combined devices. In theory they should work, they should be modeled with an internal hub. I'm a bit cautious because I use a quite old driver version from 6/2009 because the staging driver resets my Nexus One. I'm in contact with Bernie Thompson from the libdlo mailing list to make it work.

Hey Sven,

Yeah. I just saw your post. =)

I was digging around and saw that some people are attempting to get libdlo working with the barrage of USB mini docks out in the market now. -- I see there is a Wiki page titled "DeviceQuirks" that shows a known issue with the "HP Dock." I have a sneaking suspicion the Toshiba Dynadock's will give the same grief.

However, I'm going to bite the bullet and grab either a Dynadock V or U and give it a go. Worse comes to worse, I'll just pick up a generic USB to DVI or VGA device and go from there.

Thanks again for all your work! I'm patiently waiting for everything I ordered ;)

Cheers,
Kermee

P.S. Will be interesting to see if Bernie Thompson can give some insight on the staging version.
 

operron

Member
Jul 10, 2007
29
1
Hi Sven,

your patch does not apply cleanly on a 2.6.29 kernel tree (so, for a 2.1 nexus)
Code:
patch -p1 <android-kernel_msm-v2.6.30-rc2-27223-g248970b_Nexus-One_usb-host.patch 
patching file arch/arm/mm/dma-mapping.c
Hunk #1 succeeded at 365 (offset -40 lines).
patching file drivers/usb/Kconfig
Hunk #1 FAILED at 58.
1 out of 1 hunk FAILED -- saving rejects to file drivers/usb/Kconfig.rej
patching file drivers/usb/host/Kconfig
Hunk #1 succeeded at 88 (offset -17 lines).
patching file drivers/usb/host/ehci-hcd.c
Hunk #1 FAILED at 1131.
1 out of 1 hunk FAILED -- saving rejects to file drivers/usb/host/ehci-hcd.c.rej
 

hugonz

Member
Dec 28, 2006
43
0
Sven, have you tried to make OTG mode (dynamic host/peripheral switching) work properly yet?

There seems to be all the required patches upstream for it to work, e.g. https://www.codeaurora.org/gitweb/q...it;h=731e94b44438268741e77db8db3fc91ee9d9acb2

Also, have you managed to get VBUS generation working? I'd imagine the hardware is there and it's probably wired up (it's a feature of the PMIC used in the N1, which includes 5V 600mA boost converter):
http://web.archive.org/web/20080617080725/http://www.qctconnect.com/products/pm_7500.html
 

Top Liked Posts