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

Sami Olmari sami at olmari.fi
Thu Oct 30 17:37:23 EDT 2014


okay:

config interface 'wan'
        option ifname 'wwan0'
        option proto 'ncm'
        option apn 'opengate'
        option device '/dev/cdc-wdm0'

Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446): comgt
21:06:18 -> -- Error Report --
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446): comgt
21:06:18 -> ---->       ^
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446): comgt
21:06:18 -> Error @6, line 1, Can't control /dev/cdc-wdm0, please try
again.
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446): . (1)
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446):
Thu Oct 30 21:06:18 2014 user.notice firewall: Reloading firewall due
to ifup of lan (br-lan)
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446): comgt
21:06:18 -> -- Error Report --
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446): comgt
21:06:18 -> ---->       ^
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446): comgt
21:06:18 -> Error @40, line 2, Can't control /dev/cdc-wdm0, please try
again.
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446): . (1)
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446):
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2446): ncm[2446]
Failed to connect
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2502): Command
failed: Permission denied
Thu Oct 30 21:06:18 2014 daemon.notice netifd: wan (2502): ncm[2502]
Stopping network
Thu Oct 30 21:06:19 2014 daemon.notice netifd: wan (2502): Can't open device .
Thu Oct 30 21:06:19 2014 daemon.notice netifd: wan (2502): ncm[2502]
Failed to disconnect
Thu Oct 30 21:06:19 2014 daemon.notice netifd: Interface 'wan' is now down

and no connection, then:

config interface 'wan'
        option ifname 'wwan0'
        option proto 'ncm'
        option apn 'opengate'
        option device '/dev/ttyUSB1' (this is "correct" port when
using Oskari Rauta's original code, running on main router)

Thu Oct 30 21:09:46 2014 daemon.notice netifd: Interface 'wan' is setting up now
Thu Oct 30 21:09:54 2014 daemon.notice netifd: wan (3253): ncm[3253]
Connected, starting DHCP
Thu Oct 30 21:09:54 2014 daemon.notice netifd: wan (3253): Command
failed: Invalid argument
Thu Oct 30 21:09:54 2014 daemon.notice netifd: wan (3253): Command
failed: Unknown error
Thu Oct 30 21:09:54 2014 daemon.notice netifd: wan (3253): Command
failed: Unknown error

Also behaviour is quite similar to mine previous email, Huawei's light
stays lit, but no wwan0 etc available...

Also, if I then run first "ifconfig wwan0 up" and then "dhclient -i
wwan0" I get IP for wwan0 and internet works! can ping and use SSH to
remote location... So this must be something small typo or so
somewhere deep in scripts?!

 Sami Olmari


On Thu, Oct 30, 2014 at 12:58 PM, Matti Laakso <malaakso at elisanet.fi> wrote:
> Hi Sami,
>
>> 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 believe that device should be /dev/cdc-wdm0 also here, at least when using
> huawei_cdc_ncm. The /dev/ttyUSBx terminals created by the option driver do
> not necessarily support all necessary AT-commands. Also, (at least when
> using proto ncm) you need to specify in addition
>
> option ifname wwan0
>
> Missing this could lead to the errors below.
>
> Matti
>
>
>>
>> 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...
_______________________________________________
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