[OpenWrt-Devel] [PATCH] comgt: add ncm proto support

Sami Olmari sami at olmari.fi
Wed Oct 29 16:15:10 EDT 2014


Using John's version:

config interface 'wan'
        option proto 'wwan'
        option apn 'opengate'
#       option device '/dev/cdc-wdm0' (with or without commenting this)

Does absolutely nothing, nothing in logread...

However now when using

config interface 'wan'
        option proto 'ncm'
        option apn 'opengate'
        option device '/dev/ttyUSB1'

I see the Huawei dongle actually connects, as in the light lits up and
stays, indicating connection is made, but no wwan0 nor any other
interface at openwrt, also some erros still on logread:

Wed Oct 29 18:50:34 2014 kern.info kernel: [ 1174.740000] usb 1-1.3:
new high-speed USB device number 5 using ehci-platform
Wed Oct 29 18:50:35 2014 kern.info kernel: [ 1175.450000] usb 1-1.3:
USB disconnect, device number 5
Wed Oct 29 18:50:35 2014 kern.info kernel: [ 1175.780000] usb 1-1.3:
new high-speed USB device number 6 using ehci-platform
Wed Oct 29 18:50:35 2014 kern.info kernel: [ 1175.910000] option
1-1.3:1.0: GSM modem (1-port) converter detected
Wed Oct 29 18:50:35 2014 kern.info kernel: [ 1175.920000] usb 1-1.3:
GSM modem (1-port) converter now attached to ttyUSB0
Wed Oct 29 18:50:35 2014 kern.info kernel: [ 1175.930000] option
1-1.3:1.1: GSM modem (1-port) converter detected
Wed Oct 29 18:50:35 2014 kern.info kernel: [ 1175.960000] usb 1-1.3:
GSM modem (1-port) converter now attached to ttyUSB1
Wed Oct 29 18:50:35 2014 kern.info kernel: [ 1175.970000]
huawei_cdc_ncm 1-1.3:1.2: MAC-Address: 0c:5b:8f:27:9a:64
Wed Oct 29 18:50:35 2014 kern.info kernel: [ 1175.980000]
huawei_cdc_ncm 1-1.3:1.2: cdc-wdm0: USB WDM device
Wed Oct 29 18:50:35 2014 kern.info kernel: [ 1175.990000]
huawei_cdc_ncm 1-1.3:1.2 wwan0: register 'huawei_cdc_ncm' at
usb-ehci-platform-1.3, Huawei CDC NCM device, 0c:5b:8f:27:9a:64

(ifup wan here)

Wed Oct 29 18:51:00 2014 daemon.notice netifd: Interface 'wan' is setting up now

(somewhere close time to the next line the dongles light lits up steady)

Wed Oct 29 18:51:08 2014 daemon.notice netifd: wan (5097): ncm[5097]
Connected, starting DHCP
Wed Oct 29 18:51:08 2014 daemon.notice netifd: wan (5097): Command
failed: Invalid argument
Wed Oct 29 18:51:08 2014 daemon.notice netifd: wan (5097): Command
failed: Unknown error
Wed Oct 29 18:51:08 2014 daemon.notice netifd: wan (5097): Command
failed: Unknown error

No interface appears on openwrt...

Also after this, "ifdown wan" doesn't tear the connection down (light
stays up). So somethign works to the point dongle itself get's
connected, but clearly something doesn't work still... This is on
ar71xx platform with 3.14 kernel...

 Sami Olmari


On Sun, Oct 26, 2014 at 7:07 PM, John Crispin <blogic at openwrt.org> wrote:
> *cough* fixed in r43071
>
> On 26/10/2014 15:06, Matti Laakso wrote:
>> Hi Sami,
>>
>>> Well this is what John told me:
>>>
>>> "try /dev/cdc-wdm0 as a device or simply do
>>>
>>> config interface
>>> option proto wwan
>>> option apn opengate
>>>
>>> the new wwan proto will automagically detect your needed prot and device"
>>>
>>>
>>> I had also tried this and variations, but same resuls:
>>>
>>> config interface 'wan'
>>>         option proto 'ncm'
>>>         option apn 'opengate'
>>>         option device '/dev/ttyUSB1'
>>>
>>> Mon Oct 20 12:46:52 2014 daemon.notice netifd: wan (4251): Timeout
>>> running AT-command
>>> Mon Oct 20 12:46:52 2014 daemon.notice netifd: wan (4251): ncm[4251]
>>> Failed to initialize modem
>>> Mon Oct 20 12:46:52 2014 daemon.notice netifd: wan (4401): Command
>>> failed: Permission denied
>>> Mon Oct 20 12:46:52 2014 daemon.notice netifd: wan (4401): ncm[4401]
>>> Stopping network
>>> Mon Oct 20 12:46:52 2014 daemon.notice netifd: wan (4401): Can't open device .
>>> Mon Oct 20 12:46:52 2014 daemon.notice netifd: wan (4401): ncm[4401]
>>> Failed to disconnect
>>> Mon Oct 20 12:46:52 2014 daemon.notice netifd: Interface 'wan' is now down
>>
>> I think John introduced a typo when committing my patch:
>> in file package/network/utils/comgt/files/runcommand.gcom on line 11
>> there is
>>
>> send "^n"
>>
>> which should be
>>
>> send "^m"
>>
>> Try to change that.
>>
>> Matti
>>
>>>
>>> On Thu, Oct 23, 2014 at 10:20 AM, Bjørn Mork <bjorn at mork.no <https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>> wrote:
>>> >/ Sami Olmari <sami at olmari.fi <https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>> writes:
>>> />/
>>> />>/         option proto 'wwan'
>>> />/
>>> />/ I don't know much about how this is supposed to work (don't have any
>>> />/ Huawei NCM modem), but I do see this in the patch posted earlier in this
>>> />/ thread:
>>> />/
>>> />>/ diff --git a/package/network/utils/comgt/files/3g.usb
>>> />>/ b/package/network/utils/comgt/files/3g.usb
>>> />>/ index fd6837e..ac8326b 100644
>>> />>/ --- a/package/network/utils/comgt/files/3g.usb
>>> />>/ +++ b/package/network/utils/comgt/files/3g.usb
>>> />>/ @@ -8,7 +8,7 @@ find_3g_iface() {
>>> />>/
>>> />>/       local proto
>>> />>/       config_get proto "$cfg" proto
>>> />>/ -     [ "$proto" = 3g ] || return 0
>>> />>/ +     [ "$proto" = 3g ] || [ "$proto" = ncm ] || return 0
>>> />>/
>>> />>/       # bypass state vars here because 00-netstate could clobber .device
>>> />>/       local dev=$(uci_get network "$cfg" device)
>>> />/
>>> />/
>>> />/ which might explain stuff?
>>> />/
>>> />/
>>> />/ Bjørn/
>>
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list