FORUMS
Remove All Ads from XDA

[WIP] USB Host support (working)

1,305 posts
Thanks Meter: 2,651
 
Post Reply Email Thread
13th February 2012, 12:05 PM |#41  
ros87's Avatar
Senior Member
Flag Bodø
Thanks Meter: 164
 
Donate to Me
More
Thumbs up
Quote:
Originally Posted by verygreen

Need to play with some code to try and only supply vbus if otg cable is used, and if it works, we would be able to do away with the app altogether.

That would be great
 
 
13th February 2012, 02:19 PM |#42  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 992
 
More
I've got a USB keyboard working fairly well.
The escape key doesn't seem to "escape" out of anything.
Also, F8 or the End key will cause the Nook to do a direct shut-off without even going to the shut-off screen. It goes to the normal screensaver.
The page up/down keys don't work like I would have them work on Opera Mobile.

On the plus side, the multimedia volume up/down keys pop up a loudspeaker icon and you can adjust the (non-existent) volume! :P
The multimedia search key will call up the search dialog.

A mouse will work, it's kind of amusing.
The scaling is much too sensitive. I don't know where the scale values get configed.
The scroll wheel is apparently not supported.

I tried plugging a USB GPS hockey puck in. It is scanned but I couldn't get anything out of cat /dev/tty???
13th February 2012, 08:34 PM |#43  
Member
Flag Sopron
Thanks Meter: 8
 
More
Thanks for the tips, I got it working!

The problem was with the complied binaries, somehow, my installer script didn't work.

Anyways, It works all the time. No need to unplug, replug the cable, or the keyboard multiple times, or switch usb host mode on-off-on to work. I just enable it with the mode changer button, and it works as expected.

Unfortunately, USB mouse gets recognized, but only as a keyboard device. I mean, it only issues UP, and DOWN commands. I guess we're missing drivers for this at the moment.

Is there anybody here, developing usb host drivers for our device?

Mouse with a pointer, and mass storage support would be awesome.
14th February 2012, 12:01 AM |#44  
Senior Member
Thanks Meter: 141
 
Donate to Me
More
Hi,
I built the kernel with some additional modules enabled. I was able to mount a usb-memory, but had to use a powered hub.

@Renate NST: In this kernel the usb-serial driver should be included, maybe you could test it with the gps.

/edit: removed attachment, new one is here http://forum.xda-developers.com/show...2&postcount=51
The Following 2 Users Say Thank You to mali100 For This Useful Post: [ View ] Gift mali100 Ad-Free
14th February 2012, 12:09 AM |#45  
ros87's Avatar
Senior Member
Flag Bodø
Thanks Meter: 164
 
Donate to Me
More
Quote:
Originally Posted by mali100

Hi,
I built the kernel with some additional modules enabled. I was able to mount a usb-memory, but had to use a powered hub.

@Renate NST: In this kernel the usb-serial driver should be included, maybe you could test it with the gps.

Lo mate, as this is a dev thread it would be nice if you included the kernel config
14th February 2012, 12:42 AM |#46  
Senior Member
Thanks Meter: 141
 
Donate to Me
More
config is included in the zip
14th February 2012, 01:34 AM |#47  
ros87's Avatar
Senior Member
Flag Bodø
Thanks Meter: 164
 
Donate to Me
More
Quote:
Originally Posted by mali100

config is included in the zip

Ah, I apologize then
14th February 2012, 02:27 AM |#48  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 992
 
More
@mali100: Um, I don't know what I'm looking for in /dev for the USB GPS
It doesn't seem to be an obvious ttyXX
I see ttyDCC0, tty0-tty63, ttyS0, ttyS1

@toxidog: I get a real pointer in Opera Mobile with a mouse.
With only a keyboard connected I get a fake pointer with the buttons.

For everyone: My battery seems to be draining very quickly even using a powered hub.
Even disconnected it went from 40% to 25% over the course of a day when shut off by the rear button (but not full powered down).
14th February 2012, 03:41 AM |#49  
OP Senior Member
TN
Thanks Meter: 2,651
 
Donate to Me
More
Quote:
Originally Posted by Renate NST

For everyone: My battery seems to be draining very quickly even using a powered hub.
Even disconnected it went from 40% to 25% over the course of a day when shut off by the rear button (but not full powered down).

I think this is somewhat expected, since the usb is forcefully powered up all the time (I do a fake "usb vbus is on") which prevents the thing from sleeping.

With added ID sensing it should become better.
14th February 2012, 11:35 AM |#50  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Boston
Thanks Meter: 992
 
More
Why is forcing the vbus necessary?

For powered hubs, communications should be possible with no voltage on the VCC.

For other devices (direct keyboards) have we determined that the USB specified mechanism for negotiating power doesn't work? If so, does the fault lie in the driver or that many USB peripherals haven't implemented the handshake correctly?

The LED flashing for 100 milliseconds would seem to indicate that the Nook is trying to negotiate correctly. The fact that even powered hubs don't work after a blink would seem to indicate that the driver shuts down if the device doesn't negotiate power.

Is there some way to add an option/test to see if devices can negotiate power without having to force the VBUS?

I experimented to see if you could charge the Nook while using host mode. Many small hubs take pin #1 (VCC) through a diode to the outgoing pin #1 and to the circuitry. I bypassed the diode with a small resistor while in host mode and got the battery status to change from "Discharging" to "Not charging". Turning off the charge pump might allow charging. If this were the case, you could just short out the diode in a powered hub and have charging and host mode at the same time.
14th February 2012, 11:43 AM |#51  
Senior Member
Thanks Meter: 141
 
Donate to Me
More
Quote:
Originally Posted by Renate NST

@mali100: Um, I don't know what I'm looking for in /dev for the USB GPS
It doesn't seem to be an obvious ttyXX
I see ttyDCC0, tty0-tty63, ttyS0, ttyS1

Sorry, I only added the general support for usbserial, but forgot to add the drivers for the different converters. I compiled a new one, when you connect your converter you should see something like
Code:
pl2303 converter now attached to ttyUSB0
in dmesg.

@verygreen i saw in your usbhost.diff that the kernel version you are using is 1.0.1. I tried it with the kernel for 1.1 and it works also. It is still 2.6.29 but some drivers (touchscreen) are updated.

config is included in the zip-file
Attached Files
File Type: zip uImage.zip - [Click for QR Code] (2.55 MB, 474 views)
Post Reply Subscribe to Thread

Tags
usb host, usbhost

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes