OpenWrt Forum Archive

Topic: 3G usb modems internet over an wifi router

The content of this topic has been archived on 24 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,
I have an 3G usb modem Dlink DWP-157 i want to use its internet through my wifi router I have a TP tl-wr740n v5 & tl-mr3220 v2(although it has a usb port it does not support this usb dongle) please advice me how can i achieve this

Thank you

hello ahishbhigesara

Were you able to find a solution for this ?
I am looking for same combination

Did you install OpenWrt on TL-MR3220? According to specs it has USB port. 4MB flash is not much but should do. I assume that DWP-157 uses RAS so it might work.

yes so I did install OpenWrt but there is nothing on interface to configure so just wondering if need to do something extra for this to work

Try this steps:

1. Plug modem to USB port.
2 .Connect to router using SSH.
3. Execute following commands to install packages.

# opkg update
# opkg install kmod-usb-core kmod-usb2 usb-modeswitch libusb-1.0
# opkg install chat comgt kmod-usb-serial kmod-usb-serial-option

Check modem if LED started blinking.
4. Write commands to configure 3G connection.
You have to set your APN, user name, password and SIM card PIN number. If there is no PIN/uname/password, just omit this lines. Wrong PIN may lock card!

# uci del network.wan
# uci set network.wan=interface
# uci set network.wan.proto=3g
# uci set network.wan.device=/dev/ttyUSB0
# uci set network.wan.pincode=1234
# uci set network.wan.apn=apn_name
# uci set network.wan.username=user_name
# uci set network.wan.password=password
# uci commit network
# reboot

After reboot router should establish connection.

lukasgl's instruction worked for me. You should try it.
Thank you, lukasgl

Hi lukasgl,

I am using combination of TP-LINK router(Model: TL-MR3020) with OpenWrt firmware (Firmware Version: Barrier Breaker 14.07) and D-Link 3G usb modem (Model:  DWP-157) to access internet via the WiFi created by router.
I followed all the steps mentioned in your post but when I plug the usb modem in the router, the router is unable to mount it (that means no /dev/ttyUSB is created ).

Following are the dmesg logs when D-Link dongle is connected:

root@OpenWrt:~# dmesg
[176664.480000] usb 1-1: new high-speed USB device number 10 using ehci-platform
[176664.640000] usb-storage 1-1:1.0: USB Mass Storage device detected
[176664.640000] scsi11 : usb-storage 1-1:1.0
[176665.650000] scsi 11:0:0:0: CD-ROM            HSPA USB SCSI CD-ROM      6225 PQ: 0 ANSI: 0 CCS

But when I use the Huawei usb modem(Model:E3531) in place of D-Link, it gets mounted in few seconds and I can also access internet.
Following are the dmesg logs when Huawei dongle is connected:

root@OpenWrt:~# dmesg
[177273.110000] usb 1-1: new high-speed USB device number 13 using ehci-platform
[177273.350000] usb-storage 1-1:1.0: USB Mass Storage device detected
[177273.350000] scsi15 : usb-storage 1-1:1.0
[177273.820000] usb 1-1: USB disconnect, device number 13
[177275.170000] usb 1-1: new high-speed USB device number 14 using ehci-platform
[177275.390000] option 1-1:1.0: GSM modem (1-port) converter detected
[177275.390000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[177275.410000] option 1-1:1.2: GSM modem (1-port) converter detected
[177275.410000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[177275.420000] option 1-1:1.3: GSM modem (1-port) converter detected
[177275.440000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[177275.440000] usb-storage 1-1:1.4: USB Mass Storage device detected
[177275.460000] scsi16 : usb-storage 1-1:1.4
[177275.460000] usb-storage 1-1:1.5: USB Mass Storage device detected
[177275.480000] scsi17 : usb-storage 1-1:1.5
[177276.190000] option1 ttyUSB0: option_instat_callback: error -2
[177276.460000] scsi 16:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[177276.480000] scsi 17:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[177276.500000] sd 17:0:0:0: [sda] Attached SCSI removable disk

Please help me in resolving this issue.

Thank you,
Ashish Chugh

The discussion might have continued from here.