New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
scitobor
Old
(Last edited by scitobor; 23rd July 2012 at 05:55 AM.) Reason: back-powered hubs
#31  
Junior Member
Thanks Meter 1
Posts: 9
Join Date: Jul 2012
Quote:
Originally Posted by HeliumX10 View Post
First - I wont quote, because this thread goes out of control

Blocking schottky diode is necessary - it prevents the voltage shortcut between powered host and possibly self power providing slave.

...
)).
Sorry - quoting a bit blindly

Looks like you're right though about protection being necessary against two devices driving V+ at the same time. See this thread:

[webcam support] USB Host support that YOU can try (now in nightlies)
http://forum.xda-developers.com/show....php?t=1105497

He has a bit marked out in red where he managed to toast the USB in his Nook.

Also these guys are researching the same issue on the Nook (color?) and seem to be way ahead of anyone working on the Galaxy Note.

I am now looking at (kernel) code to see whats going on, and I see a lot of FIXME and TODO-type comments in the OTG code, and this is in ICS 4.04 kernel which Samsung are releasing now. That said, the power management/supply chip is a MAX8997, which appears to provide full support for OTG (BC_1.1 ) though how bug-free that is I couldn't say.

I haven't identified what USB transceiver is in use yet.

What I'm looking at now is an app to supply-to/charge-from/turn-off USB power, and host/client/off USB. This I'm sure is going to take kernel mods. It seems that its going to be needed in the short run; and I think it may have some value in the long run too (back-powered hubs being quite common it seems)

Renate: You've written an app for the nook that does that. Can you point me at details and maybe source somewhere? Also such an app was available in the above quoted thread (yours Renate?) for the Nook; I follow the download link and its expired though.

Here is an interesting thread on back-powering hubs again: (I have no idea what a raspberry pi is)
http://www.raspberrypi.org/phpBB3/vi...11419&p=125412

ONE MORE THING

Quote:
Found in GT-N7000_SEA_IC_Kernel/arch/arm/mach-exynos/p10-battery.c:
/* matching with power_supply_type in power_supply.h */
static sec_charging_current_t charging_current_table[] = {
{0, 0, 0, 0}, /* POWER_SUPPLY_TYPE_BATTERY */
{2000, 2000, 256, 0}, /* POWER_SUPPLY_TYPE_MAINS */
{500, 500, 256, 0}, /* POWER_SUPPLY_TYPE_USB */
{500, 500, 256, 0}, /* POWER_SUPPLY_TYPE_USB_DCP */
{500, 500, 256, 0}, /* POWER_SUPPLY_TYPE_USB_CDP */
{500, 500, 256, 0}, /* POWER_SUPPLY_TYPE_USB_ACA */
{0, 0, 0, 0}, /* POWER_SUPPLY_TYPE_OTG */
{0, 0, 0, 0}, /* POWER_SUPPLY_TYPE_DOCK */
{500, 500, 256, 0}, /* POWER_SUPPLY_TYPE_MISC */
{0, 0, 0, 0}, /* POWER_SUPPLY_TYPE_WIRELESS */
};
I don't think I've ever seen my Note charging at 2A - the charger supplied was just a 1A USB thing that I plugged the data cable into. Not sure if it shorts the D+/D- pins or not.
 
Renate NST
Old
#32  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 481
Posts: 1,240
Join Date: Feb 2012
Location: Boston
verygreen was the one who started all this USB host mode stuff on the Nook (Both Color and Touch).
The Color had the problem of the ID pin not being brought out to the connector.

For the Nook Touch, the hooks into the driver are fairly simple.
Code:
echo host > /sys/devices/platform/musb_hdrc/mode
echo peripheral > /sys/devices/platform/musb_hdrc/mode

echo 0 > /sys/devices/platform/bq24073/force_current
echo 500000 > /sys/devices/platform/bq24073/force_current
echo 1500000 > /sys/devices/platform/bq24073/force_current
My UsbMode app (for Nook Touch) is in the signature.

 
scitobor
Old
(Last edited by scitobor; 24th July 2012 at 05:55 AM.) Reason: overquoted
#33  
Junior Member
Thanks Meter 1
Posts: 9
Join Date: Jul 2012
Code:
echo host > /sys/devices/platform/musb_hdrc/mode
echo peripheral > /sys/devices/platform/musb_hdrc/mode
Noob question: is musb_hdrc/mode a file or a device? ie you end up with a file with just the word:"host" / "peripheral" ?
 
Renate NST
Old
#34  
Renate NST's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 481
Posts: 1,240
Join Date: Feb 2012
Location: Boston
They are parts of the file system that interact with the kernel driver.
If you do a directory listing, they are there.
If you look in the kernel driver you will see some code that will twiddle some bits if an input string equals "host".

Stuff like my app should not be necessary.
If the driver were working correctly plugging in an OTG cable would ground the ID pin,
cause an interrupt and make the device go into host mode.
It's on my list of things to look into.

 
mike2nl
Old
#35  
mike2nl's Avatar
Senior Member
Thanks Meter 513
Posts: 3,544
Join Date: Jul 2009
Location: Near Utrecht
Hi guys and girls ,

finally i have found the right hardware threads.
Good to see that there are more users who are playing and wiring with her phones.

I have found this thread about external usb webcam support.
Now my question after i have read some pages, how far goes the support.
I mean the kernels. Is this all only for the CM types or can i use it for the...
as Sample the HTC Sensation XE with the SebastianFM Kernel v1.5.2 who
has UST OTG build in. What is working very stable with usb devices.

I have tested a lot and have found the old Logitech webcam (Lego usb cam).
Now my next step is to test that old peace of hardware. This cam type
has video and audio on board.

Possible someone from you can give me a hint...
Sensation XE: 光盤 6, PYDX & AIO latest
SGT 10.1 3G: JellyBeanICS v8, Yoda 2.4
HD2: 光盤 3.7, marc 0.2.3
Old Teams: CHTBeta & Art
Apps: 3D Photo Browser Mods
Android Test Links: USB Echo