Huawei EC226 USB Modem [RESOLVED]

Discussion in 'Networking' started by resafrica, Jun 28, 2009.

  1. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Re: Huawei EC226 USB Modem

    You are welcome.
    Although we did not solve it, I don't have the feeling that we wasted our time.

    --Japser.
     
    Japser, Jul 1, 2009
    #21
  2. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Re: Huawei EC226 USB Modem

    You know what is interesting, when I ran lsusb the system detected the Huawei modem as model EM770 which in fact is a laptop card (MI module) I wonder if there is a problem in the recognition of the modem?
     
    resafrica, Jul 1, 2009
    #22
  3. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Re: Huawei EC226 USB Modem

    No, I don't think so.

    It works like this: -every- usb-device has a internally a set of two numbers: VendorID and ProductID
    lsusb just does this: scanning the devices for their numbers.
    Then, somewhere on your system there is a list, lsusb looks up the number and displays whatever is in that list behind that number. But many different devices may share the same number, so this is totally unreliable, and also unimportant.

    The system just works by the numbers !
    As far as I understand it: the fact that a vendor gives a product the same number as another product means: works with the same driver ( module in linux-speak).

    The 'mother' of this list: http://www.linux-usb.org/usb.ids
    But note: it is unreliable and unimportant.

    What counts is the numbers in the file /lib/modules/<kernelversion>/modules.usbmap
    There the number is connected to the module that should be loaded and do it's work.

    -------
    Huawei VendorID = 12d1
    So what is the ProductId ?
     
    Japser, Jul 1, 2009
    #23
  4. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Re: Huawei EC226 USB Modem

    The productID is 1001 and on the "Mother" list it refers to E620 USB Modem
     
    resafrica, Jul 1, 2009
    #24
  5. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Re: Huawei EC226 USB Modem

    What happens now if you do a

    sudo wvdial

    ?
     
    Japser, Jul 1, 2009
    #25
  6. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Re: Huawei EC226 USB Modem

    This is what happens:

    [user@localhost ~]$ sudo wvdial
    --> WvDial: Internet dialer version 1.60
    --> Cannot get information for serial port.
    --> Initializing modem.
    --> 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: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    OK
    --> Modem initialized.
    --> Sending: ATDT*99#
    --> Waiting for carrier.
    ATDT*99#
    ERROR
    --> Invalid dial command.
    --> Disconnecting at Wed Jul 1 15:32:45 2009
     
    resafrica, Jul 1, 2009
    #26
  7. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Re: Huawei EC226 USB Modem

    Phone = *99***1#

    Just guessing ...

    sudo gedit /etc/wvdial.conf

    What does that file look like now ?
     
    Japser, Jul 1, 2009
    #27
  8. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Re: Huawei EC226 USB Modem

    I am getting "Command not found" on sudo gedit....
     
    resafrica, Jul 1, 2009
    #28
  9. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Re: Huawei EC226 USB Modem

    sudo mousepad
     
    Japser, Jul 1, 2009
    #29
  10. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Re: Huawei EC226 USB Modem

    I suppose I should edit:
    Password =
    Phone =
    Username =

    [Dialer Defaults]
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Password = password
    Phone = *99#
    APN = internet
    Modem Type = Analog Modem
    Stupid Mode = 1
    Baud = 460800
    Dial Command = ATDT
    Modem = /dev/ttyUSB_utps_modem
    ISDN = 0
    Username = username
     
    resafrica, Jul 1, 2009
    #30
  11. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Re: Huawei EC226 USB Modem

    First we must get past this "invalid dial command".

    Phone = *99***1#

    Just try it.

    In a previous post we could find for Namibia, MTC ( is that correct ? ):

    APN = ppsinternet
    Username = guest
    Password = guest
     
    Japser, Jul 1, 2009
    #31
  12. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Re: Huawei EC226 USB Modem

    In the Mobile Partner program the Phone entry is #777 - so should I try the entry below
    Phone = *99***1#
    or #777 which works on Windows.
    The service provider is Telecom Namibia and not MTC but I do not know the APN for Telecom.
    I have a Username and a Password.
    I noticed that the Modem Type is entered as Analogue - is that correct?
     
    resafrica, Jul 1, 2009
    #32
  13. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Japser, Jul 1, 2009
    #33
  14. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Re: Huawei EC226 USB Modem

    I changed the Phone, Username and Password to my own setting and - surprise surprise - it connected.
    However, I have no Internet or mail access.
    I noticed that the --> remote IP address 192.168.1.1 is the IP address from our ADSL modem which should not show here
    The DNS entries must have been picked up from our wireless LAN which is configured for our ADSL line.
    So how can we fix that?

    [user@localhost ~]$ sudo wvdial
    --> WvDial: Internet dialer version 1.60
    --> Cannot get information for serial port.
    --> Initializing modem.
    --> Sending: ATZ
    OK
    --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    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#777
    --> Waiting for carrier.
    ATDT#777
    CONNECT
    --> Carrier detected. Starting PPP immediately.
    --> Starting pppd at Wed Jul 1 19:16:49 2009
    --> Pid of pppd: 27842
    --> Using interface ppp0
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
    --> local IP address 10.0.1.179
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
    --> remote IP address 192.168.1.1
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
    --> primary DNS address 196.44.128.146
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
    --> secondary DNS address 196.44.136.165
    --> pppd: [08]m[07][08][08]k[07][08]8m[07][08]
     
    resafrica, Jul 1, 2009
    #34
  15. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Re: Huawei EC226 USB Modem

    Funny!

    IP-adresses starting with 10. or 192.168. are 'local' adresses.
    But the DNS addresses are correct !

    I suggest: disconnect wired internet, switch off WiFi, reboot and try several times.

    Also the output of

    /sbin/route

    could be interesting ....
     
    Japser, Jul 1, 2009
    #35
  16. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Hurray !!! Jasper, we made it. After rebooting and turning off WiFi all is working. Now I only have a couple more questions:
    1) can I create a short cut for sudo wvdial and if so how so that it shows up on the desktop?
    2) How can I turn off the connection if the sudo wvdial was not run in terminal?

    Thank you so much for all your help, you made my day.
    Cheers - Klaus
     
    resafrica, Jul 1, 2009
    #36
  17. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Very good!.

    Now 'how to do this properly?'

    From an earlier post:
    Wat you see is that root is the owner and can read and write to the modem.
    But there is also a group named uucp that can access the modem.
    If you as a user are in the group uucp then wvdial will not complain with 'cannot open' or similar.
    The command to do that:

    sudo usermod -aG uucp user

    I hope that is correct. ( The user is actually called 'user' )
    After a reboot just

    wvdial

    should work ... (???) ...

    To see the groups you are in do

    groups

    I don't know how to create a desktop icon.
    Can you make an entry in the right-click menu ?

    --Japser.
     
    Japser, Jul 2, 2009
    #37
  18. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Hi Jasper,
    I did as outlined. Unfortunately I get the following response:
    [user@localhost ~]$ wvdial--> WvDial: Internet dialer version 1.60
    --> Cannot open /dev/ttyUSB_utps_modem: Device or resource busy
    --> Cannot open /dev/ttyUSB_utps_modem: Device or resource busy
    --> Cannot open /dev/ttyUSB_utps_modem: Device or resource busy

    [user@localhost ~]$ groups
    user wheel uucp
    [user@localhost ~]$

    No problem with the Desktop. Though, how can I add it to the right-click menu?
    The other question is how can I terminate the modem connection after wvdial if not run in terminal?
     
    resafrica, Jul 2, 2009
    #38
  19. resafrica

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    OK. , just run

    sudo wvdial

    in a terminal.

    The advantage is that you see what happens, and closing the terminal will close the connection.
    As long as the connection is open the window can be minimised.

    I just don't know how to get that under an icon.
    ( I am on another system )

    --Japser.
     
    Japser, Jul 2, 2009
    #39
  20. resafrica

    resafrica

    Joined:
    Jun 28, 2009
    Messages:
    21
    Likes Received:
    0
    Location:
    Tsumeb, Namibia
    Again, Jasper, Thanks for all your help and I mean it - job well done. :D
     
    resafrica, Jul 2, 2009
    #40
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.