View Full Version : Help needed with Huawei E220
skywatcher
28-02-2007, 08:42 AM
Hi Tazz-Tux
(My apology for repeating this thread here. I inadvertently posted it on the How To page.)
I'm back to haunt you, this time with a new E220!:)
When I plug in the modem after the /etc/init.d/... command, the system sees it as a mass storage device and opens the file browser. Also, I don't get the messages that you give in your instructions. Instead, every second or so I get this message on the terminal:
sr0: Current: sense key: No Sense
Additional sense: No additional sense information
sr 5:0:0:0: SCSI error: return code = 0x8000002
By the way, the modem works -- I tested it on Windows.
Where to from here?
Meester
28-02-2007, 11:22 AM
Hi Tazz-Tux
I'm back to haunt you, this time with a new E220!:)
When I plug in the modem after the /etc/init.d/... command, the system sees it as a mass storage device ....
Where to from here?
RTFMing the past week (I only got my E220 yesterday,
and I still would've prefered to get the non-VMC Winblows software ;^) showed that it's an "issue" that should get resolved in the 2.6.20 kernels (Atleast I recalled something for 2.6.20-rc2 ;^)
Anycase, the methods to resolve is documented in this and other forums, but it boils down to rmmod usb-storage and then modprobe usb-serial.
What I sofar noticed that nobody really "noticed", is that the Linux kernel (in some form of eternal (lack of??) wisdom) assumes that a USB device[1] can only be grabbed by a single kernel module/driver/device-type, thus it prevents the USB serial driver from attaching to the serial portion of the E220. The assumption in further kernel hacks is that the read-only CD thingy will never be useful for the linux crowds (note the use of the words never, useful and assumed) thus they'll just disable it in the usb-storage etc. drivers so that only the usb-serial driver would attach to it.
Yeah, I'm not yet into the moods to get that fixed soon... but when Huawei makes that CD thingy writable/useful Linux info on there, then it will become an issue to get it properly fixed ;^P
Note [1]: There are other "devices" that have multiple uses like the Targus docking stations, but they appear to be USB bridges with the devices hanging of this bridge...
skywatcher
01-03-2007, 12:53 PM
Anycase, the methods to resolve is documented in this and other forums, but it boils down to rmmod usb-storage and then modprobe usb-serial.
When I try rmmod usb-storage I get this error:
ERROR: Module usb_storage does not exist in /proc/modules
How do I get around this?
skywatcher
01-03-2007, 02:36 PM
Do I have to do this step from the How To?
***
Extra Steps for the HSDPA card:
Download the kernel module from the link below. Extract it to a directory somewhere safe. If you are *still* running the 2.4 series of kernels, you need to change the Makefile to reflect this.
Compile the driver using the following commands:
Code:
make clean && make
***
I get this: 'bash: make: command not found'
skywatcher
01-03-2007, 03:09 PM
OK, I got so far as to see the modem connected to ttyUSB0.
Then I try to connect:
wvdial huawei_e220 && sleep 5 && internet 3gonly 384k
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.
Isn't there supposed to be an 'OK' response after the ATZ command?
Tazz_Tux
02-03-2007, 02:18 PM
OK, I got so far as to see the modem connected to ttyUSB0.
Then I try to connect:
wvdial huawei_e220 && sleep 5 && internet 3gonly 384k
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.
Isn't there supposed to be an 'OK' response after the ATZ command?
Correct....
Did you remove the storage module ?
elton!!
05-03-2007, 10:43 AM
Something I've noticed with my modem is that it doesn't always come up right (despite my having killed my usb-storage module). If it creates only a /dev/tttyUSB0 and not through to ttyUSB2, then it will usually get it right after a reboot or two? Heh.........??
Meester
05-03-2007, 11:25 AM
Something I've noticed with my modem is that it doesn't always come up right (despite my having killed my usb-storage module). If it creates only a /dev/tttyUSB0 and not through to ttyUSB2, then it will usually get it right after a reboot or two? Heh.........??
I've noticed that it had trouble coming back on Windows after suspend-resume.
(Unit left plugged in)
I've also noticed it had trouble on a Windows XP to come up after a reboot with unit plugged in. Recovered after I unplugged and reinserted the dongle.
skywatcher
05-03-2007, 05:11 PM
Making some progress, but it still doesn't work. After plugging the modem in and out a few times (similar to Elton's reboots?), I get this far:
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon Mar 5 16:58:11 2007
--> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
--> --> PAP (Password Authentication Protocol) may be flaky.
--> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied
--> --> CHAP (Challenge Handshake) may be flaky.
--> Pid of pppd: 6852
--> Using interface ppp0
Then there seems to be a time-out of sorts, after which the modem is re-initialized and the above message is repeated to halt at --> Using interface ppp0.
I have tried using both cables.
(Would these problems indicate that a firmware upgrade is due?)
Arawn
05-03-2007, 06:39 PM
Hello!
Been trying to make a Huawey E220 modem work, on a Ubuntu Edgy 6.10. I have all updates, followed all instructions at Tazz_Tux's original post (http://www.mybroadband.co.za/vb/showthread.php?t=21726). The modem only installs 1 entrance on /dev/, /dev/ttyUSB0.
I get the same error as skywatcher, 'modem not responding'. It indicates the following at the console:
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=xxxx
--> Sending: ATQ0
--> Re-Sending: AT+CPIN=xxxx
--> Modem not responding.
I've tried disconnecting and connecting again the modem, it installs again the usb-storage module. I remove it, call wvdial but same error. Right after that error, the modem seems to disconnect completely, no /dev/ttyUSB0, and comes back after a few seconds. I've tried with both cables. I'm at a loss...
Any tips?
From Portugal, thx. Ricardo
skywatcher
05-03-2007, 07:46 PM
Maybe someone out there would like to swap an E620 for an E220?;)
Actually, I'm serious. The E220 seems to work OK on Windows, except for the fact that you have to start all over again after a hybernate etc. My problem is, I don't want to use Windows for internet and e-mail if I can do it on Linux.
Tazz_Tux
06-03-2007, 06:22 AM
Maybe someone out there would like to swap an E620 for an E220?;)
Actually, I'm serious. The E220 seems to work OK on Windows, except for the fact that you have to start all over again after a hybernate etc. My problem is, I don't want to use Windows for internet and e-mail if I can do it on Linux.
Hey Skywatcher and Arawin,
What distro are you guys running ? I am pretty sure that the problem is with hardware detection...
Laterz !
skywatcher
06-03-2007, 09:08 AM
Hi Tazz-Tux
I'm running on Ubuntu 6.06 - Dapper.
Cheers
Tazz_Tux
06-03-2007, 05:22 PM
Hi Tazz-Tux
I'm running on Ubuntu 6.06 - Dapper.
Cheers
check for a hot plug service and stop it *before* using the card...you will not be sorry :D
skywatcher
07-03-2007, 11:26 AM
Hi Tazz_Tux
I still don't get it to work. When I run
find /dev/ | grep ttyUSB
I get
/dev/ttyUSB2
/dev/ttyUSB1
/dev/ttyUSB0
which tells me that I followed the steps correctly and that the modem has been detected. BUT -- I still can't get around the problem that I mentioned in my previous reply. When I run this:
wvdial huawei_e220 && sleep 5 && internet 3gonly 384k
I get the correct response:
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu Feb 22 09:20:30 2007
--> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
--> --> PAP (Password Authentication Protocol) may be flaky.
--> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied
--> --> CHAP (Challenge Handshake) may be flaky.
--> Pid of pppd: 6013
--> Using interface ppp0
This is where it stops, but the system retries a few times every 10 seconds and then gives up. What I should be getting after '--> Using interface ppp0' is this:
--> local IP address 10.62.100.132
--> remote IP address 10.64.64.64
--> primary DNS address 196.207.40.165
--> secondary DNS address 196.43.46.190
But it doesn't get this far. What is not clear from your previous reply, is what the connection is between this problem and a 'hot plug service'?
(By the way, the last four lines following '--> Using interface ppp0' is the response I get when using the E620)
Cheers
Tazz_Tux
08-03-2007, 07:05 AM
Hi Tazz_Tux
I still don't get it to work. When I run
But it doesn't get this far. What is not clear from your previous reply, is what the connection is between this problem and a 'hot plug service'?
(By the way, the last four lines following '--> Using interface ppp0' is the response I get when using the E620)
Cheers
Hey Skywatcher,
There was a problem reported on the ubuntu forums regarding the E220 and the hotplug service repeatedly installed the usb-storage module. The problem was that non of them really showed any solution. The one user did report that stopping the service helped him, but the he had to manually mount his USB Sticks etc.
Can you prehaps give us the output of uname -a ? Maybe there is a kernel upgrade.... :)
skywatcher
08-03-2007, 09:50 AM
Hi Tazz_Tux
Can you prehaps give us the output of uname -a ? Maybe there is a kernel upgrade.... :)
uname -a
Linux chris-laptop 2.6.15-28-386 #1 PREEMPT Thu Feb 1 15:51:56 UTC 2007 i686 GNU/Linux
Cheers
Tazz_Tux
08-03-2007, 09:52 AM
Hi Tazz_Tux
uname -a
Linux chris-laptop 2.6.15-28-386 #1 PREEMPT Thu Feb 1 15:51:56 UTC 2007 i686 GNU/Linux
Cheers
I am sure there is an update for the kernel on ubuntu....can you check ?
skywatcher
09-03-2007, 10:03 AM
Hi Tazz_Tux
According to Synaptic on my machine, 2.6.15-28-386 is the latest kernel version.
I'm about to give up on this...
skywatcher
12-03-2007, 10:28 AM
Hi everyone
I have followed the advice of several people on the Ubuntu forums, but in every case I end up with the same problem -- the connection gets stuck at this point:
--> Using interface ppp0
I think it is time to go back to first principles, so what I need to know, is whether there are any Ubuntu 6.06 (Dapper) users out there who managed to get the Huawei E220 USB modem working on their systems. If so, what kernel version do they use, and are their wvdial.conf files identical to that given in the How To on this forum? Also, are there any other steps (i.e. settings etc.) that need to be taken in order to succeed in getting the E220 modem to work?
Your feedback will be much appreciated.
Thanks
redarrow
12-03-2007, 03:21 PM
Thought I should just report,
My just purchased E220 (MTN) is working very good.. :)
I'm on Fedora Core 6 though.. uname -r:
Linux Hogwarts 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686 athlon i386 GNU/Linux
I'm certain there should be a newer kernel for Ubuntu.. 2.6.15 is older than mine.. which is also not the latest.. latest stable is 2.6.20 I think..
Anyways for me, I had to do nothing special, just follow Tazz_Tux's steps.. in fact I it's a bit easier for me.. after I "rmmod usb_storage" and then "modprobe usbserial ..." I do not need to unplug and replug the dongle.. it just works from there on.. :D
I also do not have any problems when suspending my system.. after wake up it works the same.. :) (Unless I left it connected to the net.. then the suspend does mess it around a bit).
Only other point is there's definetly something up with the speed .. the absolute max I can get is 500Kbps.. I (ugh!) tried it on a Windows system and managed to get 650Kbps ... so I recon it must need some further tweaking..
Btw.. skywatcher do you have SeLinux enabled on your system? For me it's always proved a huge pain in the neck when trying to get connected.. dunno if it's got something to do with it.. but well.. you never know. :)
A question from me: anyone know how to prevent a module from "autoloading" ? :confused:
It would make things simpler if I could just prevent usb_storage from loading in the first place.. I hardly ever use flashdrives anyway so it wouldn't bother me if I have to manually load it once in a while... thanks.
redarrow
12-03-2007, 06:28 PM
I also do not have any problems when suspending my system.. after wake up it works the same.. :) (Unless I left it connected to the net.. then the suspend does mess it around a bit).
OK.. correction this is not totally accurate...
On my laptop I have no problems with suspending..
On my desktop I need to plug it out and then back in to get it to work.. - must be a issue on my desktop's BIOS or something..
skywatcher
14-03-2007, 05:14 PM
I have now successfully installed the latest stable kernel 2.6.20.3, but my problem hasn't gone away. Please can someone look at the following terminal dump to see if they can spot a likely cause of the problem (note how it repeats after --> Using interface ppp0):
chris@chris-laptop:~$ sudo modprobe usbserial vendor=0x12d1 product=0x1003
chris@chris-laptop:~$ sudo ls -la /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 2007-03-14 16:56 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 2007-03-14 16:54 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 2007-03-14 16:54 /dev/ttyUSB2
chris@chris-laptop:~$ wvdial huawei_e620 && sleep 5 && internet 3gonly 384k
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Wed Mar 14 16:57:25 2007
--> Pid of pppd: 9751
--> Using interface ppp0
--> Disconnecting at Wed Mar 14 16:57:30 2007
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
--> Auto Reconnect will be attempted in 5 seconds
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Wed Mar 14 16:57:35 2007
--> Pid of pppd: 9762
--> Using interface ppp0
The wvdial.conf file is identical to that in Tazz_Tux's How To, and also significant is the fact that I have exactly the same problem on two different machines, both running Dapper. The E220 works on Windows.
Sorry for being a nuisance with this.
redarrow
14-03-2007, 05:46 PM
Hmm.. your command line looks incorrect to me:
chris@chris-laptop:~$ wvdial huawei_e620 && sleep 5 && internet 3gonly 384k
Whats with the && sleep 5 && ? This is not going to work.. Why do you want a delay here? :confused:
The delay will only occur after the first command has completed.. and even then you're just throwing "internet 3gonly 384k" straight at the command line... These are parameters not individual commands...
Try running it straight as:
wvdial huawei_e620 internet 3gonly 384k
skywatcher
14-03-2007, 08:20 PM
Hmm.. your command line looks incorrect to me:
Whats with the && sleep 5 && ? This is not going to work.. Why do you want a delay here? :confused:
The delay is an unquestioned carry-over from trouble I had with getting the E620 going. I inserted it on the suggestion of Tazz_Tux, because the E620 would not respond to the ATZ command without it. I find that the E220 has the same problem -- it too won't respond with OK to the ATZ command unless the delay is there. But I think you might be onto something, but not at the point where the 5 s delay is inserted. Couldn't it be that one or more delays are required further down the line?
I discovered by chance that if I plug in the modem and go and do something else like make a cup of coffee, when I get back I can run the sudo ls -la /dev/ttyU* commands and immediately get the ttyUSB0,1,2 response. It seems like the (my ?) modem is very slow for some reason.
redarrow
14-03-2007, 09:23 PM
The delay is an unquestioned carry-over from trouble I had with getting the E620 going. I inserted it on the suggestion of Tazz_Tux, because the E620 would not respond to the ATZ command without it. I find that the E220 has the same problem -- it too won't respond with OK to the ATZ command unless the delay is there. But I think you might be onto something, but not at the point where the 5 s delay is inserted. Couldn't it be that one or more delays are required further down the line?
I discovered by chance that if I plug in the modem and go and do something else like make a cup of coffee, when I get back I can run the sudo ls -la /dev/ttyU* commands and immediately get the ttyUSB0,1,2 response. It seems like the (my ?) modem is very slow for some reason.
The thing is, if that command ever could work at all then I'm truly :confused:
Have a look at your output, you will see that the last three parameters to the wvdial command never get executed.. if they did you should see them.. for example:
The "internet" param should show up like:
--> Sending: AT+CGDCONT=1,"IP","internet"
AT+CGDCONT=1,"IP","internet"
OK
In your output that you posted this is not happening... nor can it logically. (unless I'm smoking something weird here :eek: )
I guess if you say it worked for your E620 .. well then it must .. or maybe it was some sort of weird coincidence...
Basically you are putting a delay between a command and its parameters... there's no way that additional command line parameters can be passed to a program that's busy running... if you need a delay it should technically be somewhere in the wvdial program itself.. perhaps in the config.. but I don't know if it's syntax supports that..
Well... I stand under correction with what I've said.. but I really don't believe I have made an error... :eek: (maybe I am smoking something.. :eek: )
The whole thing confuses me.. :confused:
Tazz_Tux
15-03-2007, 06:18 AM
Hey Guys,
The reason I put those delays in place is because the PIN command renders the modem "useless" for a couple of seconds, if you don't need a PIN, drop the delay. Redarrow might be right, and you do need "another" huawei_e620 - so your command should look like:
wvdial huawei_e620 internet 3gonly 384k
Try it and let us know - also look under /var/log/messages or /var/log/all.log for anything that ppp might dump at you while connecting. If you see nothing, post back and I will show you how to enable debugging :)
Laterz !
The thing is, if that command ever could work at all then I'm truly :confused:
Have a look at your output, you will see that the last three parameters to the wvdial command never get executed.. if they did you should see them.. for example:
The "internet" param should show up like:
--> Sending: AT+CGDCONT=1,"IP","internet"
AT+CGDCONT=1,"IP","internet"
OK
In your output that you posted this is not happening... nor can it logically. (unless I'm smoking something weird here :eek: )
I guess if you say it worked for your E620 .. well then it must .. or maybe it was some sort of weird coincidence...
Basically you are putting a delay between a command and its parameters... there's no way that additional command line parameters can be passed to a program that's busy running... if you need a delay it should technically be somewhere in the wvdial program itself.. perhaps in the config.. but I don't know if it's syntax supports that..
Well... I stand under correction with what I've said.. but I really don't believe I have made an error... :eek: (maybe I am smoking something.. :eek: )
The whole thing confuses me.. :confused:
skywatcher
15-03-2007, 09:39 AM
OK guys, if you're prepared to help me battle this one out, great! :)
What I'm going to do, is post the output from the connection sessions of both modems for comparison. I'll do that tonight.
By the way, maybe I'm confusing the issue with the 'huawei_e620' in the command line instead of 'huawei_e220'. It's just that the code in the wvdial.conf file is exactly the same for the two modems.
skywatcher
16-03-2007, 02:16 PM
Hi guys
Here is the latest feedback. First, just a comment about the delay in the command line when using the E620:
wvdial huawei_e620 && sleep 5 && internet 3gonly 384k
It does not work when I remove the delay -- I have to use it as shown above (PIN is disabled). Can you explain that?
Now, for the E220. I finally got it to connect by not using the delay, as you suggested. ??
But my problems aren't over. The connection is EXTREMELY slow < 100 B/s. I can see that there is some activity on gkrellm, but when I open the browser or try to read e-mail, nothing happens. If I can fix this problem, I'm home and dry. I tried this
sudo setserial -a /dev/ttyUSB0 low_latency spd_warp
but I get this message
sudo: setserial: command not found
redarrow
16-03-2007, 02:42 PM
Hi guys
Here is the latest feedback. First, just a comment about the delay in the command line when using the E620:
wvdial huawei_e620 && sleep 5 && internet 3gonly 384k
It does not work when I remove the delay -- I have to use it as shown above (PIN is disabled). Can you explain that?
I always thought I knew bash... you're making me doubt myself.. :eek: :(
What happens if you simply run:
wvdial huawei_e620
My understanding of bash is that this is infact what you actually are running..
But now I don't know anymore.. :(
Now, for the E220. I finally got it to connect by not using the delay, as you suggested. ??
But my problems aren't over. The connection is EXTREMELY slow < 100 B/s. I can see that there is some activity on gkrellm, but when I open the browser or try to read e-mail, nothing happens. If I can fix this problem, I'm home and dry. I tried this
sudo setserial -a /dev/ttyUSB0 low_latency spd_warp
but I get this message
sudo: setserial: command not found
Looks like you don't have the setserial binary? :confused:
It should come standard with your distro.. weird.. :confused:
Dunno.. maybe see it it's installed somewhere else.. /sbin/setserial perhaps..
Or ask the Ubuntu guys..
AirWolf
18-03-2007, 09:47 PM
Something I've noticed with my modem is that it doesn't always come up right (despite my having killed my usb-storage module). If it creates only a /dev/tttyUSB0 and not through to ttyUSB2, then it will usually get it right after a reboot or two? Heh.........??
Hi :)
I had same experience as above with my e220 on Ubuntu Linux.
skywatcher
19-03-2007, 04:34 PM
Hi guys
I finally have it going! I followed redarrow's advice and removed the extra parameters when calling wvdial, i.e. I use this:
wvdial huawei_e220
I find it doesn't always work first time. Sometimes the system retries once or twice, then it connects. Anyway, I discovered some other tricks. The first time I plug in the modem, the LED flashes green a few times, then it changes to blue. If I now try
find /dev/ | grep ttyUSB
I only get ttyUSB0. At this point I remove the modem briefly, then plug it in again. Then I wait for the LED to flash blue again. If I now try
find /dev/ | grep ttyUSB
I get ttyUSB0, 1, 2. Then I can run wvdial ...
Note that this 'new' behaviour (no mass-storage device, no modprobe) started after I installed kernel version 2.6.20.3. I still don't understand the inconsistencies, but as long as it works, who cares?
Thanks for all your help, everyone! It is much appreciated.
redarrow
21-03-2007, 07:02 PM
Hi guys
I finally have it going! I followed redarrow's advice and removed the extra parameters when calling wvdial, i.e. I use this:
wvdial huawei_e220
Did you ever try that command on your e620?
I'd be curious to know how it works...
Btw.. I do think that the "internet" param should always be there at least... I wonder if it'd make any difference in your case?
wescht
21-03-2007, 08:31 PM
@skywalker
as i mentioned here (http://mybroadband.co.za/vb/showpost.php?p=935924&postcount=4), connect the modem before you boot. for me (kernel 2.6.18) this worked.
skywatcher
23-03-2007, 10:33 AM
Hi wescht
You're right -- plugging in the modem before booting removes the need to unplug/plug.
Thanks
der_pinguin
24-03-2007, 10:05 AM
I'm running SUSE 10.1, kernel version 2.6.16.13-4. I bought a 3G Huawei E220 modem for my wife to use on her Windose machine. The idea was to share it, but I can't seem to get it to work. Got hold of your Howto through a google seach. Tried - no luck. Posted a query on a SUSE forum - got refered back to your Howto. Printed it and read through the parts that seemed relevant.
Here's my problem and what happens. I'd really appreciate it if you could browse over it and have a look where I'm missing something. I would be really cool if you could get this thing to work for me.
plug in the E220 Huawei modem into the usb socket
Celeborn:~ # tail -f /var/log/messages
...
Mar 24 09:00:52 Celeborn kernel: usb 2-1: new full speed USB device using uhci_hcd and address 2
Mar 24 09:00:52 Celeborn kernel: usb 2-1: new device found, idVendor=12d1, idProduct=1003
Mar 24 09:00:52 Celeborn kernel: usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0
Mar 24 09:00:52 Celeborn kernel: usb 2-1: Product: HUAWEI Mobile
Mar 24 09:00:52 Celeborn kernel: usb 2-1: Manufacturer: HUAWEI Technologies
Mar 24 09:00:52 Celeborn kernel: usb 2-1: configuration #1 chosen from 1 choice
Mar 24 09:00:52 Celeborn kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Mar 24 09:00:52 Celeborn kernel: usb-storage: device found at 2
Mar 24 09:00:52 Celeborn kernel: usb-storage: waiting for device to settle before scanning
Mar 24 09:00:57 Celeborn kernel: Vendor: HUAWEI Model: Mass Storage Rev: 2.31
Mar 24 09:00:57 Celeborn kernel: Type: CD-ROM ANSI SCSI revision: 02
Mar 24 09:00:57 Celeborn kernel: 3:0:0:0: Attached scsi generic sg2 type 5
Mar 24 09:00:57 Celeborn kernel: usb-storage: device scan complete
Mar 24 09:00:57 Celeborn kernel: sr0: scsi-1 drive
Mar 24 09:00:57 Celeborn kernel: sr 3:0:0:0: Attached scsi CD-ROM sr0
unplug modem
Celeborn:~ # rmmod usb-storage
Mar 24 09:11:01 Celeborn kernel: usbcore: deregistering driver usb-storage
Celeborn:~ # modprobe usbserial vendor=0x12d1 product=0x1003
Mar 24 09:02:53 Celeborn kernel: usbcore: registered new driver usbserial
Mar 24 09:02:53 Celeborn kernel: drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
Mar 24 09:02:53 Celeborn kernel: usbcore: registered new driver usbserial_generic
Mar 24 09:02:53 Celeborn kernel: drivers/usb/serial/usb-serial.c: USB Serial Driver core
re-insert into usb socket
Mar 24 09:12:22 Celeborn kernel: usb 2-1: new full speed USB device using uhci_hcd and address 5
Mar 24 09:12:22 Celeborn kernel: usb 2-1: new device found, idVendor=12d1, idProduct=1003
Mar 24 09:12:22 Celeborn kernel: usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0
Mar 24 09:12:22 Celeborn kernel: usb 2-1: Product: HUAWEI Mobile
Mar 24 09:12:22 Celeborn kernel: usb 2-1: Manufacturer: HUAWEI Technologies
Mar 24 09:12:22 Celeborn kernel: usb 2-1: configuration #1 chosen from 1 choice
Mar 24 09:12:22 Celeborn kernel: usbserial_generic 2-1:1.0: generic converter detected
Mar 24 09:12:22 Celeborn kernel: usb 2-1: generic converter now attached to ttyUSB0
make sure /dev/ttsUSB0 exists
Celeborn:~ # find /dev/ |grep USB
/dev/ttyUSB0
downloaded your wvdial.conf and saved to /etc
I understand that there may still be an issue regarding the pin when logging onto the internet, but at this stage I just want to make contact with the modem first.
Celeborn:~ # wvdial huewai_e220
--> WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding
using kppp
Celeborn:~ # kppp &
choosing /dev/ttsUSB0
choosing query modem
error message: cannot open modem
on Konsole the following messages:
Opener: received OpenLock
Opener: received OpenDevice
error opening modem device !
Opener: received RemoveLock
Cannot open client
akode: Guessed format: xiph
It seems as if the modem has been recognised, the device /dev/ttsUSB0 has been created but for some reason I can't communicate with the device.
redarrow
24-03-2007, 01:20 PM
I'm running SUSE 10.1, kernel version 2.6.16.13-4. I bought a 3G Huawei E220 modem for my wife to use on her Windose machine. The idea was to share it, but I can't seem to get it to work. Got hold of your Howto through a google seach. Tried - no luck. Posted a query on a SUSE forum - got refered back to your Howto. Printed it and read through the parts that seemed relevant.
Here's my problem and what happens. I'd really appreciate it if you could browse over it and have a look where I'm missing something. I would be really cool if you could get this thing to work for me.
plug in the E220 Huawei modem into the usb socket
Celeborn:~ # tail -f /var/log/messages
...
Mar 24 09:00:52 Celeborn kernel: usb 2-1: new full speed USB device using uhci_hcd and address 2
Mar 24 09:00:52 Celeborn kernel: usb 2-1: new device found, idVendor=12d1, idProduct=1003
Mar 24 09:00:52 Celeborn kernel: usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0
Mar 24 09:00:52 Celeborn kernel: usb 2-1: Product: HUAWEI Mobile
Mar 24 09:00:52 Celeborn kernel: usb 2-1: Manufacturer: HUAWEI Technologies
Mar 24 09:00:52 Celeborn kernel: usb 2-1: configuration #1 chosen from 1 choice
Mar 24 09:00:52 Celeborn kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Mar 24 09:00:52 Celeborn kernel: usb-storage: device found at 2
Mar 24 09:00:52 Celeborn kernel: usb-storage: waiting for device to settle before scanning
Mar 24 09:00:57 Celeborn kernel: Vendor: HUAWEI Model: Mass Storage Rev: 2.31
Mar 24 09:00:57 Celeborn kernel: Type: CD-ROM ANSI SCSI revision: 02
Mar 24 09:00:57 Celeborn kernel: 3:0:0:0: Attached scsi generic sg2 type 5
Mar 24 09:00:57 Celeborn kernel: usb-storage: device scan complete
Mar 24 09:00:57 Celeborn kernel: sr0: scsi-1 drive
Mar 24 09:00:57 Celeborn kernel: sr 3:0:0:0: Attached scsi CD-ROM sr0
unplug modem
Celeborn:~ # rmmod usb-storage
Mar 24 09:11:01 Celeborn kernel: usbcore: deregistering driver usb-storage
Celeborn:~ # modprobe usbserial vendor=0x12d1 product=0x1003
Mar 24 09:02:53 Celeborn kernel: usbcore: registered new driver usbserial
Mar 24 09:02:53 Celeborn kernel: drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
Mar 24 09:02:53 Celeborn kernel: usbcore: registered new driver usbserial_generic
Mar 24 09:02:53 Celeborn kernel: drivers/usb/serial/usb-serial.c: USB Serial Driver core
re-insert into usb socket
Mar 24 09:12:22 Celeborn kernel: usb 2-1: new full speed USB device using uhci_hcd and address 5
Mar 24 09:12:22 Celeborn kernel: usb 2-1: new device found, idVendor=12d1, idProduct=1003
Mar 24 09:12:22 Celeborn kernel: usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=0
Mar 24 09:12:22 Celeborn kernel: usb 2-1: Product: HUAWEI Mobile
Mar 24 09:12:22 Celeborn kernel: usb 2-1: Manufacturer: HUAWEI Technologies
Mar 24 09:12:22 Celeborn kernel: usb 2-1: configuration #1 chosen from 1 choice
Mar 24 09:12:22 Celeborn kernel: usbserial_generic 2-1:1.0: generic converter detected
Mar 24 09:12:22 Celeborn kernel: usb 2-1: generic converter now attached to ttyUSB0
make sure /dev/ttsUSB0 exists
Celeborn:~ # find /dev/ |grep USB
/dev/ttyUSB0
downloaded your wvdial.conf and saved to /etc
I understand that there may still be an issue regarding the pin when logging onto the internet, but at this stage I just want to make contact with the modem first.
Celeborn:~ # wvdial huewai_e220
--> WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding
using kppp
Celeborn:~ # kppp &
choosing /dev/ttsUSB0
choosing query modem
error message: cannot open modem
on Konsole the following messages:
Opener: received OpenLock
Opener: received OpenDevice
error opening modem device !
Opener: received RemoveLock
Cannot open client
akode: Guessed format: xiph
It seems as if the modem has been recognised, the device /dev/ttsUSB0 has been created but for some reason I can't communicate with the device.
You seem to have mixed up the order in which to do the various steps...
After you've plugged it in for the first time, you must first do:
rmmod usb-storage
modprobe usbserial vendor=0x12d1 product=0x1003
These commands must be run before you do the unplug and replug routine.. (if you need to do it at all.. I find that I don't need to)
The clue that it's been initialised correctly is when the system output reports three "generic convertors" .. my own sys output:
usbserial_generic 3-1:1.0: generic converter detected
usb 3-1: generic converter now attached to ttyUSB0
usbserial_generic 3-1:1.1: generic converter detected
usb 3-1: generic converter now attached to ttyUSB1
usbserial_generic 3-1:1.2: generic converter detected
usb 3-1: generic converter now attached to ttyUSB2
Hope this helps..
skywatcher
24-03-2007, 03:20 PM
Hi redarrow
You were wondering about sending only this to the E620:
wvdial huawei_e620
Unlike the E220, it doesn't work. It needs all the other garbage in the command string.
But as far as the E220 is concerned, I'm really happy with @wescht's solution to plug in the modem BEFORE booting. :) Maybe @der_pinguin should try that?
Cheers!
der_pinguin
24-03-2007, 04:59 PM
You seem to have mixed up the order in which to do the various steps...
After you've plugged it in for the first time, you must first do:
rmmod usb-storage
modprobe usbserial vendor=0x12d1 product=0x1003
These commands must be run before you do the unplug and replug routine.. (if you need to do it at all.. I find that I don't need to)
The clue that it's been initialised correctly is when the system output reports three "generic convertors" .. my own sys output:
usbserial_generic 3-1:1.0: generic converter detected
usb 3-1: generic converter now attached to ttyUSB0
usbserial_generic 3-1:1.1: generic converter detected
usb 3-1: generic converter now attached to ttyUSB1
usbserial_generic 3-1:1.2: generic converter detected
usb 3-1: generic converter now attached to ttyUSB2
Hope this helps..
Thanks redarrow! That did the trick - I'm sending this message from my linux box!
I had assumed that everything is ok since /dev/ttyUSB0 was present. Well, we all know about assumptions...
redarrow
24-03-2007, 05:28 PM
Hi redarrow
You were wondering about sending only this to the E620:
wvdial huawei_e620
Unlike the E220, it doesn't work. It needs all the other garbage in the command string.
But as far as the E220 is concerned, I'm really happy with @wescht's solution to plug in the modem BEFORE booting. :) Maybe @der_pinguin should try that?
Cheers!
Ta! Thanks for trying it... it's really weird.. I still can't understand how it works.. :confused: .. oh well.. some things just can't be explained I guess.. ;)
Thanks redarrow! That did the trick - I'm sending this message from my linux box!
I had assumed that everything is ok since /dev/ttyUSB0 was present. Well, we all know about assumptions...
Glad to hear it's working.. :)
GustafB
02-04-2007, 02:26 PM
First things first: Thank you Tazz_Tux for a great tutorial. (wow stuff really works :) )
I seem to be stuck in the same place as skywatcher.
Windows: my e220 works perfectly
Ubuntu feisty: my e220 works perfectly
Slackware 10.2 (running linux 2.4):
--> WvDial: Internet dialer version 1.56 (root@gateway)
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet.tele2.se"
AT+CGDCONT=1,"IP","internet.tele2.se"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon Apr 2 10:27:37 2007
--> Pid of pppd: 294
--> Using interface ppp0
--> Disconnecting at Mon Apr 2 10:28:14 2007
There is a carrier but it is immediatley lost.
Ive managed to get it running a few times in slackware by removing and reinserting the device, but the results of this procedure are quite unpredictable.
Edit: Tested it on my debian etch machine. The problem reoccurs. Damn you ubuntu for making everything work flawless.
Meester
07-04-2007, 07:16 PM
First things first: Thank you Tazz_Tux for a great tutorial. (wow stuff really works :) )
I seem to be stuck in the same place as skywatcher.
Windows: my e220 works perfectly
Ubuntu feisty: my e220 works perfectly
Slackware 10.2 (running linux 2.4):
Edit: Tested it on my debian etch machine. The problem reoccurs. Damn you ubuntu for making everything work flawless.
I've found (on gentoo) that when the device gets stuck , to modprobe -r option && modprobe option
(assuming it's a module and not compiled into kernel ;^)
When you get stuck like above, I've noticed that ppp kernel module needs to be loaded.
modprobe ppp
;^)
Yes, Ubuntu have been impressing my lately... expect when I want to install stuff the way *I* want it :(
GustafB
11-04-2007, 02:25 PM
When you get stuck like above, I've noticed that ppp kernel module needs to be loaded.
modprobe ppp
Very interesting. I can't seem to find any ppp module. There are however a whole bunch of different ppp modules. Inserting all, or just some, of them before running wvdial doesn't seem to help - the carrier is often lost immediatley.
Hence, I compiled a kernel (damn you ubuntu for making this easy too) with ppp built-in, not as a module. With this kernel the connection works every time.
I find it strange that there is a noticable difference between having ppp as a module and built-in but as long as I get a working internet connection I don't really care.
Gustaf
sproggg
11-05-2007, 11:09 AM
The default linux behaviour is to try and load USB storage modules first.
This seems to bugger up the later usb_serial load, remember to use the modules options file (in gentoo I had to create an /etc/modules.d/usbserial file, with the contents:
options usbserial vendor=0x12d1 product=0x1003
)
I also took the USB storage device drivers out of the kernel...
This MAY be a problem if you need to use a flash disk, it's worth checking though...
StoneyHill
28-05-2007, 11:25 PM
I had only limited success with the HOWTO by Tazz_Tux. Sometimes I could "rmmod usb-storage" and then a few moments later "modprobe usbserial vendor=0x12d1 product=0x1003" and the modem would behave properly giving me three serial devices. Other times I would have to reboot a couple times before the hardware was configured properly. I found an *easy* way to handle the hardware configuration and the details appear below.
My distro: SuSE 10.1
Kernel: 2.6.16.27-0.9-smp i686
Modem: Huawei E220
Network: Vodacom 3G
I found this HOWTO by Albrecht Gebhardt:
http://wwwu.uni-klu.ac.at/agebhard/HuaweiE220/
The document describes how the E220 is able to function as a mass storage device or a modem and the emulation of either is triggered by passing the modem a software trigger or switch.
I downloaded the C program by Miroslav Bobovsky (for passing the trigger); available here: http://www.kanoistika.sk/bobovsky/archiv/umts/huaweiAktBbo.c and compiled with "gcc huaweiAktBbo.c -o huaweiAktBbo -lusb" I didn't need the libusb-dev package as suggested by Albrecht. Next, I copied the executable to /sbin and created the udev rules as detailed on Albrecht's page.
Rebooted and whoola the modem is ready to rock 'n roll with wvdial. No more messing with "rmmod usb-storage" and I can happily continue to use my flash disk.
As an aside: Miroslav's program was generated automatically by a Perl script which parsed a log file from a sniffer program running under windoze. The details are here: http://iki.fi/lindi/usb/ You could use the tools to generate a C program for another modem model. Perhaps the chaps struggling with the E620 variety might give this a go? But then the Spanish GUI dialler looks simple and really cool.
AirWolf
29-05-2007, 07:59 AM
Hi:)
I recently got Ubuntu Feisty Fawn, and it works much better with the e220 than previous versions. It suppresses the usb-storage module automatically when the e220 is plugged in. Then all you need to do is run: "modprobe usbserial vendor=0x12d1 product=0x1003", unplug and replug in the modem and the 3 serial devices are picked up:) No hassles and no restarts required;)
StoneyHill
29-05-2007, 08:42 AM
No hassles and no restarts required;)
Hi sky.akash
I'm glad Feisty Fawn plus plug, unplug, replug works for you:)
Just to clarify that when I wrote, "Rebooted and whoola the modem is ready to rock 'n roll with wvdial" I meant that I rebooted to apply my newly created udev rules. Now that all is configured properly all I have to do is plug in my modem, fire up the PC, launch wvdial and I'm connected. Pretty simple I think.
fuzzybunny
16-06-2007, 11:51 AM
Hi:)
I recently got Ubuntu Feisty Fawn, and it works much better with the e220 than previous versions. It suppresses the usb-storage module automatically when the e220 is plugged in. Then all you need to do is run: "modprobe usbserial vendor=0x12d1 product=0x1003", unplug and replug in the modem and the 3 serial devices are picked up:) No hassles and no restarts required;)
Hmmm I am running feisty ppc on an iMac, it does suppress the usb-storage but no matter what I do i don't get the three devices...
it is always just the one, it changes to dialup after the process, but still just the one.
And all I ever get is that the modem is not responding...
I really need to sort this out, I am losing faith here.
I have been through the tazz_tux thing....
Does anyone have any ideas?
AirWolf
16-06-2007, 12:58 PM
Yes, the modem won't connect until the 3 devices are picked up:(Have you tried the modprobe command before plugging in the modem?
fuzzybunny
17-06-2007, 07:16 AM
Yes, the modem won't connect until the 3 devices are picked up:(Have you tried the modprobe command before plugging in the modem?
yep... (well I think so at least ;) )
Here is the session:
$ ls -la /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 2007-06-16 00:16 /dev/ttyUSB0
$ lsmod|grep usb_storage <=**note noting happens here for some reason
$ lsusb
Bus 002 Device 004: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 002 Device 003: ID 05ac:0202 Apple Computer, Inc. Apple Keyboard [ALPS]
Bus 002 Device 002: ID 05ac:1001 Apple Computer, Inc. Apple Keyboard Hub [ALPS]
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 12d1:1003
Bus 001 Device 001: ID 0000:0000
$modprobe usbserial vendor=0x12d1 product=0x1003
$ls -la /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 2007-06-16 00:18 /dev/ttyUSB0
the one odd thing is on the "lsmod|grep usb_storage" nothing gets listed
As far as I remember it did the first time i went through the process, but no since...
Tazz_Tux
17-06-2007, 10:01 AM
yep... (well I think so at least ;) )
Here is the session:
the one odd thing is on the "lsmod|grep usb_storage" nothing gets listed
As far as I remember it did the first time i went through the process, but no since...
If you look at the time - the /dev/ttyUSB0 file is created 2 mins later than the first one - so it seems it will work - what cable are you using, the long or short one ?
AirWolf
17-06-2007, 11:16 AM
If you look at the time - the /dev/ttyUSB0 file is created 2 mins later than the first one - so it seems it will work - what cable are you using, the long or short one ?
Mine works with both the long and short cables and also when using both USB plugs on the long cable:)
fuzzybunny
18-06-2007, 07:18 AM
If you look at the time - the /dev/ttyUSB0 file is created 2 mins later than the first one - so it seems it will work - what cable are you using, the long or short one ?
Hmmm... you are right, but did you not say that one should have three entries? :)
I have tried both cables, with exactly the same results....
Do you think it might have something to do with insuff power from the old iMac USB ports? It only has 2, one of which I am using for the keyboard.... :(
fuzzybunny
18-06-2007, 07:21 PM
probably a stupid question, but does the E220 even work with USB 1?
Which is what I assume an old imac has?
AirWolf
18-06-2007, 10:10 PM
probably a stupid question, but does the E220 even work with USB 1?
Which is what I assume an old imac has?
To use E220, your pc is required to have:
* CPU: Pentium4, 1 GHz or above
* Memory: 128 MB RAM or above
* Hard disk: 50 MB or above
* Operating system: Windows XP or Windows 2000
* USB modem interface: USB 2.0 full speed
* Display resolution: 800 x 600 or above; 1024 x 768 is recommended
And they forgot about Mac and Linux OSs.
fuzzybunny
19-06-2007, 07:44 AM
Originally Posted by E220 User Manual Page 5
right well that solves that riddle then :(
Sorry to have wasted your time guys.
drat...
fuzzybunny
28-06-2007, 09:27 PM
OK I am back again...
I am now trying this with a "proper" computer, ie AMD Athlon 64 with USB 2 ports. it works fine on the same box under Windows XP.
However going through the process i get the exact same thing!
is it something I am doing wrong?
This is a fresh install of Ubuntu Feisty...
Here is the whole session...
:~$ ls -la /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 2007-06-28 20:51 /dev/ttyUSB0
:~$ lsmod|grep usb_storage
usb_storage 72256 0
libusual 17936 1 usb_storage
scsi_mod 142348 2 usb_storage,libata
usbcore 134280 8 usb_storage,option,usbserial,libusual,hci_usb,ohci _hcd,ehci_hcd
:~$ sudo rmmod usb-storage
:~$ lsmod|grep usb_storage
:~$ rmmod usb-serial
ERROR: Module usb_serial does not exist in /proc/modules
:~$ lsusb
Bus 002 Device 009: ID 12d1:1003
Bus 002 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
:~$ sudo modprobe usbserial vendor=0x12d1 product=0x1003
:~$ ls -la /dev/ttyU*
crw-rw---- 1 root dialout 188, 0 2007-06-28 20:55 /dev/ttyUSB0
:~$ wvdial huawei_e220
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.
PLease please please can someone help me sort this out... :(
pmarti
04-07-2007, 01:34 PM
OK I am back again...
I am now trying this with a "proper" computer, ie AMD Athlon 64 with USB 2 ports. it works fine on the same box under Windows XP.
PLease please please can someone help me sort this out... :(
In Ubuntu Feisty 686, if you do "sudo rmmod option" after plugging the device, it will be registered as a 3 serial port device.