LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   USB modem stick (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/usb-modem-stick-4175474342/)

Keith Sayers 08-22-2013 08:40 PM

USB modem stick
 
I seek a Linux-capable USB modem stick to work with Kubuntu 12.04 on my laptop. I have opened a mobile broadband account with Iprimus and they have sent me a HUAWEI Mobile Connect Model E160E HSDPA USB stick which works well with Windows and for a while did so also with Linux. But it now no longer does and from asking around I have gathered that this particular stick can be temperamental. Preferably I would like to buy a new stick which is Linux enabled, but if not then can this stick be re-programmed, please?

Thank you!

qlue 08-23-2013 03:46 AM

The problems you are having are most likely common to all modems. The usual solution is to install usb-modeswitch. However, this is not really needed.

When your Linux system is already running and you plug your usb modem in, it presents itself as a faux-cdrom. Ejecting that faux-cdrom will switch it to modem mode. (this is all usb-modeswitch does anyway)

In my experience, this doesn't always help because the network manager seems to have difficulty recognising the modem after it's switched into modem mode.

Another, better, solution is to always plug the modem in before you boot into Linux. If the modem is already connected when you boot up, it defaults to modem mode and the network manager will find it automatically.

(note: some of the very first usb modems actually do need usb-modeswitch, but to the best of my knowledge, none of the Huawei modems fall into that category)


About mode switching:

The reason usb modems present themselves as a faux-cdrom is due to a bug in the Windows implementation of the usb protocol. A usb device can present itself as multiple devices at once and the operating system is meant to be able to deal with each device separately. However, Windows can only do this if it already has drivers installed for all the devices presented. If Windows does not have a driver for one of those devices, then the entire physical device is 'not recognised' and cannot be used.
As a work-around, modem manufactures designed their devices to present only as a read-only storage device which contained the drivers and software to run that device. Once those drivers and software are installed, they send a command to the modem to switch it into modem mode.
Early implementations used a custom command which is why usb-modeswitch was created in the first place. However, almost all modern implementations use the eject command to do this switching as eject is available on all platforms. So, while people often still use usb-modeswitch, it's not really needed anymore in most cases.

Keith Sayers 08-25-2013 03:21 AM

Thank you for the reply, I appreciate your help but it seems to have changed rather than solved the problem.

I put the modem stick in before booting, the blue light flashed so I deduced it had been detected, clicked on the connection icon at the bottom, got my usual screen in which I then click on 'iPrimus' but instead of getting a connection I got a message 'Waiting for Authorisation' - but no apparent means of entering such authorisation. I did a bit of poking around and went into 'Manage Connection' and then Mobile Broadband which told me 'iPrimus Connected'. I deduce from that that I now have a software rather than a hardware problem - should I now be in another forum?

I then removed the USB modem stick, connected to the landline modem and have come through to this forum with no problem so the software settings must be correct. (And I was not challenged for authorisation.)

qlue 08-25-2013 06:20 AM

This is just a guess, but do you have the sim card's pin on or off?
I usually turn the sim pin of (by putting it in a cellphone, then in security settings of the cellphone disable pin)
There is a problem with trying to enter the pin in Linux, and it manifests in different ways depending on the distro. I think the usual way to fix it is to edit a config file somewhere, but I've never managed to figure out where.

You can possibly try a manual dial in using gnome-ppp and wvdial.

Keith Sayers 08-27-2013 07:05 PM

Thank you for the idea - it gives me some ideas. I do not have a cell phone but will try the config idea.

PhantomCC 09-05-2013 03:38 AM

i'm having the same problem and followed Glue's suggestion and viola, it worked! thanks , Glue!

qlue 09-05-2013 12:33 PM

I'm glad it helped! :)


All times are GMT -5. The time now is 12:16 PM.