Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
Flo
Posts: 13
Joined: 05 May 2009, 23:29

What do I do after I run ModeSwitch

Post by Flo » 06 May 2009, 04:42

Ok, I ran modeswitch, both the disable mass storage and Huawei Mode options seemed to work althought he Huawei mode only wokred for a few seconds and then the mass storage came back on. :cry: So....after I disable the mass storage, my computer doesn't recognize the device as a modem of any kind in network connections, it will see it correctly if I do a USB device detection check, however can't access it from there, so how do I use it now that I turned the mass storage off? Please help!

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 06 May 2009, 08:30

1. How did you determine the device switched back after using the HuaweiMode?

2. You need to install the serial driver after switching and give it the new IDs of the device (plus a performance related parameter):

Code: Select all

 /sbin/modprobe usbserial vendor=<TargetProdID> product=<TargetVendID> maxSize=4096 

Flo
Posts: 13
Joined: 05 May 2009, 23:29

Thanks

Post by Flo » 06 May 2009, 18:49

Josh,
Thank you. To respond to your post:
1. the indicator that a mass storage device is plugged in reappeared
2. I had seen this script on the main Modeswitch page, I have several questions, sorry I am a Linux newbie, gotta start somewhere though right?:

-Do I copy this script with my device info using text editor and then save it as a .rules file in the /udev/rules.d folder? Or do I execute from the console, if console, how do input an caommand that will be recognized
-When I add my parameters do I use 0x1414, 0x12d1 or just 1414 and 12d1?
-Is this all the file needs to be, any additional coding or start/end markers?
-How do I execute the install after I save the file?

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 06 May 2009, 23:22

Re 1.:
You mean an indicator on the device? Or on the computer?
Mind that there are modems with a built-in slot for flash cards which might be active even after switching. To be on the safe side call "lsusb" from a console (as the superuser or with "sudo lsusb" because it needs extended rights). Do the call twice, once when you plug in and once after you switched with the HuaweiMode.

Did the IDs change? Then the switching happened no matter what the "indicator" does.

If you are not sure, post both outputs here. (JUST "lsusb", NOT "lsusb -v"!)


Re 2.:
You are still testing, so right now you enter all these commands in a console window. For USB_ModeSwitch, there are basically two ways: edit the config file and execute "usb_modeswitch" without any parameters, or ignore the config file and type all parameters on the command line. Again, for testing it's more flexible to work manually in the console. (You know that you can bring back previous commands by hitting the "up" arrow?)

Later, if everything works fine, you can put all this in a "rules" file. But first things first.

For hexadecimal numbers you always need to prepend the "0x", that is how most programs recognize them.

Your last two questions I frankly don't understand ...

Flo
Posts: 13
Joined: 05 May 2009, 23:29

RE:

Post by Flo » 06 May 2009, 23:49

Ok, first thanks for the up arrow tip, what a huge time saver when working in the console, whew! Also I now understand how to execute Modeswitch rom the console
RE:1 - Huawei Mode
lsusb output before executing modeswitch
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 005 Device 002: ID 0951:1606 Kingston Technology
Bus 005 Device 007: ID 12d1:1414

I understand the Device 007 is my device
After executing modeswitch
Bus 005 Device 007 does not appear and the little icon in the system tray indicating that a mass storage device is plugged disappeared and reappeared.
When I use the DetachStorageOnly option the mass storage icon disappears and stays gone. Also the lsusb output shows the device being detected before and after executing ModeSwitch and the id's stay the same 12d1 and 1414.

Ok, when I run that script from the console, entered as:
/sbin/modprobe usbserial vendor=<0x1414> product=<0x12d1> maxSize=4096

I get bash: 0x1414: No such file or directory.

Why do I enter the ProdID in the vendor= and the Vendor ID in the product=?
Lastly, since I added an entry to the ModeSwitch.conf file for the E180 with the correct Product ID, do I need to alter the modeswitch rules file at all?

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 07 May 2009, 11:21

This: <YourDefaultProductID>
is computer speak; it means you replace the whole thing including the < and > chars with your parameter.

Also, if the storage indicator reappears, call lsusb afterwards and you should see the device again. Sometimes switching takes a while. The problem with Huawei devices is that they don't change their IDs after switching so when the device returns it is not obvious if the switch was successful.

Try the "dmesg" command to see recent system changes, before plugging, after plugging and after switching. And a while later, when the indicator reappears.

Flo
Posts: 13
Joined: 05 May 2009, 23:29

RE:

Post by Flo » 07 May 2009, 18:11

Hmmm, an important newbie mistake regarding the <> reference. Thanks for all of your help, I will continue testing and posting.

Flo
Posts: 13
Joined: 05 May 2009, 23:29

RE:

Post by Flo » 08 May 2009, 04:02

Ok,
Still with DetachStorageonly selected...
I ran /sbin/modprobe usbserial vendor=0x12d1 product=0x1414 maxsize=4096
and got...
FATAL: Error inserting usbserial (/lib/modules/2.6.21.4-eeepc/kernel/drivers/usb/serial/usbserial.ko): Operation not permitted

With Huawei Mode...
Same as above :cry:

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 08 May 2009, 09:05

Did you call "dmesg" after each step? What does it say?

What does "lsusb" say if you call it again after the storage indicator is back?

And are you sure you work as root/superuser?

Flo
Posts: 13
Joined: 05 May 2009, 23:29

RE:

Post by Flo » 08 May 2009, 19:37

Did you call "dmesg" after each step? What does it say?
No

What does "lsusb" say if you call it again after the storage indicator is back?
The device ID and vendor ID do show up

And are you sure you work as root/superuser?
Not sure, how do I check or do this? Console as administrator?

Flo
Posts: 13
Joined: 05 May 2009, 23:29

RE:

Post by Flo » 08 May 2009, 19:50

OK.
I ran modeswitch from root console with Huawei Mode option

Next I ran this script:
RUN+="/sbin/modprob usbserial vendor=0x12d1 product=0x1414 maxSize=4096"
I got no message it just popped up the next prompt
When I call dmesg(I just type dmesg right?) I get the following:

-su: dmesg: command not found

Regardless. After I get this working, how to I connect the modem, WvDial or something like it?

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 08 May 2009, 21:22

Forget about the "RUN+=" this is only for the rules file. Type

Code: Select all

modprobe -v usbserial vendor=0x12d1 product=0x1414 maxSize=4096
The "-v" option tells modprobe to be more verbose. It should say "insmod ..." if you load usbserial for the first time.

And you have the very first Linux system I know of which lacks the "dmesg" command ...

If your serial connection works (and it's hard to figure out in your setup) there is lots of documentation how to connect through that; but it is not the focus of this tool and this forum.

Flo
Posts: 13
Joined: 05 May 2009, 23:29

RE:

Post by Flo » 08 May 2009, 21:43

Ok,
When I run the script I get this:

insmod /lib/modules/2.6.21.4-eeepc/kernel/drivers/usb/serial/usbserial.ko vendor=0x12d1 product=0x1414 maxSize=4096
FATAL: Error inserting usbserial (/lib/modules/2.6.21.4-eeepc/kernel/drivers/usb/serial/usbserial.ko): Unknown symbol in module, or unknown parameter

Here's why: from (http://wiki.eeeuser.com/howto:usbserial)

"In order to work with USB serial devices like phones and GPSes, you need to get the EEE PC to load the appropriate driver for them. Usually this is handled through the usbserial driver (there are alternatives, see below). The problem with this driver is that the one supplied by Asus doesn't include the necessary capabilities to handle generic USB serial devices. Before you do anything else, you need to install the fixed USB driver. "

Here's how:
http://wiki.eeeuser.com/howto:usbserial

Flo
Posts: 13
Joined: 05 May 2009, 23:29

RE:

Post by Flo » 08 May 2009, 22:14

Last piece:
On the Eee PC /etc/modprobe.conf is not there so you have to make one using the line from the wiki link above, make sure to also add:
"include /etc/modprobe.d"

see, http://mysettopbox.tv/phpBB2/viewtopic. ... cce451c7e0
for more details

Post Reply