View Single Post
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#67
Originally Posted by Estel View Post
Pali, every time I edit PatternBoost to my liking, upon next start of usbmode, it forces mceledpattern to comment *out* PatternBoost, and add it again, with default settings set by You. It's very irritating, had to delete whole led-editing part of code from usbmode.sh (and check for it, 2 lines later).
Ok, I will try to fix this bug.

Originally Posted by Estel View Post
Also, there is already PatternVboost, doing same thing, introduced by H-E-N since improved booston script by joerg (=since last update in -devel). This one was needed to be introduced manually, but many hostmode users have it already.

wouldn't it be good idea to check for PatternVboost (like now, script checks for PatternBoost), and if it is here, leave it alone and use - otherwise, adding PatternVboost, that will work with both USB Mode and H-E-N?

Thanks a lot in any case,

/Estel
I did not know about it. But changing pattern again is not good idea...

Originally Posted by Estel View Post
// Edit

Pali, as for "pure" hostmode working, it's great - "automatically" enumerated my USB Hard-Drive on first try. although, when tracing dmesg output, at the same time when device is enumerated, I see "Forced hostmode error: High-speed device connected, but no high-speed mode selected".
First speed is always low, because there is no way to detect if usb device is low speed. So some error messages in dmesg are OK.

Originally Posted by Estel View Post
My HD works in both full-speed and high-speed mode (most pendrives too, I think). Of course, during hostmode start, it wasn't enumerated on low-speed, and got enumerated (+blinked) only on full-speed test. Then, hostmode immediately decided "job done", and haven't started enumeration again (no more blinks on HD).

Have it changed to high-speed during-runtime, without another enumeration, or is it working in full-speed only? How can I check that, what should I search for in dmesg? How USB Mode handles devices that can work in *both* full-speed and high-speed (but, obviously, high-speed is preferable)?
New kernel export sysfs entry /sys/devices/platform/musb_hdrc/hostdevice with speed of usb device. usbmode.sh script first try low speed. it read "supported" speed from that file and try them until usb device will not be visible in lsusb. if there are more supported speeds script continue to try next.

Originally Posted by Estel View Post
Sorry for long description, but I think it's necessary to properly understand why I'm asking, and what I'm asking about

// edit 2

And another question - when it's already in hostmode and ke-recv mounted external USB disk, upon switching to peripheral, does umount automatically, or one should do it by hand, before activating periph. mode?

If it doesn't (umount automatically), maybe it would be good idea?
Unmounting in ke-recv is very very bad. ke-recv umount SD cards & usb disk but after they disappear from system (too late). When you remove back cover GPIO switch immediately power down SD card (no sync, no umount). Ke-recv will get this switch signal after 1s and then it call umount (but fs sync cannot be done because card is already disconnected). And same it is with usb disks. Ke-recv will get signal that host mode is deactivated and then it call umount (again too late...)

So I had idea to add umount button into file manager. But file manager is closed :-( Next I got idea for SD card: when kernel receive that gpio switch event it first sync & umount card and then it power down. But I do not have idea if we can call umount from kernel.

And for usb disks in host mode maybe it will be really good to call umount. But problem can be how to determinate disks names (in /dev) which some from usb device (which will report lsusb)...
 

The Following 4 Users Say Thank You to pali For This Useful Post: