Active Topics

 


Closed Thread
Thread Tools
Posts: 243 | Thanked: 172 times | Joined on Sep 2007 @ silicon valley
#951
Unfortunately I was not getting email notifications for this thread so I didn't realize there was work going on. This is awesome!

I am trying to quickly digest what all has happened since I looked last, there has been more than 20 pages of posts, so please excuse me for repeats. To summarize, it looks like
1. It is possible to force VBUS on by controlling bq24150 (I need to do some more reading here.)
2. host mode works by connecting to PC, use HNP, and then connecting to another device within 5 seconds (moving the state machine to b_host)
3. It is not yet possible to enter host mode without connecting to a PC first as described above.

Is this correct? Is there a wrapup of kernel patches somewhere?

Where I left off was getting a connection by forcing host mode w/ a power injecting cable, but the state machine entered the suspend state. Found some obvious places where that could cause problems but I haven't sat down to play with it again yet.

Thanks in advance.
 
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#952
Originally Posted by sarahn View Post
Unfortunately I was not getting email notifications for this thread so I didn't realize there was work going on. This is awesome!

I am trying to quickly digest what all has happened since I looked last, there has been more than 20 pages of posts, so please excuse me for repeats. To summarize, it looks like
1. It is possible to force VBUS on by controlling bq24150 (I need to do some more reading here.)
2. host mode works by connecting to PC, use HNP, and then connecting to another device within 5 seconds (moving the state machine to b_host)
3. It is not yet possible to enter host mode without connecting to a PC first as described above.

Is this correct? Is there a wrapup of kernel patches somewhere?

Where I left off was getting a connection by forcing host mode w/ a power injecting cable, but the state machine entered the suspend state. Found some obvious places where that could cause problems but I haven't sat down to play with it again yet.

Thanks in advance.
Quite precise sum up, fine to have you on board again :-)
There are no kernel patches yet that would really help in entering hostmode directly. All patching so far was more like testing how the whole thing reacts, nothing of that will result in a kernel patch needed to put hostmode to work - probably even nothing of that is needed for the HNP fake hostmode stuff in the end.
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N

Last edited by joerg_rw; 2010-05-25 at 20:21.
 

The Following 3 Users Say Thank You to joerg_rw For This Useful Post:
Posts: 243 | Thanked: 172 times | Joined on Sep 2007 @ silicon valley
#953
OK. As I said, I was pursuing forced host mode which AFAIK does require kernel patches. I have those posted back a ways though I do not know if it's the right strategy or not. Have you had a chance to look at those?
 
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#954
Originally Posted by sarahn View Post
OK. As I said, I was pursuing forced host mode which AFAIK does require kernel patches. I have those posted back a ways though I do not know if it's the right strategy or not. Have you had a chance to look at those?
Javispedro (and me, talking nonsense ;-P) did tests with FORCE_HOSTMODE patches in kernel some days ago. See last post of mine with the IRC quotes. Javispedro missed the state transitions in the musb core state machine (if there is any?).
If you got full real hostmode working with a Y-cable for feeding VBUS, then we're already done, as we got the VBUS thing working by now (more or less, bme needs a kick in the a...)

:-)

cheers
jOERG
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N
 

The Following 2 Users Say Thank You to joerg_rw For This Useful Post:
Posts: 243 | Thanked: 172 times | Joined on Sep 2007 @ silicon valley
#955
HNP isn't workng for me; musb core goes into host mode but I don't get any urb or anything. Is a custom kernel actually required?
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#956
Yes, the whitelist and blacklist options should be set to n, I'll PM you a precompiled zImage
 
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#957
@egoshin & joerg
please try attempt to enter host mode following bellow sequence !
1 apply vbus from bq
2 set r15k
3 force session
4 clear R D+
5 force session end ( clear SESSION )

at this point bus must be SE0

6 force host
7 check / set r15k
8 clear fifo buffers( FLUSHFIFO )
9 apply vbus 5v bq
10 set R D+ ( fake peripheral )
11 set session bit
12 clear session bit ( no device on bus )

Last edited by blue_led; 2010-05-26 at 23:33.
 

The Following 5 Users Say Thank You to blue_led For This Useful Post:
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#958
from http://www.usb.org/developers/docs/usb_20_052510.zip i analize again ( n times) USB OTG and EH 2-0.pdf

for start FORGET a-device or embedded host state diagram because it is initialized by ID = 0 even twl4030 have an functional & valid id signal
look closer to otg B_device ( fig 7.3 - otg b device state diagram )
from start state machine will enter to b_idle state ( reason : id =1 )
the only one path to b_host state is through 2 intermediate stages
b_peripheral & b_wait_acon
to reach b_peripheral the only one condition is b_sess_vld and this is TRUE when the B-device above VOTG_SESS_VLD ( 0.8 - 4 V )
so attach to a pc and 3.5 v from any source is sufficient to reach this stage
let go further
b_wait_acon
the conditions to advance to this stage are:
b_bus_req TRUE during the time that the Application running on the B-device wants to use the bus
&
b_hnp_en TRUE when the B-device has accepted the SetFeature(b_hnp_enable)
&
a_bus_suspend ( real life : disconnect from pc and leave usb bus to settle down )

to enter b_host the condition is detection of a peripheral performing srp ( a_conn )

it is f.. simple . we can't see forest behind trees.
egoshin follow this path with success

so limitaton on real n900 device with not id pin hardwired : any a-state machine can not start, and bme with charger check procedure prevent bus to enter suspend state and my final conclusions are
as nokia deliver n900 ( with glorious bme ) can't perform otg as everybody know that
the only host hope for us is b_host and i am confident it can be reached without a pc

Last edited by blue_led; 2010-05-27 at 23:45.
 

The Following 4 Users Say Thank You to blue_led For This Useful Post:
Posts: 60 | Thanked: 144 times | Joined on Jan 2010 @ Philadelphia
#959
I have started to wonder if Nokia is actually not allowed to assist in these efforts to determine how to manually turn the USB controller to hostmode, due to USB Consortium crap, or if its just due to the bme system being closed-source. Does the partial OTG software implementation in the drivers provide any actual benefits beyond pure peripheral mode? Or is it there because they started work on OTG and realized they couldn't finish it, and reworked that code instead of removing all the OTG-ness.

I have been wondering about literally hacking the bme. basically, the program would not change, and maybe with the magic of LD_PRELOAD and some tracing, we'd fake out the syscalls/library calls it would make (akin to how rootkits hide themselves).
 
Posts: 946 | Thanked: 1,650 times | Joined on Oct 2009 @ Germany
#960
FYI: I had a_host working (after connecting to PC) but it was difficult to reproduce

EDIT: oops. just noticed javispredo also mentioned in his post...

IRC log from last week:
Code:
musb_stage0_irq      580: <== Power=e9, DevCtl=dd, int_usb=0x10
[23:51] t-tan: [  637.942199] musb_stage0_irq      875: CONNECT (a_host) devctl dd
[23:51] t-tan: interesting. havent seen this before (a_host)
..
[23:53] t-tan: before: musb_stage0_irq      859: CONNECT as b_peripheral???                                           
[23:53] t-tan: May 20 20:47:24 T900 kernel: [  99.135070] musb_stage0_irq      875: CONNECT (b_peripheral) devctl dd
[23:53] t-tan: with my new patch
Originally Posted by blue_led View Post
so limitaton on real n900 device with not id pin hardwired : any a-state machine can not start, and bme with charger check procedure prevent bus to enter suspend state and my final conclusions are
as nokia deliver n900 ( with glorious bme ) can't perform otg as everybody know that
the only host hope for us is b_host and i am confident it can be reached without a pc

Last edited by titan; 2010-05-28 at 15:22.
 

The Following User Says Thank You to titan For This Useful Post:
Closed Thread

Tags
awesomeness in the works, boulevard of broken deals, host, i am the dealbreaker, inspector gadget lies, mobidapter is a scam, nokia fanbois, otg, over 9000, usb, usbcontrol


 
Forum Jump


All times are GMT. The time now is 23:46.