maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Announce: USB Mode (easy switch to USB host mode) [in Extras-Devel] (https://talk.maemo.org/showthread.php?t=85658)

pali 2012-10-26 09:01

Re: Announce: USB Mode (easy switch to USB host mode)
 
Quote:

Originally Posted by dann9 (Post 1285727)
i can't install usbmode/usbmode_1.0-2_armel.deb on my n9.

i can't find SSU repository for hartman.

Who can help me?

Nobody, because host mode is for N900.

dann9 2012-10-26 09:43

Re: Announce: USB Mode (easy switch to USB host mode)
 
Quote:

Originally Posted by pali (Post 1285737)
Nobody, because host mode is for N900.

thanks for your Replay :(
there is somenthing like this for n9?

foobar 2012-10-26 18:15

Re: Announce: USB Mode (easy switch to USB host mode)
 
Edit: Nevermind

adelalgomai 2012-10-26 19:19

Re: Announce: USB Mode (easy switch to USB host mode)
 
Hi guys >>
sorry for bothering u ,, but I have a big problem >> the most thing I need to do with usb host, is controling my N900 with extenal mouse .. and I managed to do that with hostmode gui..
I successed to connect both: usb mouse and usb keyboard at the same time with no problems . at that time, I had ( bt-hid-script), (hostmode-gui) and (kernel 46) installed on my N900 ..
>>
now I removed all ( kernel 46 - bt-hid-script - hostmode )
and I installed ( kernel 51r1 - usbmode ) instead .
I can connect a flash driver ,, it's nice... but cannot connect usb mouse.
I installed (bt-hid-script) again and tried , but no result .
then , removed it , and installed (extmou) . but no result .
and even tried all scripts and packages that belong to mice , but no result ...
please help me , can I use my mouse with usbmode ? or have to remove it and back again to hostmode ? or maybe have the both ??

stuart34 2012-10-27 11:19

Re: Announce: USB Mode (easy switch to USB host mode)
 
I was able to power (if not charge) my N900 in USB host mode using a "StarTech 3 feet USB Y Cable for External Hard Drive - Dual USB A to Micro B" cable that I found on http://www.amazon.co.uk/StarTech-fee.../dp/B0047AALS0

I did a test starting with a almost full battery and my N900 connected to a Apple USB-Ethernet adapter and a 1000 mA USB charger connected via the Y cable. My N900 was running x11vnc, WifiEye (WiFi) and Mappero (GPS) and had several active ssh connections. My N900 switched off with an empty battery 345 minutes later. I guess that the N900 was receiving my power from the charger but not enough to power the CPU, GPS, GSM and WiFi.

While this was running, /sys/class/power_supply/bq24150-0/status said "Charging". I'd guess that this is not quite true. The N900 was receiving power but not enough to run the N900 and the battery was emptying. /sys/class/power_supply/bq24150-0/charge_current says "1750". What does that mean? I doubt that it means that the N900 is receiving 1750 mA.

Starting with an empty battery (I charged it just enough to get into USB host mode), I'm now running as before except without x11vnc, WifiEye and Mappero. An hour later the N900 is still alive so it must be getting at least enough power to run if not charge.

I have a 4 questions, when in USB host mode how can I (1) find the current the N900 is currently drawing from the charger, (2) find the current the N900 is currently using, (3) find the battery level, and (4) make the N900 charge at 1000 mA? Looking at https://gitorious.org/rx51-bme-repla...415x_charger.c I guess that I need to write "host" into
/sys/class/power_supply/bq24150-0/mode and then "800" into /sys/class/power_supply/bq24150-0/current_limit. I don't want to write "1000" because then it would charge at 1800 mA (the values seem to rounded up).

ade 2012-11-07 20:09

Re: Announce: USB Mode (easy switch to USB host mode)
 
3 Attachment(s)
Quote:

Originally Posted by ade (Post 1244073)
Pali,

Would it be possible to display the current USB mode right under the "USB mode" text as secondary text in the status menu?
Just like "USB connected" shows "charging only" as secondary text when charging and not in Mass storage mode.
It would then have to display "USB periphal mode" when not in host mode.

I'm afraid I will have to do it myself then... ;)

So I created a patch for this to achieve. It is a small change, also using some of your own code.

The status menu item checks the current USB mode at startup and on close of the started applet. It will add "Peripheral mode", "Host with boost" or "Host with charging" beneath "USB mode".

Next to usbmode-status-menu-item.c, I modified yesterdays updated version of usbmode.sh, so it will not display the current mode in a banner. If I would leave it this way, it would show the banner on startup and after the closing of the applet. That would be a bit too much, especially when the USB status can be checked in the status menu.

I hope you will consider implementing it. And as you are a far more skilled C programmer, please see this as a rough proposal in that case.

pali 2012-11-08 13:12

Re: Announce: USB Mode (easy switch to USB host mode)
 
@ade: I'm working on better solution how to show current usb mode in status menu plugin.

@Estel and others with timeout problem: Can you provide me your patched version or tell me which sleep you increased?

pali 2012-11-08 13:18

Re: Announce: USB Mode (easy switch to USB host mode)
 
@stuart34:

1) I think this is not possible
2) and 3) use bq27x00_battery module (/sys/class/power_supply/bq27200-0/)
4) only possible values are: 100mA, 500mA, 800mA and unlimited (which is show as 1800)

pali 2012-11-08 15:19

Re: Announce: USB Mode (easy switch to USB host mode)
 
@ade: implemented: https://gitorious.org/rx51-bme-repla...3e3a083a237d3b

foobar 2012-11-08 15:42

Re: Announce: USB Mode (easy switch to USB host mode)
 
Pali, I can't thank you enough for your work on the N900.


All times are GMT. The time now is 12:06.

vBulletin® Version 3.8.8