![]() |
Re: [Announce] USB hostmode beta release
Hello
I'm trying to use an external webcam on my n900 I need help because I am not able to enumerate the device. Is not showing up for me / dev/video2 How should I do to make it appear? What are the steps? If I need to install a driver, as I do that? (sorry if wrong in English, I used google translate) |
Re: [Announce] USB hostmode beta release
here, you are offtopic
maybe you get more considreration on dedicated thread http://talk.maemo.org/showthread.php?t=65570 |
Re: [Announce] USB hostmode beta release
patched ke-recv now can automount usb devices (like sd card), see: http://talk.maemo.org/showpost.php?p...&postcount=152
|
Re: [Announce] USB hostmode beta release
Quote:
cheers jOERG |
Re: [Announce] USB hostmode beta release
you my friend, are a legend :) is hen going to update automatically? or do we have to manually install?
|
Re: [Announce] USB hostmode beta release
HEN isn't going to update anytime soon, because package maintainer is unreachable. If I'm wrong, fix me.
/Estel |
Re: [Announce] USB hostmode beta release
H-E-N is the family name of three pieces working together:
a) a set of nasty patches to kernel, to make USB hostmode work. Done by me and Paul, then eventually integrated into powerkernel. b) some tiny but nifty scripts to handle VBUS 5V. Developed by me. c) some lean GUI app that allows user to talk to a) and b) to start and stop hostmode. Done by MohammadAG. New developments like above are mostly kernel or kernel related, and thus will not result in a new version of c):H-E-N GUI. So any update will come with either new powerkernel version, or with new version of CSSU if we get ke-recv into it. Updates to b) though might/should result in a new updated package of c), as they ship with package c) anyway. Of course you as well can simply copy the better scripts to device, as suggested in http://talk.maemo.org/showthread.php...02#post1023402 I hope this clarifies some confusion about H-E-N :-) cheers jOERG |
Re: [Announce] USB hostmode beta release
Quote:
now, i use for myself an udev rule for automount. because i am lazy* the rule point to a custom variant of original h-e-n mount routine and my actual host script ( v2, not public yet ) don't have any mount call. for same ( * ) reason cdrom rule ( sr* ) is missing it look like Code:
KERNEL=="sd*[1-9]",ACTION=="add",RUN+="/opt/host/mount.sh -M %k""run" section can be modified to point mmount program and above rule is a start point for what the rule should be. i prefer this because it's easy to be modified I propose that the ke-recv to handle battery charging, usb type detection is there and boost check also can be, to trigger charging mode. |
Re: [Announce] USB hostmode beta release
ke-recv is responsible only for mounting devices. it listen to hal events. in fremantle was mounting usb devices disabled (no reason why). I created patch which enable this feature (and fixed some problems)... Why to not use daemon designed for maemo which can do that?
handling battery charging will be done in bq2415x_charger kernel driver, onece I will write it. it will use power_supply interface (so hal and udev will see it) usb type detection is done in isp.._charger kernel driver (in upstream, not in 2.6.28) which use standard power_supply interface (and hal listen for events)... I can try to backport it to kernel-power (and test if it is working...) |
Re: [Announce] USB hostmode beta release
Quote:
At least that would be better than having some scripts floating around the thread. There is now a big amount of applications and packages not uploaded to repositories and we shouldn't contribute to that situation. |
Re: [Announce] USB hostmode beta release
ivgalves, You're right. AFAIK, current HEN works flawlessly with new booston, so joerg_rw could push update to HEN, containing latest flavor of script(s).
/Estel |
Re: [Announce] USB hostmode beta release
Now I have semi-working kernel driver for bq24150 chip for charging battery. I sent it to lkml for comments, see: https://lkml.org/lkml/2012/1/26/519 Driver does not have implemented current sense voltage and termination current sense voltage configuration yet.
So both kernel drivers bq2415x_charger and bq27x00_battery can be replacement for BME. @joerg_rw: Can you look my driver? |
Re: [Announce] USB hostmode beta release
Driver update, now boost mode for usb host mode working too :-)
This driver is now included in kp51. How to use charge: 1. turn off bme: $ stop bme 2. load module: $ modprobe power_supply $ insmod ./bq2415x_charger.ko 3. select correct charge mode: * none = limit 100mA * host = usb host/usb charger, limit 500mA * dedicated = dedicated - wallcharger, unlimited $ echo host > /sys/class/power_supply/bq24150-0/mode $ echo dedicated > /sys/class/power_supply/bq24150-0/mode how to usb host mode: 1. turn off bme 2. connect usb device 3. load module 4. enable host mode (choose hosth, hostl, hostf): $ echo hosth > /sys/devices/platform/musb_hdrc/mode 5. enable boost mode: $ echo boost > /sys/class/power_supply/bq24150-0/mode 6. enumerate: $ echo F > /proc/driver/musb_hdrc how to stop usb host mode: $ echo none > /sys/class/power_supply/bq24150-0/mode $ echo peripheral > /sys/devices/platform/musb_hdrc/mode how to revert back to bme: 1. make sure that host mode was stopped 2. unload bq2415_charger module: $ rmmod bq2415_charger 3. start bme: $ start bme Now I tested both charging and usb flash disk and both worked. Please note that this driver is experimental and can cause problems!!! |
Re: [Announce] USB hostmode beta release
Good to hear this pali!
Do you people know what hardware is used by the USB in the N9? How far are we from having USB hostmode for N9? I can help testing or porting the patch for the N9 kernel. Btw, where can I find the kernel patches of the USB hostmode work? Best regards, Rafael Diniz |
Re: [Announce] USB hostmode beta release
Quote:
/Estel |
Re: [Announce] USB hostmode beta release
Sysfs entry mode setting only current limit (6-7bit of register 0x01).
Charge current (4-6bit of register 0x04) is configured by default to 950mA. (so I think you mean this property). Same configuration is configured by charge21.sh script |
Re: [Announce] USB hostmode beta release
Another related (and potentially off-topic) comment... could you also implement the 800mA current limit that the chipset provides? I think this is useful for some wall chargers that claim to deliver 1A but actually struggle to do so and end up going into thermal shutdown.
|
Re: [Announce] USB hostmode beta release
Quote:
|
Re: [Announce] USB hostmode beta release
Hi!
So bq2415x drivers make possible to charge n900 while in hostmode? I would need to connect my n900 to active usb-hub in hostmode and charge it also while in hostmode. |
Re: [Announce] USB hostmode beta release
Quote:
|
Re: [Announce] USB hostmode beta release
I (and Estel, thanks) found issue with enumerating USB Keyboards, please check here in extkbd thread for log + details.
|
Re: [Announce] USB hostmode beta release
Having some problems. Active usb-hub connected to n900 and tried to enumerate hub and charge n900.
Kernel: 2.6.28.10-power49. $ dmesg [35922.641937] bq2415x-charger 2-006b: failed setting hook function, automode not supported [35922.642791] bq2415x-charger 2-006b: driver registred [35929.941802] bq2415x-charger 2-006b: mode: Host/HUB charger [35976.746795] bq2415x-charger 2-006b: mode: Boost [35988.928466] Forced hostmode error: no device attached [35988.929168] usb usb1: usb resume [35988.948455] hub 1-0:1.0: hub_resume [35988.948486] hub 1-0:1.0: port 1: status 0101 change 0001 [35989.057952] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000 [35989.057983] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s [35989.120300] Forced hostmode error: a full/low-speed device attached but high-speed mode selected [35989.182952] usb 1-1: new full speed USB device using musb_hdrc and address 12 [35994.182983] usb 1-1: khubd timed out on ep0in len=0/64 [35999.182983] usb 1-1: khubd timed out on ep0in len=0/64 [36004.182952] usb 1-1: khubd timed out on ep0in len=0/64 [36004.245452] Forced hostmode error: a full/low-speed device attached but high-speed mode selected [36004.307952] usb 1-1: device descriptor read/64, error -110 Commands used: $ stop bme $ modprobe power_supply $ insmod bq2415x_charger.ko $ echo host > /sys/class/power_supply/bq24150-0/mode $ echo hosth > /sys/devices/platform/musb_hdrc/mode $ echo boost > /sys/class/power_supply/bq24150-0/mode $ echo F > /proc/driver/musb_hdrc |
Re: [Announce] USB hostmode beta release
This is question for @joerg_rw:
How to correct set-up host mode with charging? |
Re: [Announce] USB hostmode beta release
Everyone working on this, thanks for the continuing work on h-e-n, something I really value since I don't need to drag a netbook everywhere, and if I read right we can expect soon full OTG!
Please push this as a H-E-N update or new package soon. Sort of OT but upthread there was mention that 50-80% was optimal battery charge. Can this somehow be set as a soft charge limit profile in some config file for people who are at home or near power and want to preserve the life of a battery at the expense of long run times? If I am going on an airplane or train I could edit it back for 100% to dead. Ideally it would be something you could click in the battery status applet. |
Re: [Announce] USB hostmode beta release
Quote:
there's no setup for charging hostmode. It's simply you don't run booston but rather charge script (please refer to my prev post that explains how to do that). And of course user is then responsible to apply VBUS +5V the right moment when normally H-E-N GUI would start booston, as the VBUS is needed by PHY and musb-core to establish a USB session, and of course it's needed by your USB peripheral for the same reason, even when the peripheral has a dedicated power supply separate from USB. You can think of VBUS as a 1 bit data signal line that tells "start session now" - both host and peripheral are monitoring that VBUS line to sync their USB chat. cheers jOERG |
Re: [Announce] USB hostmode beta release
Quote:
no, there will never be "full OTG" on N900. It's not possible physically, as the needed lines are not connected to the USB receptacle. Anyway what is your special interest in "full OTG"? It only brings HNP (Host Negotiation Protocol - host and peripheral swapping roles on the fly [1]) to USB that I never have seen being used anywhere (SRP seems to work, and ADP.is not supported by N900 hardware anyway even with better circuitry). So what is it you're missing in H-E-N that you hope "full OTG" could deliver? Quote:
* Get a modified charge.sh that uses this 4000mV theshold * stop bme * charge.sh& now your battery will kept floating at 4.00V. Alas also hal-addon-bme breaks and thus no more proper info to whole system about battery state and mode (e.g. your battery icon in status applet will not show the correct state and charge, no bat-low warnings, probably no gentle shutdown when you unplug and run flat on battery, etc) So before unplugging from USB you want to do: * killall charge.sh; # or 'kill %1' in the shell you did 'charge-sh&", or simply '^C' if you didn't start charge.sh as a background& process * start bme and hope for all the rocks fit together again so after a while bme talks to hal-addon-bme and also reports somewhat correct charge state (bme is known to get severely confused on restarts, so don't get scared when it thinks your battery is empty or whatever, it usually will adjust after a few minutes). If you're honestly interested in this then ping me, I might prepare the modified script, maybe even with a icon for desktop to click on to toggle the states Anyway, my warning in charge.sh still applies: DO NOT MESS WITH THIS unless you know what you're doing! Even while bq24150 is inherently safe and you can't really make battery explode, you are still messing with I2C bus(ses) that also run to other chip you actually could kill with a "properly" designed I2C command. (I'll not elaborate on this here, for obvious reasons) cheers jOERG [1] http://en.wikipedia.org/wiki/USB_On-The-Go#Protocols |
Re: [Announce] USB hostmode beta release
Deep in the bowels of this topic there were once a few posts about using USB host to send the N900 's audio signal to an external DAC. Has anyone succeeded in doing this?
|
Re: [Announce] USB hostmode beta release
I had misread upthread that there was a possible hardware hack to connect the ID pin for brave soldering iron jocks. Having full OTG is more for the status, even now h-e-n it just as useful.
|
Re: [Announce] USB hostmode beta release
Quote:
/j |
Re: [Announce] USB hostmode beta release
USB gurus, any comment on this?
http://talk.maemo.org/showpost.php?p...6&postcount=55 (Not the MHL part) /Estel |
Re: [Announce] USB hostmode beta release
Hi all.
Just a heads up. I can use a MIDI controller (it's a M-Audio keystation mini 32) with my n900 under sunvox. Pretty cool! Thanks for bringing usb host mode to n900! |
Re: [Announce] USB hostmode beta release
I'm on KP49 and CSSU Testing, and hostmode works great, except... I get an instant reboot every time I close h-e-n after having used and then removed any peripherals. At startup I get the "Stopping BME" banner, but the log is filled with hundreds of lines like these:
Code:
[61084.316223] power_supply bq27200-0: driver failed to report `time_to_empty_now' property |
Re: [Announce] USB hostmode beta release
Quote:
Also that message in dmesg log is not error, but only normal warnings (battery chip cannot tell you time when battery will be full - when you not charging battery :D) which will be disabled in kernel-power v50. |
Re: [Announce] USB hostmode beta release
Quote:
Stupid noob mistake. I am not worthy, but I am honored to get help from the master himself! :D Thanks for everything, pali! |
Re: [Announce] USB hostmode beta release
please keep in mind that any temperature readout from bq27x00 chip is basically useless for anything. It's just the chip temperature of that chip, which doesn't tell you anything useful about any relevant state of system or battery, since in N900 that chip is NOT inside battery as it's supposed to be, but rather soldered literally somewhere on the mainboard.
/jOERG |
Re: [Announce] USB hostmode beta release
Hey all , just wondering but what sort of thing can be plugged in to the phone once app is installed got correct cables ready to go ...
Is it just memory sticks or all usb devices ??? never really looked into this before .... many thanks |
Re: [Announce] USB hostmode beta release
Quote:
after i connect it to the female female usb i choose high speed then it says file system not available .. i ignore it and go to sunvox then what : thanks in advance :) |
Re: [Announce] USB hostmode beta release
Quote:
However, before that, you need the alsa midi drivers. I had to compile them myself since they don't come with the n900 kernel packages. I'm using 2.6.28.10-power49 (power kernel). I just uploaded them to: http://202.65.223.218/~pigeon/power49-midi-modules.tgz I also have a shell script that sudo insmod the modules in the right order. Hope it helps. |
Re: [Announce] USB hostmode beta release
Quote:
i know how to install a .deb file but i dont know how to install .tgz Quote:
|
Re: [Announce] USB hostmode beta release
Quote:
Would you happen to know what driver(s) would be needed to make the N900 output digital sound through its USB port in host mode, just like a desktop Linux does when connected to an external DAC ?... TIA, fp |
| All times are GMT. The time now is 15:34. |
vBulletin® Version 3.8.8