# udev hack for usb_modeswitch

## idlecool

hi,

 i am a complete n00b to gentoo and i have a internet connection which work on ppp connection..

the modem i use for connecting my computer is a switchable usb device, and work as usb mass storage device when i plug it in.. so i use usb_modeswitch http://www.draisberghof.de/usb_modeswitch/ on ubuntu to get the usbserial mode of my usb modem and then wvdial to connect to the internet..

as install disk of gentoo donot have wvdial as well as usb_modeswitch program... what should i use to get connected to internet??

Is there any manual udev way to resolve my problem??

This is the output before the action of usb-modeswitch on ubuntu:

root@devbox:/media/F872F0FD72F0C184/Users/idlecool/Downloads# lsusb

Bus 006 Device 003: ID 19d2:fff5 ONDA Communication S.p.A.

This is the output after converting my device to usbserial mode on ubuntu:

root@devbox:/media/F872F0FD72F0C184/Users/idlecool/Downloads# lsusb

Bus 006 Device 005: ID 19d2:fffe ONDA Communication S.p.A.

i have posted a blog regarding this issue on ubuntu.. http://www.idlecool.net/blog/usb-modeswitch-issue-with-reliance-netconnect-zte-mg880-cdma-1x-ubuntu-linu/ i hope this would help to understand what my problem is.  :Smile: 

I want to do the same with gentoo.. any hints??

----------

## M

Hi, you will need udev compiled with +extras use flag. This way you will get modem-modeswitch binary in /lib/udev and modem-modeswitch rules file. I had to add id for my device since it wasnt listed but many devices are already there.

----------

## idlecool

thanks for your post.. but i am not getting how to do that..

should i download source code of udev and install it on the live environment? i have no past experience with gentoo or similar operating systems.. i am from ubuntu/debian/fedora background.. so can you please elaborate

----------

## M

Aha, you don't have alternate net connection... I am not sure if udev on livecd is compiled with extras, if it is you should have 

/lib/udev/modem-modeswitch binary. You can use that like it is in rules file, that is:

modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"

I am not sure if gentoo livecd have wvdial or minicom, I recomend you use http://www.sysresccd.org livecd, based on gentoo, it have X, and also have ppp and minicom installed, no wvdial.

----------

