[LEDE-DEV] enhanced 3G support
Giuseppe Lippolis
giu.lippolis at gmail.com
Sun Nov 27 05:06:13 PST 2016
Dear All,
I currently add supprt for the dwr-512 device on LEDE.
This device have a 3G modem embedded.
The current available configuration uses the usb-option to establish the 3G
connection over ppp.
Nevertheless the modem offer one cdc-ether interface with better
performance.
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2001 ProdID=7d04 Rev= 3.00
S: Manufacturer=D-Link,Inc
S: Product=D-Link DWM-158
C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us
I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=125us
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
It seems to me that currently this kind of "protocol" is not supported in
LEDE.
In particular I'm unable to found an interface type in the
/etc/config/network to setup this kind of connection.
Currently I'm able to establish a connection setting the interface in
"manual" mode.
To do this I setup an usb interface
config interface 'wan3g'
option ifname 'usb0'
option proto 'dhcp'
then I need to send manually the following command to the /dev/ttyUSB0 to
establish the 3G connection:
AT+CFUN=1
AT+CPIN="<SIM PIN>"
AT+CREG?
> +CREG: 2,1,"1CE3","0BCA3360",6 (6=UTRAN w/HSDPA and HSUPA)
AT+CGDCONT=1,"IP","<APN>",0,0
AT+CGACT=1,1
AT+CGACT?
AT+CGPADDR=1
>> +CGPADDR: 1, "109.42.15.170"
AT+CGPRCO?
>> +CGPRCO: 1, "139.7.30.126", "139.7.30.125", "", ""
AT+CGDATA="M-MBIM",1,1
at this point the IF is UP and working:
usb0 Link encap:Ethernet HWaddr 02:00:FF:AA:AA:AA
inet addr:109.42.15.170 Bcast:109.42.15.171 Mask:255.255.255.252
inet6 addr: fe80::ffff:feaa:aaaa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:314 errors:0 dropped:0 overruns:0 frame:0
TX packets:360 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29855 (29.1 KiB) TX bytes:33129 (32.3 KiB)
Can someoune help me in introduce the handling of this "protocol" in LEDE?
Thanks,
Bye.
More information about the Lede-dev
mailing list