Wednesday, 21 August 2013

Connecting Ubuntu to Internet using Dlink Modem

  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.
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 terminalusb_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 homepic6
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…

3 comments:

  1. Hi I followed your steps except the link to usbmode.conf file is not accessible. Can you pls send me that file on my email mayurkhupat@gmail.com. Anyways this artical was great.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete