Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    N900 will not allow USB OTG!

    Closed Thread
    Page 104 of 110 | Prev | 94   102     103   104   105     106   | Next | Last
    geohsia | # 1031 | 2010-06-03, 06:56 | Report

    Originally Posted by titan View Post
    I have a possible explanation why it fails: my USB stick requests 200mA
    which is the limit of the N900. I'll try again with another less power-hungry device.
    I have a HDD that has its own internal power. If someone needs to test host mode with no power I am happy to give it a shot.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    titan | # 1032 | 2010-06-03, 07:15 | Report

    this my HOWNOTTO get USB hostmode working.
    I hope someone can replicate MohammadAG's success or at least find out what I did wrong.
    Warning: This is only for experts! i2cset may damage your device.

    0. you need a USB F/F adapter, the N900 USB cable and a USB device with < 200mA power consumption (verify on your PC)
    1. install MohammadAG's kernel (with sarahn's patches + power ignore patch + appropriate configuration), i2ctools (i2cset in PATH) and sysklogd
    I have PR1.2 installed, wifi on, bluetooth off, 2.5G, autodisconnect on. egoshin's method works (set to host while connected to PC)
    2. boot device with USB cable but without USB device connected
    3.
    Code:
    pcsuite-enable.sh
    optional:
    Code:
    echo USB debug start > /var/log/syslog
    and
    Code:
    echo 10 > /sys/module/musb_hdrc/parameters/debug
    4. run the attached script ("sh host.txt -d" shows the state after every step)
    5. immediately plug in the USB device
    6. check dmesg and /proc/driver/musb_hdrc
    7. to retry, unplug USB device,
    Code:
    killall sh; start bme; sleep 2; cat /proc/driver/musb_hdrc
    after about 30sec you should see:
    Code:
    Status: MHDRC, Mode=Peripheral (Power=20, DevCtl=80)
    then go to 4.

    my results: (with -d flag)
    start: Mode=Peripheral (Power=20, DevCtl=80)
    echo H: Mode=Peripheral (Power=20, DevCtl=82)
    echo e: Mode=Peripheral (Power=20, DevCtl=82)
    echo F: Mode=Peripheral (Power=60, DevCtl=83)
    bme stopped: Mode=Peripheral (Power=60, DevCtl=83)
    slept 3sec: Mode=Peripheral (Power=20, DevCtl=80)
    i2cset: Mode=Peripheral (Power=f1, DevCtl=99)
    later: Mode=Peripheral (Power=e1, DevCtl=99)

    for the description of the power+devctl flags see drivers/usb/musb/musb_regs.h

    with egoshin's method:
    Status: MHDRC, Mode=Host (Power=f0, DevCtl=dd)
    OTG state: b_peripheral:3; active

    dmesg:
    Code:
    [ 1863.465087] musb_restore_ctx_and_resume  435: restoring register context for musb_restore_ctx_and_resume
    [ 1863.465087] rx51_xceiv_power 1
    [ 1863.465698] rx51_xceiv_reset
    [ 1863.850799] musb_interrupt       1948: ** IRQ peripheral usb0001 tx0000 rx0000
    [ 1863.850830] musb_stage0_irq       643: <== Power=e5, DevCtl=99, int_usb=0x1
    [ 1863.850860] musb_stage0_irq       829: SUSPEND (b_idle) devctl 99 power e5
    [ 1863.874389] musb_interrupt       1948: ** IRQ peripheral usb0001 tx0000 rx0000
    [ 1863.874420] musb_stage0_irq       643: <== Power=e1, DevCtl=99, int_usb=0x1
    [ 1863.874420] musb_stage0_irq       829: SUSPEND (b_idle) devctl 99 power e1
    [ 1871.680358] musb_platform_try_idle  160: b_idle inactive, for idle timer for 7 ms
    what MohammadAG got with the same commands (his device is in R&D mode, but it didn't make a difference for me):
    Status: MHDRC, Mode=Host (Power=f0, DevCtl=dd)
    OTG state: a_host:9; active

    with flash plugged in (not powered on)
    Status: MHDRC, Mode=Host (Power=e0, DevCtl=99)

    with bme:
    Status: MHDRC, Mode=Host (Power=20, DevCtl=80)
    MohammadAG: OTG state: b_idle:1; inactive

    If I first apply egoshin's method I get
    Status: MHDRC, Mode=Host (Power=e1, DevCtl=99)
    OTG state: b_idle:1; inactive
    but again no device is detected.

    Edit | Forward | Quote | Quick Reply | Thanks
    Attached Files
    File Type: txt host.txt (526 Bytes, 439 views)

    Last edited by titan; 2010-06-03 at 08:16.
    The Following 12 Users Say Thank You to titan For This Useful Post:
    Bec, clasificado, forcer, hcm, joerg_rw, Marshall Banana, MohammadAG, osama, S0urcerr0r, skoteinos, v13, Venemo

     
    Bec | # 1033 | 2010-06-03, 07:35 | Report

    Thanks a bunch, please keep this post up to date as new info becomes available

    I'll bookmark it.

    Edit: is it possible that different versions of the firmwares may affect this?

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by Bec; 2010-06-03 at 07:39.

     
    MohammadAG | # 1034 | 2010-06-03, 09:05 | Report

    titan, just a note, according to lsusb -v my flash drive also uses 200mA.
    Doing some tsts after you left I can see what you experience. I'm afraid at the time being you'll have to time it right after running the script.

    Anyways, I can still reproduce it

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to MohammadAG For This Useful Post:
    Bec

     
    KOJAN | # 1035 | 2010-06-03, 09:13 | Report

    Originally Posted by titan View Post
    ...1. install MohammadAG's kernel (with sarahn's patches + power ignore patch + appropriate configuration), i2ctools (i2cset in PATH) and sysklogd...
    Where I can download MohammadAG's kernel?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    MohammadAG | # 1036 | 2010-06-03, 09:16 | Report

    Originally Posted by KOJAN View Post
    Where I can download MohammadAG's kernel?
    Apply the patches and build a kernel.
    A binary won't be provided till the app is released

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to MohammadAG For This Useful Post:
    Bec, clasificado, KOJAN, S0urcerr0r

     
    Bec | # 1037 | 2010-06-03, 09:19 | Report

    Isn't it possible to stop any event from happening with the stick connected so that we could use two scripts, one to let the device recognize the connection only when we want it and then "host.txt"?
    This could solve our synchronization issue.

    Can't the 200mA limit be overridden with kernel patching?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    MohammadAG | # 1038 | 2010-06-03, 09:20 | Report

    The 200mA limit is a hardware one.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 4 Users Say Thank You to MohammadAG For This Useful Post:
    Bec, clasificado, S0urcerr0r, skoteinos

     
    Bec | # 1039 | 2010-06-03, 09:24 | Report

    Also since the sate of an USB device being connected becomes a state defined in the ram memory of the device, would it be possible to simply patch (some of) the code in the ram to skip some of the steps?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    clasificado | # 1040 | 2010-06-04, 09:11 | Report

    @Bec no offense, but this has been requested already, please keep this thread for development only.

    use this thread instead for petitions and questions. developers comment there too

    http://talk.maemo.org/showthread.php...ight=host+mode

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to clasificado For This Useful Post:
    Bec

     
    Page 104 of 110 | Prev | 94   102     103   104   105     106   | Next | Last
vBulletin® Version 3.8.8
Normal Logout