Connecting ubuntu 12.04.2 to internet using D-link dwm 156 3G/3.75G usb modem

https://lawrencematthew.wordpress.com/my-posts/connecting-ubuntu-12-04-2-to-internet-using-d-link-dwm-156-3g3-75g-usb-modem/

Advertisements
This entry was posted in Linux OS, Networking, Tech, Ubuntu and tagged , , , , , , , , , , , , , , . Bookmark the permalink.

50 Responses to Connecting ubuntu 12.04.2 to internet using D-link dwm 156 3G/3.75G usb modem

  1. Aakash pushp says:

    while switching it to data mode(mode switching) the command did not work.sir,please help.

  2. tetsu says:

    I’m using Kubuntu 13.04 .
    When I tried plugging the usb in, kubuntu didn’t recognise it (nothing showed up in dolphin sidebar).
    At step 1, /dev/sr (and clicked tab twice) did not return anything.
    Here is the terminal output:

    tetsu@lap:~$ lsusb
    Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 003 Device 002: ID 09da:c10a A4 Tech Co., Ltd
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 004: ID 2001:a706 D-Link Corp.
    Bus 001 Device 003: ID 04f2:b302 Chicony Electronics Co., Ltd
    tetsu@lap:~$ usb_modeswitch -v2001 -pa706

    Looking for default devices …
    found matching product ID
    adding device
    Found device in default mode, class or configuration (1)
    Accessing device 000 on bus 001 …
    Getting the current device configuration …
    Error getting the current configuration (error -1). Assuming configuration 1.
    Using first interface: 0x00
    Using endpoints 0x01 (out) and 0x81 (in)
    Inquiring device details; driver will be detached …
    Looking for active driver …
    No driver found. Either detached before or never attached
    Could not claim interface (error -1). Skipping device inquiry
    Error: could not get description string “manufacturer”
    Error: could not get description string “product”
    Error: could not get description string “serial number”

    USB description data (for identification)
    ————————-
    Manufacturer:
    Product:
    Serial No.:
    ————————-
    Warning: no switching method given.
    -> Run lsusb to note any changes. Bye.

    tetsu@lap:~$ usb_modeswitch -c /etc/usbmode.conf

    Looking for target devices …
    No devices in target mode or class found
    Looking for default devices …
    No devices in default mode found. Nothing to do. Bye.

    Thanks for your help!

    • product 0*a706 is not dlink dwm 156 A6 hardware, so the before switch or after switch product id is different.
      do u see anything like /dev/ttyACM0 or /dev/ttyUSB1 or /dev/ttyUSB2 or /dev/ttyUSB3 when u connect the modem alone to kubuntu?

      if yes, the modem has been switched already and -P= a706. and if no, the modem has not been switched and -p=a706.

      have u edited the usbmode.conf file and replaced a80b/7d00 with a706 depending on the above findings? and if modem has been switched already try using wvdial or sakis3g script. its even efficient and light weight that normal network-manager(ubuntu 12.04)

  3. seovikrama2z says:

    Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog post.

    d-link

  4. Abhinav says:

    Great tutorial !!! In my system (Ubuntu Ultimate 12.04 32bit) just a small tweak was needed in step 5 (Switching mode using manufacture id and vendor id numbers), the command needs to be executed as super-user ie
    sudo usb_modeswitch -v2001 -pa80b
    and usb-modem worked like a charm.

  5. Anonymous says:

    Hi Lawrence,
    Tried all the steps in your tutorial, not able to get it to work (my device is rev A7). Could you pls guide.. Thx

  6. Anonymous says:

    Steps that I tried:
    1. Installed the deb file after mounting the modem as a cd drive, restarted system
    2. When I do lsusb, I get output:
    Bus 002 Device 005: ID 2001:7d01 D-Link Corp.
    3. When I do sudo usb_modeswitch -v2001 -p7d01, I get:
    Looking for default devices …
    found matching product ID
    adding device
    Found device in default mode, class or configuration (1)
    Accessing device 005 on bus 002 …
    Getting the current device configuration …
    OK, got current device configuration (1)
    Using first interface: 0x00
    Error: message endpoint not given or found. Aborting.
    4. When I go to network connections and try to add a connection in mobile broadband, my modem name is not listed. It says “Create a connection for this mobile broadband device: Any device”
    5. My device model number is Dlink DWM-156 (14.4Mbps), hardware version A7, firmware version 7.0.1IN
    Hope you could help me out here.. thx

  7. Anonymous says:

    Hi Lorentz
    The first time I connected the adapter to my computer, and did lsusb, the output was:
    Bus 002 Device xxx: ID 2001:a706 D-Link Corp.
    After I mode-switched, and tried lsusb, the output was:
    Bus 002 Device xxx: ID 2001:7d01 D-Link Corp.
    Since then, this output has been constant (7d01)
    If its of any help, I’ve put a SD card in the adapter, and when I plug it in, I am able to access the contents of the memory card.

    • lorentz says:

      So mode switch is success.. so search for /dev/usbTTY0 or 1 or 2 etc.. if it exist.. install wvdial or gnome-ppp and use it..better than ubunty default gnome-network-manager..gnome-ppp for gui based configuration…its works on top of wvdial. Wvdial alone is terminal based control.. might wok..will post new steps in coming blogs

      • rajendra says:

        I have followed the above steps. But the device is not identified in the network connections. The out put of the terminal is poste.

        Out put of lsusb:
        Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
        Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
        Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
        Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
        Bus 001 Device 006: ID 2001:7d01 D-Link Corp.
        Bus 001 Device 003: ID 04f2:b044 Chicony Electronics Co., Ltd Acer CrystalEye Webcam

        out put of: usb_modeswitch -v2001 -p7d01
        Looking for default devices …
        found matching product ID
        adding device
        Found device in default mode, class or configuration (1)
        Accessing device 006 on bus 001 …
        Getting the current device configuration …
        OK, got current device configuration (1)
        Using first interface: 0x00
        Error: message endpoint not given or found. Aborting.

        then i installed wvdial and gnome-ppp as mentioned in the discussion.
        The out put of: wvdialconf

        Editing `/etc/wvdial.conf’.
        Scanning your serial ports for a modem.
        Modem Port Scan: S0 S1 S2 S3 S4 S5 S6 S7
        Modem Port Scan: S8 S9 S10 S11 S12 S13 S14 S15
        Modem Port Scan: S16 S17 S18 S19 S20 S21 S22 S23
        Modem Port Scan: S24 S25 S26 S27 S28 S29 S30 S31
        ttyUSB0: Device or resource busy
        Modem Port Scan: USB0
        WvModem: Cannot get information for serial port.
        ttyUSB1: ATQ0 V1 E1 — OK
        ttyUSB1: ATQ0 V1 E1 Z — OK
        ttyUSB1: ATQ0 V1 E1 S0=0 — OK
        ttyUSB1: ATQ0 V1 E1 S0=0 &C1 — OK
        ttyUSB1: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
        ttyUSB1: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
        ttyUSB1: Modem Identifier: ATI — MTK2
        ttyUSB1: Speed 9600: AT — OK
        ttyUSB1: Max speed is 9600; that should be safe.
        ttyUSB1: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
        WvModem: Cannot get information for serial port.
        ttyUSB2: ATQ0 V1 E1 — failed with 2400 baud, next try: 9600 baud
        ttyUSB2: ATQ0 V1 E1 — failed with 9600 baud, next try: 9600 baud
        ttyUSB2: ATQ0 V1 E1 — and failed too at 115200, giving up.
        WvModem: Cannot get information for serial port.
        ttyUSB3: ATQ0 V1 E1 — failed with 2400 baud, next try: 9600 baud
        ttyUSB3: ATQ0 V1 E1 — failed with 9600 baud, next try: 9600 baud
        ttyUSB3: ATQ0 V1 E1 — and failed too at 115200, giving up.
        Found a modem on /dev/ttyUSB1.
        Modem configuration written to /etc/wvdial.conf.
        ttyUSB1: Speed 9600; init “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0”

        The configuration mentioned in /etc/wvdial.conf is
        [Dialer Defaults]
        Init1 = ATZ
        Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
        Modem Type = Analog Modem
        ; Phone =
        ISDN = 0
        ; Password =
        New PPPD = yes
        ; Username =
        Modem = /dev/ttyUSB1
        Baud = 9600

        Thank you.

  8. Anonymous says:

    Hi Lorentz
    ttyUSB0,1,2,3 are there. Installed wvdial, its asking for phone number, username and password. I have Aircel prepaid SIM in the dongle. Could you give me the steps how to configure?

    • lorentz says:

      Does wvdial dectect the modem?? If so dialingnumber is *99# .username and password ” ” . Just put space. Don’t leave blank. Single space will do..
      Apn is aircelgprs

  9. Anonymous says:

    Hi Lorentz
    Put dialing number as *99#, and single space for username and password in wvdial configuration file. When I run sudo wvdial, I get these msgs:

    –> WvDial: Internet dialer version 1.61
    –> Cannot get information for serial port.
    –> Initializing modem.
    –> Sending: ATZ
    ATZ
    OK
    –> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    V1 E1 S0=0 &C1 &D2 +FCLASS=0
    OK
    –> Modem initialized.
    –> Configuration does not specify a valid phone number.
    –> Configuration does not specify a valid login name.
    –> Configuration does not specify a valid password.

    And in wvdial, where to specify apn name?

    • lorentz says:

      Did u edit the /etc/wvdial.conf ? And save it successfully.. to save type ctrl+z and y .. once all these details are saved it will connect. Install te latest version of usb-modeswitch. And recheck for the .conf file if data entered is correct.. also send me a screen shot of the .conf file to my email. The username and password field should be and empty single space without “” or []..it just username:
      Password:

  10. Anonymous says:

    Hi Lorentz
    I have emailed you wvdial config file screenshot. Installed latest version of usb-modeswitch, restarted system and tried. I am getting same error with wvdial:
    OK
    –> Modem initialized.
    –> Configuration does not specify a valid phone number.
    –> Configuration does not specify a valid login name.
    –> Configuration does not specify a valid password.

  11. Anonymous says:

    Hi Lorentz
    Removed the ; symbol at the start of each line. But still I get the msg:
    –> Configuration does not specify a valid login name.
    –> Configuration does not specify a valid password.
    Looks like it is accepting the phone number now. I have put single space for username and password.

  12. Aneesh says:

    HI,

    When I connect DWM-156 my device not showing in /dev/. I can see that two folders there(shm and snd). Can you help me on this.

    • lorentz says:

      Lsusb output please? Whats hardware version of your product?

      • Aneesh says:

        Hi,

        I am using Dell Inspiron 15-3521. Here is my lsusb stats.

        Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
        Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
        Bus 003 Device 002: ID 046d:c045 Logitech, Inc. Optical Mouse
        Bus 003 Device 008: ID 2001:a80b D-Link Corp.
        Bus 003 Device 003: ID 1a2c:0023
        Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
        Bus 001 Device 003: ID 0cf3:0036 Atheros Communications, Inc.
        Bus 001 Device 004: ID 0c45:64ad Microdia

      • lorentz says:

        Ok type the sudo mode-switch command mentioned..
        It will change from a80b to modem mode

      • lorentz says:

        Did u try the sudo usb-modeswitch command?? Try it after updating mode switch to latest version..

  13. iniyan says:

    In case step 5 fails, then download this file and paste it to /etc . This file contains the message needed to be send to dwm 156 A6 hardware to internally switch the mode. In case u cant past it directly into /etc folder the make a new file by typing

    sudo nano /etc/usbmode.conf and paste the content of the above file there and save it using the CTRL+X command . And then type in terminal usb_modeswitch -c /etc/usbmode.conf . It should help can u explain these steps… how to create / etc

  14. padam says:

    Hi lorentz ,
    I have tried all the methods given here nothing works for me.
    my model is DWM-156 (A7).

    I downloaded your driver file from box and followed the steps and it dint work. Then I installed the drives provided by device by coping it from windows machine and followed the steps but it dint work. Please let me know how can I proceed now.

    lsusb before
    Bus 003 Device 010: ID 2001:a706 D-Link Corp.
    and after
    Bus 003 Device 010: ID 2001:a706 D-Link Corp.

    Following if the syslog:
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC modem-manager[16523]: (ttyUSB1) closing serial port…
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC modem-manager[16523]: (ttyUSB1) serial port closed
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC modem-manager[16523]: (ttyUSB1) opening serial port…
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC modem-manager[16523]: (ttyUSB2) closing serial port…
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC modem-manager[16523]: (ttyUSB2) serial port closed
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC modem-manager[16523]: (ttyUSB2) opening serial port…
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC modem-manager[16523]: (ttyUSB3) closing serial port…
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC modem-manager[16523]: (ttyUSB3) serial port closed
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC modem-manager[16523]: (ttyUSB3) opening serial port…
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: expect (OK)
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: ^M
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: AT+CGDCONT=1,”IP”,”airtelgprs.com”^M^M
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: OK
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: — got it
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: send (ATD*99***1#^M)
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: timeout set to 22 seconds
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: expect (CONNECT)
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: ^M
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: ATD*99***1#^M^M
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: CONNECT
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: — got it
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC chat[16604]: send (^M)
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: Script /usr/sbin/chat -v -f /etc/3g_modem_connection/3g finished (pid 16603), status = 0x0
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: Serial connection established.
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: using channel 3
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: Using interface ppp0
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: Connect: ppp0 /dev/ttyUSB0
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC NetworkManager[1126]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
    Oct 28 12:22:51 dhana-HP-Pavilion-Sleekbook-15-PC NetworkManager[1126]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [LCP ConfReq id=0x1 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [LCP ConfReq id=0x1 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [LCP ConfAck id=0x1 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [LCP ConfNak id=0x1 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [LCP ConfReq id=0x2 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [LCP ConfAck id=0x2 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [LCP EchoReq id=0x0 magic=0x46c0df59]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [PAP AuthReq id=0x1 user=”” password=]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [LCP EchoRep id=0x0 magic=0x0]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [PAP AuthAck id=0x1 “”]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: PAP authentication succeeded
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [CCP ConfReq id=0x1 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [IPCP ConfReq id=0x1 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [IPCP ConfReq id=0x1]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [IPCP ConfNak id=0x1 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [LCP ProtRej id=0x0 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: Protocol-Reject for ‘Compression Control Protocol’ (0x80fd) received
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [IPCP ConfRej id=0x1 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [IPCP ConfReq id=0x2 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [IPCP ConfReq id=0x2 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [IPCP ConfRej id=0x2 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [IPCP ConfRej id=0x2]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [IPCP ConfReq id=0x3 ]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [IPCP ConfReq id=0x3]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [IPCP ConfAck id=0x3]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: rcvd [IPCP ConfRej id=0x3]
    Oct 28 12:22:52 dhana-HP-Pavilion-Sleekbook-15-PC pppd[16598]: sent [IPCP ConfReq id=0x4 ]

  15. Preet says:

    hi lorentz,
    i tried step 5.1.. the modem has still not switched mode 😦
    i have a D-link DWM 156 and I did exactly what u said ..
    cotents of lsusb

    preet@ubuntu:~$ lsusb
    Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 003 Device 002: ID 8644:800b
    Bus 003 Device 009: ID 2001:a80b D-Link Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 003: ID 8087:07da Intel Corp.
    Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp.
    Bus 001 Device 005: ID 0c45:64ad Microdia

    modeswitch command:

    preet@ubuntu:~$ sudo usb_modeswitch -v2001 -pa80b

    Looking for default devices …
    found matching product ID
    adding device
    Found device in default mode, class or configuration (1)
    Accessing device 009 on bus 003 …
    Getting the current device configuration …
    OK, got current device configuration (1)
    Using first interface: 0x00
    Using endpoints 0x01 (out) and 0x81 (in)
    Inquiring device details; driver will be detached …
    Looking for active driver …
    OK, driver found (“usbfs”)
    OK, driver “usbfs” detached

    SCSI inquiry data (for identification)
    ————————-
    Vendor String: HSPA USB
    Model String: SCSI CD-ROM
    Revision String: 6229
    ————————-

    USB description data (for identification)
    ————————-
    Manufacturer: D-Link,Inc
    Product: D-Link DWM-156
    Serial No.: 532274404902270
    ————————-
    Warning: no switching method given.
    -> Run lsusb to note any changes. Bye.

    preet@ubuntu:~$ lsusb
    Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 003 Device 002: ID 8644:800b
    Bus 003 Device 009: ID 2001:a80b D-Link Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 003: ID 8087:07da Intel Corp.
    Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp.
    Bus 001 Device 005: ID 0c45:64ad Microdia
    preet@ubuntu:~$

    the mode dosn’t switch 😦
    initially the mode switch command..
    usb_modeswitch -v2001 -pa80b
    did not work ..it said that there was no info for manufacturer and product id
    thats when i did the step 5.1
    and it seem to look fine .. but there were no changes in lsusb

    so i checked the contents of usbmode.conf and that looked fine..

    please help

    • Preet says:

      and if i try running this command again

      preet@ubuntu:~$ sudo usb_modeswitch -c /etc/usbmode.conf

      Looking for target devices …
      No devices in target mode or class found
      Looking for default devices …
      found matching product ID
      adding device
      Found device in default mode, class or configuration (1)
      Accessing device 009 on bus 003 …
      Getting the current device configuration …
      OK, got current device configuration (1)
      Using first interface: 0x00
      Using endpoints 0x01 (out) and 0x81 (in)
      Inquiring device details; driver will be detached …
      Looking for active driver …
      No driver found. Either detached before or never attached
      ^Z
      [3]+ Stopped sudo usb_modeswitch -c /etc/usbmode.conf

      • Preet says:

        preet@ubuntu:~$ usb_modeswitch -c/etc/usbmode.conf

        Looking for target devices …
        No devices in target mode or class found
        Looking for default devices …
        found matching product ID
        adding device
        Found device in default mode, class or configuration (1)
        Accessing device 000 on bus 003 …
        Getting the current device configuration …
        Error getting the current configuration (error -1). Assuming configuration 1.
        Using first interface: 0x00
        Using endpoints 0x01 (out) and 0x81 (in)
        Inquiring device details; driver will be detached …
        Looking for active driver …
        No driver found. Either detached before or never attached
        Could not claim interface (error -1). Skipping device inquiry
        Error: could not get description string “manufacturer”
        Error: could not get description string “product”
        Error: could not get description string “serial number”

        USB description data (for identification)
        ————————-
        Manufacturer:
        Product:
        Serial No.:
        ————————-
        Looking for active driver …
        No driver found. Either detached before or never attached
        Setting up communication with interface 0
        Could not claim interface (error -1). Skipping message sending
        -> Run lsusb to note any changes. Bye.

        preet@ubuntu:~$

        this is what happened when i tried again

      • Preet says:

        i tried again .. and got a different output this time

        preet@ubuntu:~$ usb_modeswitch -c/etc/usbmode.conf

        Looking for target devices …
        No devices in target mode or class found
        Looking for default devices …
        found matching product ID
        adding device
        Found device in default mode, class or configuration (1)
        Accessing device 000 on bus 003 …
        Getting the current device configuration …
        Error getting the current configuration (error -1). Assuming configuration 1.
        Using first interface: 0x00
        Using endpoints 0x01 (out) and 0x81 (in)
        Inquiring device details; driver will be detached …
        Looking for active driver …
        No driver found. Either detached before or never attached
        Could not claim interface (error -1). Skipping device inquiry
        Error: could not get description string “manufacturer”
        Error: could not get description string “product”
        Error: could not get description string “serial number”

        USB description data (for identification)
        ————————-
        Manufacturer:
        Product:
        Serial No.:
        ————————-
        Looking for active driver …
        No driver found. Either detached before or never attached
        Setting up communication with interface 0
        Could not claim interface (error -1). Skipping message sending
        -> Run lsusb to note any changes. Bye.

        preet@ubuntu:~$

  16. milanonline says:

    First install 3g_modem_connect_D300_i386.deb which is inside usb adapter to pc.Just mount usb adapter as a CD drive or copy using Windows 7 OS

    meelogs@meelogs-desktop ~ $ lsusb
    Bus 001 Device 003: ID 2001:a706 D-Link Corp. #notice the product ID
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    meelogs@meelogs-desktop ~ $ sudo 3g_
    3g_connect.sh 3g_modem_switch
    meelogs@meelogs-desktop ~ $ sudo 3g_modem_switch -v2001 pa706
    No default vendor/product ID given. Aborting. #if this fails as it happened here type next line(tab completion)

    meelogs@meelogs-desktop ~ $ sudo 3g_modem_switch -c /etc/3g_modem_connection/switch_2001_7d01.conf

    Looking for target devices …
    No devices in target mode or class found
    Looking for default devices …
    found matching product ID
    adding device
    Found device in default mode, class or configuration (1)
    Accessing device 003 on bus 001 …
    Getting the current device configuration …
    OK, got current device configuration (1)
    Using first interface: 0Γ—00
    Using endpoints 0Γ—01 (out) and 0Γ—81 (in)
    Inquiring device details; driver will be detached …
    Looking for active driver …
    OK, driver found (β€œusb-storage”)
    OK, driver β€œusb-storage” detached

    SCSI inquiry data (for identification)
    β€”β€”β€”β€”β€”β€”β€”β€”-
    Vendor String: HSPA USB
    Model String: SCSI CD-ROM
    Revision String: 6225
    β€”β€”β€”β€”β€”β€”β€”β€”-

    USB description data (for identification)
    β€”β€”β€”β€”β€”β€”β€”β€”-
    Manufacturer: D-Link,Inc
    Product: D-Link DWM-156
    Serial No.: 536591501550760
    β€”β€”β€”β€”β€”β€”β€”β€”-
    Setting up communication with interface 0
    Using endpoint 0Γ—01 for message sending …
    Trying to send message 1 to endpoint 0Γ—01 …
    OK, message successfully sent
    Resetting response endpoint 0Γ—81
    Resetting message endpoint 0Γ—01
    -> Run lsusb to note any changes. Bye.

    meelogs@meelogs-desktop ~ $ lsusb
    Bus 001 Device 004: ID 2001:7d01 D-Link Corp. #on successful mode switcting ie from normal data card to 3G Modem
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    meelogs@meelogs-desktop ~ $ ifconfig
    eth0 Link encap:Ethernet HWaddr 00:e0:4c:36:25:f9
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:31 errors:0 dropped:0 overruns:0 frame:0
    TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:3244 (3.2 KB) TX bytes:3244 (3.2 KB)

    ppp0 Link encap:Point-to-Point Protocol
    inet addr:223.187.3.58 P-t-P:10.64.64.64 Mask:255.255.255.255
    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
    RX packets:90 errors:0 dropped:0 overruns:0 frame:0
    TX packets:92 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:3
    RX bytes:774 (774.0 B) TX bytes:2200 (2.2 KB)

    meelogs@meelogs-desktop ~ $ ping google.com
    PING google.com (74.125.236.163) 56(84) bytes of data.
    64 bytes from maa03s16-in-f3.1e100.net (74.125.236.163): icmp_req=1 ttl=55 time=281 ms
    64 bytes from maa03s16-in-f3.1e100.net (74.125.236.163): icmp_req=2 ttl=55 time=378 ms
    ^C64 bytes from maa03s16-in-f3.1e100.net (74.125.236.163): icmp_req=3 ttl=55 time=240 ms

    β€” google.com ping statistics β€”
    3 packets transmitted, 3 received, 0% packet loss, time 6982ms
    rtt min/avg/max/mdev = 240.521/299.948/378.119/57.719 ms
    meelogs@meelogs-desktop ~ $

    next time simply plug in and wait for a few seconds untill green led blinks for a few second.

    http://milanonline.wordpress.com/2014/02/11/using-usb-adapter-d-link-156-in-linux/

    • lorentz says:

      thanks for the guide on connecting the dlink modem to ubuntu. have u any idea how to connect this to raspberry pi, all my trials fails.. thats the problem

      • milanonlinux says:

        Did you check with other OS..This link may help with supported OS raspberrypi.org/downloads

  17. Anonymous says:

    Hi! Your guide works great, but ony problem is when i remove the device and reconnect it the mode goes back to the initial one (Ubuntu 12.0.4). So it has be switched by typing the command each time. Can you suggest a way to make an executacle file which can work on the .conf file and do the switching just by a click.

  18. milanonlinux says:

    just make a script!

  19. Raja Gopala Chary says:

    Thank you somuch…. It worked for me

  20. Anonymous says:

    the whole thing worked for me till step 6 but not after dat.Suggest any option for ubuntu 12.04

  21. hassan says:

    Hi,step 5 when I type usb and press tab twice ,I can see usb_modeswitch
    I try STEP5.1 but when I type usb_modeswitch -c /etc/usbmode.conf then there was an error said that permission denied
    please help me dear
    thanks

  22. angankeyen says:

    how about connect this modem in 14.04

  23. Anonymous says:

    hello sir can you pls help me to connect to an andriod device or at least unlock it from read only format pls do reply on my email estevam.ferrao@gmail.com

    • lorentz says:

      its is possible to connect USB modem to android tablet
      if by default no software is provided, then 3rd part aps from play store will help , you will defenitly need a “usb host ” cable

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s