usb_modeswitch is needed to get some UMTS devices to work, because they appear as mass storage devices for a "Windows-Zero-CD-Experience" and get switchted to another USB mode (modem mode instead of storage) by the windows drivers. This switch has to be done by usb_modeswitch or else the GSM/GPRS part of the card won't work with linux, so it *is* a needed package in my opinion. The devices are namely: GlobeSurfer Icon (aka "Vodafone EasyBox") GlobeSurfer Icon 7.2 GlobeSurfer Icon 7.2 with HSO driver interface Icon 225 HSDPA (aka "T-Mobile web'n'walk Stick") GlobeTrotter HSUPA Modem (aka "T-Mobile wnw Card Compact III") GlobeTrotter GT MAX 3.6 (aka "T-Mobile wnw Card Compact II") GlobeTrotter EXPRESS 7.2 (aka "T-Mobile wnw Card Express II") Huawei E220 (aka "Vodafone EasyBox II", aka "T-Mobile wnw Box Micro") Huawei E270 Huawei E630 (Experimental!) ZTE MF620 (aka "Onda MH600HS") ZTE MF622 Novatel Wireless Ovation MC950D HSUPA and XU950D Novatel U727 USB modem See also: http://www.draisberghof.de/usb_modeswitch/ Please ask if there are further questions/quality issues with the ebuild. I'd would also maintain the package, if no one else is willing to do so (and if that's possible).
Created attachment 146626 [details] usb_modeswitch-0.9.3.ebuild
1/ Do NOT call gcc directly, it breaks crosscompile. We have tc-getCC function in toolchain-funcs eclass for this. 2/ We have dosbin for installing stuff to /usr/sbin
hmmm. Question: this is for USB-Hardware? Then I would suggest to include an udev-rule to call this tool automatically this after the device is plugged in. There're some examples on the project-homepage...
btw: gcc -l usb -o usb_modeswitch usb_modeswitch.c should be: $(tc-getCC) ${CFLAGS} ${LDFLAGS} -l usb -o usb_modeswitch usb_modeswitch.c
As I'm not a usual ebuild writer, I did surely feel strange about calling gcc directly, but didn't know how it would be done in an appropriate way. Thanks for the correction, jakub. Stefan, theses devices are used via ohci, yes. But, they come in several flavours, some are attached to a usb port, some are pcmcia cards. The UDEV rules can't be created automatically I guess, because you need the "vendorid" and "productid" and you could only create a rule when the card is a) inserted b)in the "storage" modules at the time of emerging. I guess it's a better idea to create a "template" udev-rule and let the user fill in the appropriate values himself? Maybe a hint on how to get the values might be useful.
Created attachment 146685 [details] usb_modeswitch-0.9.3.ebuild
I meant "b) in the "storage" mode"
According to the gentoo docs, RDEPEND is needed, so I added it. Also, a default udev config (/etc/udev/rules.d/91-usb_modeswitch.rules) is created, if udev<106 SUBSYSTEM and SYSFS are used, if udev>=106 SUBSYSTEMS and ATTRS are. The rule is commented out so that it does not interfere with an existing udev-config. I also modifed the einfo at the end. I just echo'ed the correct line into the udev-config file, which does not really seem to be the best solution. Would it be better to create 2 files in usb_modeswitch/files for each condition and "doins" the correct one?!
Created attachment 147014 [details] usb_modeswitch-0.9.3.ebuild
We need http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-0.9.4beta2.tar.bz2, as 0.9.3 has some issues with udev (confirmed on udev-116 with kernel 2.6.25-r1)! Also, echo'ing udev-rules is very evil, because then we can not use normal tools like equery to query files installed by the ebuild, so I added 91-usb_modeswitch.rules.udev-ge-106 (greater or equals udev-106) and 91-usb_modeswitch.rules.udev-lt-106 (less than udev-106).
Created attachment 150886 [details] /usb_modeswitch-0.9.4_beta2.ebuild
Created attachment 150887 [details] 91-usb_modeswitch.rules.udev-ge-106
Created attachment 150889 [details] 91-usb_modeswitch.rules.udev-lt-106
I'm not sure about the udev-rules naming, is there a guide on how to do it "The Gentoo Way" (TM)? ;) I've searched a but, but didn't find anything and as it's already 1:16 a.m. I'm sure you'll forgive me that I don't search excessively right now. Will net-dialup integrate this? As "mobile computing" becomes more and more usual (I always see peoples with laptops on the train), it would be very cool to have Gentoo-packages for needed userspace tools. Kernel 2.6.25 also brought some patches (e.g. for NOZOMI, Option) so the Kernel-side works quite well now.
Last word for now: Stefan, those PCMCIA cards have an *integrated* USB OHCI controller which is accessed over kind of a "PCMCIA-bridge". I confirmed usb_modeswitch to work with this thing: http://www.o2online.de/handys/Marken/o2/o2-Surf-Card.html
*** Bug 233950 has been marked as a duplicate of this bug. ***
Created attachment 163659 [details] usb_modeswitch-0.9.4.ebuild
I made very few minor changes made to the ebuild, it works for me. Bad luck that no one wants to be maintainer. :( As mentioned above I've got such a card and I'd be willing to be beta-tester if there are changes/new versions, also it's a very easy ebuild.
In CVS (sys-apps/usb_modeswitch). Have fun :)