How to install a 3G dongle on a TL-WR703N

Sun, 02/12/2012 - 18:24 -- Remiguel

Once installed Openwrt on the router WR703N and LuCI, we will setup Openwrt to works alone as a router with a USB 3G dongle.

 

 

 


Setting up of the USB dongle

This configuration is working for my Huawei 173 and a old Novatel (both from Movistar)
We can do the installation from LuCI (GUI) or through ssh.
In order to have internet access to do the modification, we have to connect the WR703N to our home router. Our Pc or Mac have to be connected to the same network..

Via LuCI (GUI)

  • Click on update.
  • Install the following packages: comgt, kmod-usb2, kmod-usb-ohci, usb-modeswitch, usb-modeswitch-data, sdparm, luci-proto-3g

Via ssh

  • Open Putty and access to the router WR703N with the IP address 192.168.1.111
  • Update the Package list with this command:

opkg update

  •  Install in one step all the needed packages with this command:

opkg install comgt kmod-usb2 kmod-usb-ohci usb-modeswitch usb-modeswitch-data sdparm luci-proto-3g

  • Edit the file /etc/chatscripts/3g.chat (with the vi editor)

vi /etc/chatscripts/3g.chat

  • Go to the line OK "ATD*99***1#" 
  • We have to edit only this line. press i and erase what we don't need. Replace

OK "ATD*99***1#"

  • With

OK "ATD*99#"

  • Exit with esc and save with :w and enter.
  • With Ctrl z exit vi.

 

Edit the config file (The same as we modified at the beginning of the first tutorial)

In this file, we have to add the parameters of the USB dongle. We can edit it from LuCI, but doing it from ssh, it helps to keep more control on the data we are changing.

vi /etc/config/network

  • Go to the end of the file and press i (to … edit the file).
  • Copy and past the following lines (change the PIN "1234" to yours).

config interface 'wan'
option proto '3g'
option ifname 'ppp0'
option service 'umts'
option apn 'movistar.es'
option pincode '1234'
option username 'MOVISTAR'
option password 'MOVISTAR'
option device '/dev/ttyUSB1'

  • Exit with esc and save with :w and enter. With Ctrl z exit vi.
  • The file should be as shown:

  • Enter the IP address 192.168.1.111 in your browser.
  • Enter the root password.

  • Click on the network tab.

  • Check the data by clicking on edit of the WAN data.
  • On this window we can edit our SIM PIN, without to connect with SSH

 

 

We are over.
It is really important to have the router completely started and ready (with the LED steady) before to plug the 3G dongle. By plugging the 3G dongle its LED will flash from green to blue and once the internet connection is established the LED will stop flashing. Now we can see that the Dongle is transmitting RX and TX data.

Comments

Submitted by salantrax (not verified) on

I do not want to write another chat script (like GPRS BT/DUN days). This is it.
Beautiful article, beautiful site, monsieur!

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.