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


I decided to post this myself because most of the guides and tutorials regarding this including many videos in YouTube doesn’t seems to work. and i found out that many people are also having the same problem with connecting this specific usb modem to Ubuntu 12.04.1,12.04.2, including Kubuntu, Edubuntu and many versions of Ubuntu.

The problem can be solved in the following 7 steps. I am taking into assumption that you have the Ubuntu OS installed and u have the dwm156 d-link modem with a Internet plan activated Sim inserted.

You can also jump directly to Step3 after downloading the required fies from ( downoad)

STEP 1: To find the value of X in the word “srX”.

Unplug the usb modem from PC and open terminal( CTRL + ALT + T).  Then type mount /dev/sr (do not press enter but just click tab twice). you can see an option sr0, etc:

Then plug in the modem and type in terminal /dev/sr (do not press enter but just click tab twice). you can see an option sr0, sr1,etc: The newly added value is the required one. For me it was sr2.

STEP2: Mount the usb modem as a CD drive.

Do not unplug the modem. Go to terminal and type sudo mount /dev/sr2   /cdrom . Enter superuser password when prompted.

STEP3: Extract the .deb driver file of 32bit or 64 bit OS. Mine is 32 bit.

Once it is done you can open cdrom from nautilus or from file system/cdrom. U will see 2 .deb files of which one is 3g_modem_connect_DWM156_i386.deb, copy it to home folder.
In terminal type ls and confirm u see the .deb file there. Double clicking the .deb file might not always work. So use the terminal install method.pic2

Go to home folder rename the deb file to a smaller shorter name something like dlink.deb

STEP4: Install the file using terminal commands.

In terminal type sudo dpkg -i dlink.deb

pic3If u see the above picture u have successfully installed the .deb driver file

STEP5: Switching mode using manufacture id and vendor id numbers.

In terminal type usb(press tab twice)
u will seepic4

You need usb_modeswitch to be visible there. If it is visible then good. Type lsusb and see the following section

pic5 edit
Bus xxx Device xxx: ID 2001:a80b D-Link Corp. The number 2001 is manufacturer id and a80b is vender id(before mode switching). If u see this then type in terminal usb_modeswitch -v2001 -pa80b and press enter, then it will switch mode from normal mode to data card mode
so u will seepic5

Type lsusb in terminal
Bus xxx Device xxx: ID 2001:7d00 D-Link Corp. Here also 2001 is manufacturer id and 7d00 is modem vendor id(mode switching is success)

STEP5.1: 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

STEP6: Connecting to Internet

Once that is done go to network connections from dash homepic6pic7

click add u will seepic8

Click continue select country and other settings (mine is india/bsnl/bsnlnet)pic9pic10pic11pic12pic13

Click the icon u see below in top right cornerpic14

STEP 7: In the dropdown enable(tick mark) mobile broadband and then click bsnl/cellone/3g ,it will connect automatically and show indication its connected

pic15Repeat step 7 next time you want to connect again. The above details have been collected from many different sources and experimented by me and found working. However due to different hardware /software configurations, the above given methods might only work for 8/10 people who try this. In case it is not working post your error status here and hopefully someone will help to fix it…

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

  1. Pingback: Connecting ubuntu 12.04.2 to internet using D-link dwm 156 3G/3.75G usb modem | Lawrence's Blog

  2. Sunny Singh says:

    Hi,
    You are a genius….. I am a newbie to linux and i was searching for ways to connect my dlink but all in vein… But got it working with your help..

  3. salima says:

    thank you, i have been following your good advice since i was using 10.04, then 12.04. i was using dwm 156 with bsnl and now i am on lubuntu 14.04.2 and for some reason it doesnt work with a vodafone sim. i can connect with a vodafone dongle and vodafone sim, but i cant buy one where i live. also in mp they are using the idea network so maybe that is a problem? i get the modem manager error-crash-related to some bugs when i try to connect with vodafone, only sometimes, and other times it just doesnt connect without any errors. any idea what is wrong?

  4. gabriel says:

    when i extract file of 3g_modem_connect_DWM156_amd64.deb successfull, but next instruction i dont have file of dlink.deb …why i did’t has??

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