Re: [LEDE-DEV] enhanced 3G support
Dear Bjørn, please join the discussion directly on the github code: https://github.com/lede-project/source/pull/585 Bye. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] enhanced 3G support
"Giuseppe Lippolis" writes: > Dear Bjørn, Matti, > >> I don't think it is relevant for you, though. You should continue your >> initial >> idea, creating a "proto" supporting the AT managed cdc_ether based >> modem. > > I add a pull request here: > > https://github.com/lede-project/source/pull/585 > > Please help me to fix some issue and review it. I'm not a user of the LEDE 3G support, so I'm unable to actually test this. But FWIW (if anything given the above), the overall change looks mostly good to me. The implementation still needs some obvious cleanups before being ready to pull, though, I didn't like the way the "connect" block was moved. Moving it is fine if required, but commenting out the old code and duplicating it creates a lot of cruft which just makes the review difficult. I prefer a clean move showing identical deleted and added lines. And you appear to have lost the first character of each line in the process (json => son, eval => val, etc)? This doesn't make it look like tested Bjørn ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] enhanced 3G support
Dear Bjørn, Matti, > I don't think it is relevant for you, though. You should continue your > initial > idea, creating a "proto" supporting the AT managed cdc_ether based > modem. I add a pull request here: https://github.com/lede-project/source/pull/585 Please help me to fix some issue and review it. Thanks, Bye. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] enhanced 3G support
Hi, > 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. > > 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: Please use the existing ncm protocol for this. It shouldn't matter that the actual module used is cdc_ether instead of cdc_ncm. You just need to add the correct commands to the ncm.json file under a new object with the manufacturer name that is taken from the output of the ATI-command. I can help you with the details if needed. I would assume that the AT-commands with the question mark at the end are not actually needed to bring this online? Best regards, Matti ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] enhanced 3G support
Hi Bjørn, > No, no, the cdc_ether driver is definitely the correct one. NCM or MBIM > won't work unless you can make the device morph into another mode. But > since you know how to manage it in cdc_ether mode, and that is the native > mode, I see no reason to mess with it. You are right. The only working driver (at least in the default status) for the 2 data interface is the cdc_ether. > I don't think it is relevant for you, though. You should continue your > initial > idea, creating a "proto" supporting the AT managed cdc_ether based > modem. The actual wwan script with the simple modification of the 2001-7d04 data file from the (2001-7d03) call the 3g.sh script. But this script establish the connection using the ppp over the ttyUSB and do not use the cdc_ether. So I'm going to update the wwan script to support the cdc_ether. As soon as (I'm a LEDE hobbyist, I cannot work full time) I have some results I will ask you for some advice. Thanks, Bye. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] enhanced 3G support
"Giuseppe Lippolis" writes: > Dear Bjørn, > >> Nice. The "M-MBIM" is a bit confusing, though. This doesn't seem to have >> anything to do with MBIM? >> > I'm just recompiled an image with mbim, ncm support. > > But I don't know if it is the right driver. > If I send the cmd > echo '2001 7d04'> /sys/bus/usb/drivers/cdc_ncm/new_id > > I get: > [ 1984.505162] cdc_ncm 1-1:1.1: no of_node; not parsing pinctrl DT > [ 1984.505366] cdc_ncm 1-1:1.2: no of_node; not parsing pinctrl DT > [ 1984.505480] cdc_ncm 1-1:1.3: no of_node; not parsing pinctrl DT > [ 1984.505592] cdc_ncm 1-1:1.4: no of_node; not parsing pinctrl DT > [ 1984.505704] cdc_ncm 1-1:1.5: no of_node; not parsing pinctrl DT > [ 1984.505816] cdc_ncm 1-1:1.6: no of_node; not parsing pinctrl DT No, no, the cdc_ether driver is definitely the correct one. NCM or MBIM won't work unless you can make the device morph into another mode. But since you know how to manage it in cdc_ether mode, and that is the native mode, I see no reason to mess with it. > >> See e.g the 'directip' or 'ncm' protocols implemented in the comgt package. >> They are very similar, using AT commands to manage a network interface. It >> should be possible to use the same tricks as in >> proto_directip_setup() to map between serial device and network device for >> example. >> > I'm going to recompile also the directip. > > By the way in the package/network/utils/wwan/files/data dir I found the > 2001-7d03 > > I'm currently using this as base file for my 2001-7d04 data file. > I guess that if the 7d03 is supported the 7d04 will be the same (99%). Not necessarily. The firmware base could be the same, but the modem layout depends on which firmware features they decided to make available. I actually have one the D-Link dongles with a similar ID. It's an DWM-156A7 I got from Mediatek as an early example of their MBIM implementation. It is a mode switching dongle which turns into MBIM (of course) + serial: P: Vendor=2001 ProdID=7d01 Rev= 3.00 S: Manufacturer=D-Link,Inc S: Product=D-Link DWM-156 C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=125us I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim 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=500us 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=usb-storage E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I don't think it is relevant for you, though. You should continue your initial idea, creating a "proto" supporting the AT managed cdc_ether based modem. Bjørn ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] enhanced 3G support
Dear Bjørn, > Nice. The "M-MBIM" is a bit confusing, though. This doesn't seem to have > anything to do with MBIM? > I'm just recompiled an image with mbim, ncm support. But I don't know if it is the right driver. If I send the cmd echo '2001 7d04'> /sys/bus/usb/drivers/cdc_ncm/new_id I get: [ 1984.505162] cdc_ncm 1-1:1.1: no of_node; not parsing pinctrl DT [ 1984.505366] cdc_ncm 1-1:1.2: no of_node; not parsing pinctrl DT [ 1984.505480] cdc_ncm 1-1:1.3: no of_node; not parsing pinctrl DT [ 1984.505592] cdc_ncm 1-1:1.4: no of_node; not parsing pinctrl DT [ 1984.505704] cdc_ncm 1-1:1.5: no of_node; not parsing pinctrl DT [ 1984.505816] cdc_ncm 1-1:1.6: no of_node; not parsing pinctrl DT > See e.g the 'directip' or 'ncm' protocols implemented in the comgt package. > They are very similar, using AT commands to manage a network interface. It > should be possible to use the same tricks as in > proto_directip_setup() to map between serial device and network device for > example. > I'm going to recompile also the directip. By the way in the package/network/utils/wwan/files/data dir I found the 2001-7d03 I'm currently using this as base file for my 2001-7d04 data file. I guess that if the 7d03 is supported the 7d04 will be the same (99%). Bye. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] enhanced 3G support
"Giuseppe Lippolis" writes: > 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="" > AT+CREG? > > +CREG: 2,1,"1CE3","0BCA3360",6 (6=UTRAN w/HSDPA and HSUPA) > AT+CGDCONT=1,"IP","",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 Nice. The "M-MBIM" is a bit confusing, though. This doesn't seem to have anything to do with MBIM? > 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:::feaa:/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? See e.g the 'directip' or 'ncm' protocols implemented in the comgt package. They are very similar, using AT commands to manage a network interface. It should be possible to use the same tricks as in proto_directip_setup() to map between serial device and network device for example. Bjørn ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev