Active Topics

 


Closed Thread
Thread Tools
Posts: 223 | Thanked: 79 times | Joined on Apr 2010 @ Lebanon- Beirut
#981
first i want to thank everyone for their hard work to make this possible. But the talk her is too technical i couldn't understand everything and the wiki didn't help a lot. I have a few questions, where exactly have you reached guys in making OTG easy to use for everyone? will a normall cable (mini usb - USB) work?
 
Posts: 190 | Thanked: 19 times | Joined on May 2010
#982
well can we have a tutorial on this? step by step? please

tenQ
 
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#983
where exactly have you reached guys in making OTG easy to use for everyone? will a normall cable (mini usb - USB) work?
This isn't OTG. It is NOT easy to use for anybody, as it doesn't exactly work at all yet. If eventually we get to have a plain working hostmode, then a simple adapter A-FtoA-F will suffice, together with your CA-101 cable that came with the phone.

well can we have a tutorial on this? step by step? please
As soon as we got something useful to describe in such a step by step HowTo, of course you'll get one and we'll do a BIG announcement on that - we're just not there yet.
So please stay calm and patient, we're working on it. The previous posts might suggest there's more than we actually got, but we are close

[edit]
The HowTo will be very simple btw (just the package is still missing ;-D ):
install package hostmode-easy-now
klick the h-e-n icon
from the menu select "hostmode, powered" (a red USB icon will show up in systray area)
attach your USB keyboard, memstick, IrDA adapter, or whatever, using your CA-101 cable and a female-to-female adapter
or
from the menu select "hostmode, charging" (a white USB icon will show up in systray area)
attach your USB peripheral and a USB charger capable to deliver at least 1A, using CA-101, F2F-adapter, and a Y-cable

To stop hostmode, or to switch between powered and charging hostmode, click on systray and select the option you like from the pulldown menu

To finetune hostmode behaviour, click h-e-n icon, and select "config" from menu.
You will see a list of all previously attached USB peripherals that have been configured, plus the currently attached peripheral which is highlighted. On the right you can select for the highlighted item whether your N900, when the peripheral is being plugged in, should automatically change from powered to charging mode (for selfpowered drives etc), and if the screen dim should be disabled. There's also a wildcard item with the name "powered mode" in the list, which will have "disable dim" option only, to disable dimming of screen as long as device is in powered hostmode (you might not care about saving screen backlight power, while USB blasts out 5V to a hungry peripheral)
There's also an option to make indicator LED flash red during powered hostmode, to warn you about the power drain.

hostmode-easy-now will power up the USB and enter hostmode as soon as you click the h-e-n icon and the main menu shows up. Depending on your selection, it will switch to hostmode,charging, or revert to whatever was the USB state before on selecting "config".
When hostmode wasn't enabled when you click the h-e-n icon, and the automatic enabling of powered hostmode makes an already attached peripheral become visible for N900, and if this peripheral is a configured item, then the hostmode and other option are set according to the config for that item, and the main menu is closed immediately. Put simply, if you first attach a known and configured device, then clicking h-e-n is all you need to do to make it start.
__________________
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-30 at 14:25.
 

The Following 15 Users Say Thank You to joerg_rw For This Useful Post:
Posts: 75 | Thanked: 78 times | Joined on Jan 2010 @ Germany
#984
I used some perl magic to grant DocScrutinizers wish of having DBG-statements in every function in usb/.

just call the attached perl-script with a parameter (either a single .c file or a directory => it will recursively process each .c file).

the script makes a backup of each .c file and adds DBG-statements in every function and before every return-statement or end of function.

ATTENTION: the script uses the program "indent" to generate homogeneous code to avoid parsing errors (the "parser" is not very foolproof). The program must thus be installed, and the line-numbers may not be the same as in the original source-files.
Attached Files
File Type: txt insert_dbg.pl.txt (1.7 KB, 161 views)
 

The Following User Says Thank You to hcm For This Useful Post:
Posts: 243 | Thanked: 172 times | Joined on Sep 2007 @ silicon valley
#985
I am typing this in from a USB keyboard hooked up to an external hub that I got working with just force host. It was not via the HNP trick.

I have tried different hubs connected directly. I can also unplug the keyboard, plug one hub into the other, plug in the keyboard to the cascaded hub, and use it from there. Unfortunately detecting disconnects / connects after initial enumeration is not 100%reliable.

Mass storage doesnt seem to be working for reasons I dont know yet. Mass storage devices are detected as shown with lsusb.

I have had a keyboard and a keyboard/touchpad plugged in and operating at the same time - this is what I have available right bow other than the mass storage.

I tried connecting my keyboard directly without the hub and it showed up in lsusb but did not work, no characters typed showed up on the screen.

I am using a power injection cable. It also works with the bq power instead of power injection, but a powered hub still seems to be required.

The additional changes to what I did before that seem relevant are disable usbcore autosuspend and then making the musb SUSPEND interrupt a noop when forcing host mode. Also, disabling the usb whitelist appears to causes issues with the gadget driver, grep your syslog for "cut". So for now it seems better to leave whitelist configured but really allow everything.

The switch to host is not 100% reliable, probably due to ulpi timeouts. These happen for reasons I don't know.

[edit] As it stands host mode only works with connecting the id pin first. The interrupts that happen when applying power first cause a session to be opened as a peripheral, which interferes. Working on it.
Attached Files
File Type: txt syslog.excerpt.txt (4.8 KB, 249 views)
File Type: txt lsusb.verbose.txt (14.4 KB, 211 views)

Last edited by sarahn; 2010-05-31 at 11:48.
 
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#986
sarahn
extremely encouraging results, indeed. :-)
You have any idea why we need a hardware ID_GND and can not fake it?

would you mind posting a proper diff so we can know what exactly you patched in kernel and also which kernel that is based on, please.
A super nice-to-have of course would be if you could apply hcm's pearl script to the whole usb folder (of course after you created the diff), and also supply the result of that, so we finally get an idea what's happening in detail when forcing host mode, function by function - kind like a trace.

many thanks
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: 61 | Thanked: 24 times | Joined on Apr 2010
#987
I think you guys should see this:





It is still in beta stages...
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#988
Originally Posted by Nokia7Linux View Post
I think you guys should see this:

It is still in beta stages...
Quite ironic to see the pics watermarked since...
http://talk.maemo.org/showthread.php?t=31921&page=91
 

The Following 10 Users Say Thank You to MohammadAG For This Useful Post:
Chrome's Avatar
Posts: 349 | Thanked: 309 times | Joined on Feb 2010 @ PS/IL
#989
Originally Posted by Nokia7Linux View Post
I think you guys should see this:

It is still in beta stages...
MohammadAG took these pictures, and i credited him in m4a thread.. No need to post them with the watermark
 
imperiallight's Avatar
Posts: 857 | Thanked: 362 times | Joined on Feb 2009 @ London
#990
I have had a keyboard and a keyboard/touchpad plugged in and operating at the same time - this is what I have available right bow other than the mass storage.
Awesome, does the touchpad work properly?
 
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 15:59.