![]() |
Re: Thread for problems getting USB hostmode working.
m unnable to mount my flash drive...
it says no system file... cn ny1 help???????:( |
Re: Thread for problems getting USB hostmode working.
Quote:
booston boostoff in console (not 2 at once, use only one that You want in the moment) - don't need to put anything before or after that command, but be sure that You're root. Overall, executing this commands act exact same way as enabling, for example, leafpad - You don't need to provide path to the file, just call it out from the console. 2. Good guessing - you need to download it, and put whenever You want in Your phone, except MyDocs, that by default is nk-exec. BUT, to execute THAT script, You need to provide full path to it, so putting it into root ("/") directory can be good idea. Personally, i would recommend to rename it to something like "charger", without .sh or .txt. - faster executing. If You put it into root, You type in terminal: /charger (or whatever name You renamed it to). Notice the "/" - that because you must provide full path to the file. So, if you place it under "/home", to execute charger you need: /home/charger also, If you download it on Your desktop computer with windows/mac/whatever system that doesn't keep file permissions, You need to: chmod 775 /charger to make it executable - other way You get "permission denied" reply, what was the case for me. Remember, that in my examples charge.sh.txt was renamed to "charger" (without any extensions). Also, about executing whole thing - this is very straightforward, if You know that joerg_rw was executing many other commands to just "show" that battery is charging. you don't need to do that. to achieve charging during hostmode, You need literally 2-3 commands (depending on situation), and to have charging script downloaded and put somewhere on Your phone with executable rights. Then, You just: 1. start hostmode as normal, select speed, vbus, enumerate, mount if You connected storage media... 2. without disabling HEN, open xterm and use: boostoff 3. Next, do (in case that Your charging script is renamed to "charger" and put into root directory): /charger script will start its job... From my experience, if second output is like: Status: 0x10 Mode: CHARGING Full: 0 WallCharger: 0 Battery Voltage: 4150 NAC: 1987 Battery level: 97 % .. then you're all done. You can minimize xterm (DON'T close it - charging will stop after 10 seconds, if you close Xterm, because that terminates script going inside it). If You want to do something inside xterm, just click "xterminal" on upper part of the screen, then choose "new" (Yea, i know its basic thing, but i was searching for few hours how can i do something in terminal while charging during hostmode... 0_o... shadowjk kindly and mercifully brightened me up...). But, if Your second line in output after executing "/charger" is like: Status: 0x20 Mode: STANDBY Full: 0 WallCharger: 0 Battery Voltage: 3967 NAC: 1999 Battery level: 97 % ...then you need to press ctrl+c (that will stop script and allow You to type in same terminal window again) and execute: /charger ...again. This time You're done for sure. --- Side note: I don't know why in joerg_rw example we must use "/charger" twice. For me, 99% times it work just after first try - i double checked, if charging really goes on. But, literally one time, i get STANDBY - so, i just followed joerg_rw advice, ctrl-c'ing. I don't know why this work like that - i think joerg_rw know, so we can ask him ;) Last but not least, Your question about externally-powered things, like hard disc. I suppose that you know about "y-cable" thing to charge while hostmode, OR - method that i prefer - USB 2.0 active HUB (this way You DON'T need "y-cable"). Then, if your HDD or CD/DVd is powered externally by own power supply - that doesn't matter for charging while hostmode at all. HDD use own power, and Your N900 use Y-cable power or active HUB power. IF HDD need to draw much power from USB line, Y-cable or powered HUB should provide it - again, you don't care about that. Sometimes, HDD's got own Y-cable, that you literally plug into 2 ports, to draw 1A instead of 500 mA (500mA is current limit for 1 port) - in that case, active HUB is a must (or You just use additional 5V charger with USB port - this way, You need to use additional wall plug, and you plug powering part of HDD's y-cable to that charger). Another side note - sometimes, externally powered things like HDD's and USB printers also provide 5V at their USB PLUG (not port... don't ask about design). This way You can charge during hostmode by just connecting that peripheral to Your N900, without Y-cable or active HUB ;) It's funny to see how Your N900 print using printer, and the same time it is CHARGED by that printer... But, i encountered literally ONE printer like that. Normally, externally powered printers doesn't need current on USB plug, neither doesn't provide it. If You got any additional question, just feel free to ask. And, don't be scarred by length of that post - i tried to cover every aspect of charging during USB. In most cases it is as easy as executing 2 commands in xTerm... |
Re: Thread for problems getting USB hostmode working.
Estel,
many thanks for this excellent explanation. :-D cheers jOERG |
Re: Thread for problems getting USB hostmode working.
1 Attachment(s)
Hi,
I tried hostmode again today and for some reasons my N900 no longer 'see' my drives. I was able to attached them and worked with them before with N900. I checked the hostmode file, it seems that h.e.n. sees the drive, but N900 could not mount it. I have power kernel 47. Would appreciate some help. thank you for your time, cheers, Attached is the hostmode file. |
Re: Thread for problems getting USB hostmode working.
@Estel, thank for giving me the helping hand.
I am able to connect(to both of my drives) again. The solution: one really needs to SLOW DOWN. For my case, I select the speed, then set the VBUS boost on, then select "enumerate" and then wait for at least 5 seconds(I went to check the log to ensure that no newer entries are written to it), and then select the 'mount'. As for charging, I got sleep 1 status 0x00 status: 0x00 mode: STANDBY FULL so, I don't know whether it is working for me or not; but my guess is that it is not working. The 'status:0x00 mode: STANDBY FULL' message repeat itself at the xterm with the value of Battery Voltage dropping at each successive message. What is the difference between status 0x00 and 0x02? I have tried the CTRL-C and then re-executed the charger script; but I got the same result(ie. status 0x00 and STANDBY FULL) One more observation, there is about 3 to 5 seconds wait time between the 1st and then the showing of the 2nd messages. As a recap, I connect the stuffs as follows: 1. 4-port usb hub connects to the wall A/C. 2. n900 connects to the hub with a straight usb cable 3. usb drive connects to the hub with a Y-cable Cheers, |
Re: Thread for problems getting USB hostmode working.
Are You sure that Your battery isn't full or almost full, when You try to charge it while hostmode? I'll try to replicate this after my next charging cycle, but message seems quite self-explanatory. Can You post here Your voltage readings, when You got that message? Also, could You try hostmode charging with battery ~50% (or lower, just to be sure)?
I'm glad that You succeed with mounting. Hope that charging will go as well. |
Re: Thread for problems getting USB hostmode working.
You're reading it wrong for starters,
it's not "STANDBY FULL", it's: Status: 0x00 Mode: Standby Full: 0 Wall: 0 Status code is directly from the hw chip: 0 - Standby 1 - Charge in progress 2 - Charge done Mode and Full are just flags tracked by the charge script for its own use. Wall is whether wall charger has been detected. Things to note: The charger chip is programmed on script start. There's no error recovery. Chip resets to defaults on some error conditions. This means in some circumstanced the charger chip can go back to its defaults, which are to charge the battery to 20-40% at a slow rate. The logs written in /home/user/MyDocs/ can provide some hints to whether there has been a fault condition. |
Re: Thread for problems getting USB hostmode working.
USB sticks, mouse, and keyboard are working for me, but not my SD card reader (it does not show up as /dev/sd* and mount does not work). I get the following from dmesg:
Code:
[15168.828552] hub 1-0:1.0: hub_suspend |
Re: Thread for problems getting USB hostmode working.
Also I tried to use an (unpowered) hub to use mouse and keyboard both with it and that did not work, I get the following from dmesg:
Code:
[15680.245086] wlan0: roaming signal from driver, sending LOWSIGNAL |
Re: Thread for problems getting USB hostmode working.
It MAY be the same problem cheve had with mounting - being too hasty. until i learned to click "VBUST ON" 2-3 seconds after plugging cable, and "Enumerate" after another 6-7 seconds, many times i get same errors.
Also, remember to always unplug device (be it HUB, stick, mouse, whatever) from N900 before trying to start from scratch. Cable and adapter can sit on N900, but nothing can be connected to them. You can connect anything only after setting speed (then, do not exceed 3-4 seconds before You click VBUS ON, but also don't do it 0.1 second after plugging device - not too late, not too early), otherwise you get exact same errors. At least, that is in my case, always, 100% reproduceable. On side note, i would NOT recommend plugging and unplugging again cable direct from N900 when You want start "hostmod(d)ing" from scratch - it's better to unplug device/adapter from end of the cable. We don't want to stress too much our N900 USB port... |
| All times are GMT. The time now is 01:30. |
vBulletin® Version 3.8.8