OpenWrt Forum Archive

Topic: TP-Link MA260 as 3G Dongle

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

Recognized as mass storage..

[   11.460000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   11.610000] scsi 1:0:0:0: CD-ROM            TP-LINK  MMC Storage      2.31 PQ: 0 ANSI: 2
[   11.620000] scsi 1:0:0:1: Direct-Access     TP-LINK  MMC Storage      2.31 PQ: 0 ANSI: 2
[   11.630000] sd 1:0:0:1: [sdb] Attached SCSI removable disk

Where do I start ?

lsusb ;

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 001 Device 002: ID 05e3:0605 Genesys Logic, Inc. USB 2.0 Hub [ednet]
Bus 001 Device 003: ID 0781:556b SanDisk Corp.
Bus 001 Device 004: ID 2357:9000

2357:9000 is the dongle

I've read the recipe, but I'm stuck on usb-modeswitch, can't figure it out..

I've created the file /etc/usb_modeswitch.d/2357:f000, cause it did not exist

contents of the file

# TP-Link MA260

TargetVendor= 0x2357
TargetProduct= 0x9000

MessageContent="5553424312345678000000000000061b000000020000000000000000000000"

then unplugged and replugged the dongle, even rebooted, still recognized as mass storage.

The dongle is on an usb hub, only have one usb port, and overlay is on usb stick.

Google says, this device may ran with option driver [link]http://www.spinics.net/lists/stable/msg17895.html[/link]

echo '2357 9000' > /sys/bus/usb-serial/drivers/option1/new_id

make sure you have kmod-usb-serial-option installed

[   93.190000] option 1-1.4:1.0: GSM modem (1-port) converter detected
[   93.190000] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
[   93.200000] option 1-1.4:1.1: GSM modem (1-port) converter detected
[   93.210000] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
[   93.210000] option 1-1.4:1.3: GSM modem (1-port) converter detected
[   93.220000] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB2
[   93.230000] option 1-1.4:1.4: GSM modem (1-port) converter detected
[   93.240000] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB3

So that looks ok.

Here's my interface ;

config interface 'wan3gdongle'
        option ifname 'ppp0'
        option apn '...'
        option service 'umts'
        option proto '3g'
        option username '...'
        option password '...'
        option device '/dev/ttyUSB0'
        option pincode '...'
        option 'pppd_options' 'noipdefault refuse-chap refuse-mschap refuse-msc
hap-v2 refuse-eap'

Yet when i ifup wan3gdongle, the only thing I get in logread ;

Nov 14 22:12:48 ...... daemon.notice netifd: Interface 'wan3gdongle' is now down

No PAP attempt. No pppd messages whatsoever.

What am I doing wrong ?

(Last edited by jay1 on 15 Nov 2013, 01:43)

Update ;

gcom -d /dev/ttyUSB0 info
##### Wireless WAN Modem Configuration #####
Product text:
====

====
Manufacturer:           IMEI and Serial Number: comgt 01:42:19 -> -- Error Report --
comgt 01:42:19 -> ---->                       ^
comgt 01:42:19 -> Error @776, line 45, String is shorter than second argument. (7)

??

jay1 wrote:
Nov 14 22:12:48 ...... daemon.notice netifd: Interface 'wan3gdongle' is now down

I have the same problem with my Huawei E173s.
I'm using the WBMR-HP-G300H with a custom trunk build (r38780).

ifup just doesn't work for the 3g-wan interface...

Long story short, I should have been using ttyUSB2 instead of ttyUSB0. (thank you jow)

So now I'm getting pppd output in logread, and chat script fails ;

...
local2.info chat[18458]: send (AT+CGDCONT=1,"IP","web.be"^M)
local2.info chat[18458]: timeout set to 30 seconds
local2.info chat[18458]: expect (OK)
local2.info chat[18458]: ^M
local2.info chat[18458]: AT+CGDCONT=1,"IP","web.be"^M^M
local2.info chat[18458]: ERROR
local2.info chat[18458]:  -- failed
local2.info chat[18458]: Failed (ERROR)
daemon.err pppd[18454]: Connect script failed
daemon.info pppd[18454]: Exit.
...

If you increase the "timeout" from 30 to 60 in /etc/chatscripts/3g.chat ?
Just an idea...

Update : I manage to make a connection now, CHAP authentication and I get an IP address, but the modem immediately hangs up, and USB device gets disconnected..
(I have to unplug and replug the dongle for it to be recognized again)

??

daemon.info pppd[11395]: Serial connection established.
daemon.info pppd[11395]: Using interface 3g-ppp0
daemon.notice pppd[11395]: Connect: 3g-ppp0 <--> /dev/ttyUSB2
daemon.info pppd[11395]: CHAP authentication succeeded
daemon.notice pppd[11395]: CHAP authentication succeeded
daemon.warn pppd[11395]: Could not determine remote IP address: defaulting to ...
daemon.notice pppd[11395]: local  IP address ...
daemon.notice pppd[11395]: remote IP address ...
daemon.notice pppd[11395]: primary   DNS address ...
daemon.notice pppd[11395]: secondary DNS address ...
daemon.notice netifd: Interface 'ppp0' is now up
user.notice ifup: Enabling Router Solicitations on ppp0 (3g-ppp0)
daemon.info dnsmasq[9930]: reading /tmp/resolv.conf.auto
daemon.info dnsmasq[9930]: using nameserver ...#53
daemon.info dnsmasq[9930]: using nameserver ...#53
daemon.info dnsmasq[9930]: using local addresses only for domain ...
user.info firewall: removing ppp0 (3g-ppp0) from zone wan
kern.info kernel: [  767.700000] usb 1-1.4: USB disconnect, device number 9
daemon.notice pppd[11395]: Modem hangup
daemon.info pppd[11395]: Connect time 0.1 minutes.
daemon.info pppd[11395]: Sent 530 bytes, received 152 bytes.
daemon.notice pppd[11395]: Connection terminated.
kern.info kernel: [  767.710000] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
kern.info kernel: [  767.720000] option 1-1.4:1.0: device disconnected
kern.info kernel: [  767.720000] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
kern.info kernel: [  767.730000] option 1-1.4:1.1: device disconnected
kern.err kernel: [  767.730000] option: option_instat_callback: error -71
kern.err kernel: [  767.730000] option: option_instat_callback: error -71
kern.info kernel: [  767.770000] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
kern.info kernel: [  767.770000] option 1-1.4:1.3: device disconnected
kern.info kernel: [  767.780000] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
kern.info kernel: [  767.790000] option 1-1.4:1.4: device disconnected
daemon.notice netifd: Interface 'ppp0' has lost the connection
kern.info kernel: [  768.030000] usb 1-1.4: new high-speed USB device number 10 using ehci-platform
user.info firewall: adding ppp0 (3g-ppp0) to zone wan
daemon.info pppd[11395]: Terminating on signal 15
daemon.info pppd[11395]: Exit.
daemon.notice netifd: Interface 'ppp0' is now down
user.notice usb-modeswitch: 1-1.4:1.0: Manufacturer=TP-LINK_Tech_Co.,_Ltd. Product=TP-LINK_3G_HSPA+_Modem_Series. Serial=?

remove "option ifname 'ppp0'" and "option 'pppd_options' 'noipdefault refuse-chap refuse-mschap refuse-msc
hap-v2 refuse-eap'"

neryba wrote:

remove "option ifname 'ppp0'" and "option 'pppd_options' 'noipdefault refuse-chap refuse-mschap refuse-msc
hap-v2 refuse-eap'"

I removed "option ifname 'ppp0'" (the other options were already removed)

Behaviour remains.

The discussion might have continued from here.