![]() |
Re: [Announce] USB hostmode beta release
Quote:
first q :switching speed need vbus go 0 Volts. for valid usb session vbus above 4.4 volts condition is needed . switching vbus from 0 to 5 v ( for setting speed ) will trigger an interrupt activating khubd, but usb phy and driver are not in a stable state and khubd go crazy ( timeout ). generic or custom KP kernel don't know how to switch isp1707 speed ( is "platform dependent" and not allowed when vbus is 5V ). if some patches will be writen for vbus switching in kernel some processes ( bme ) need to be stopped for leaving i2c device bq24150 free to controll. and for vbus stable a timer doing any action every less 32 s on bq21450's i2c interface also is needed so pointing from kernel space to bme and setting a timer look ugly it is easy doing all selections from userspace second q: is not a problem |
Re: [Announce] USB hostmode beta release
I see that problem from kernel hostmode patch (error messages in musb_procfs.c), but I was not sure if switching vbus is only problem. But I started looking around bq2145x chip and I will write kernel module(s) for bq chip and charging...
|
Re: [Announce] USB hostmode beta release
The jumper cables are a nice touch :)
|
Re: [Announce] USB hostmode beta release
@blue_led
the userland autospeed has one problem: it needs to either depend on sysklogd being installed or use kmsg directly. You need to support both cases, or rdepend on ksyslogd pkg. You are aware you can find about lowspeed vs high/fullspeed devices by reading out the status registers of PHY, and IIRC they are even printed in syslog. on one the D+ is low while on other the D- is low (see USB 101 about lowspeed vs full/highspeed signalling via pullup R) [maybe the prev isn't all correct as I haven't re-read the specs myself just now, it's a while since I last looked into them] Great to see your progress, while I clearly suck delivering that stuff :-D Keep in mind it may take quite some time after disabling boost mode until VBUS drops to a sane level so you can switch speed. Maybe testing VBUS voltage may give a clue, or just insert a short (some 5..15s) charging phase so bq24150 will try to pull power and thus discharges VBUS rail. Otherwise musb_core might not allow proper changing of speed. cheers and keep hacking jOERG |
Re: [Announce] USB hostmode beta release
Quote:
i think there is a bug or some curent leakage on d+ line so with no device attached the driver see a full/high speed device. also some modern usb devices don't have a physical resistor on data lines. they are inside asics and connected by inside fet transistors as found in isp707. i can't control how kernel deal with those cips . and i think this pull-up resistor is not connected instantly so the driver don't act well. in sys log i see "Forcemode... no device attached" followed immediately by "Forcemode ... full spped device detected" . my script is "event driven" so it wait for vbus changes, and sys messages. setting speed is not a problem but driver don't act as expected. in one case i see "b-host" state :D Late edit: i found proper ( stable) procedure for sensing low speed devices when high or full speed is set. rmmod g_file_storage is the key ( workaround ) . proper solution is interrupt deactivation for "vbus stable" |
Re: [Announce] USB hostmode beta release
Quote:
On systems that have no /var/log/syslog OTOH you either install sysklogd pkg to get /var/log/syslog, or you need to use /proc/kmsg. Quote:
cheers jOERG |
Re: [Announce] USB hostmode beta release
you are all right.
dropping vbus activate g_file storage and i don't need this. i have final scenario: 1 stop bme 2 vbus on 3 rmmod g_file_storage 4 force low 5 F > .. 6 listen to messages ( hard speed detection ) 7 if no message >> low speed device if full/high message >> go further ( step 8 ) if no device >> exit 8 put usb in stable state ...... ( here need more tests including modprobe g_file_storage or switch to peripheral ) 9 force full 11 F > 12 if message "force ..error... high speed device .. but not high.." >> go high ( soft speed detection ) exit i don't see a fastest way |
Re: [Announce] USB hostmode beta release
@blue_led:
What about modifing musb_procfs.c (or in other kernel parts) to do this detection in kernel? |
hostmode . the script
1 Attachment(s)
@pali
it can be very possible, even OTG mode but this depend on vbus switching and the patch will be very specialized pointing only for rx51 sensing speed of device can be done without a timer for bq24500. 32s is enough for all jobs now it is clear for me how to do this. as my post above.. first part ->hardware detection of the device power the vbus and read debug register here we have 3 cases 0 no device 1 low speed device 2 high or full after this, speed can be set and read device descriptor if the device is high speed then switch high speed devices can be read in full speed mode the goal of my script is to prove the concept @everybody [Announce] The n900 hostmode script features: icon, automatic speed, status area icon ,notifications, mass sotorage automount, no gui unzip the attachment in a folder as root run Code:
chmod 755 install.sh please reload To support efforts press "Thanks" |
Re: hostmode . the script
Quote:
cheers jOERG |
All times are GMT. The time now is 22:01. |
vBulletin® Version 3.8.8