[OpenWrt-Devel] [PATCH] comgt: add ncm proto support
Sami Olmari
sami at olmari.fi
Sun Nov 16 19:04:23 EST 2014
Matti, would you like to have the Huawei e3276 for debugging this
after I get it back? Yours to keep if you want to :) Mine skills is
kinda not there with this, but need for working NCM is more than
needed for me :)
Sami Olmari
On Sat, Nov 15, 2014 at 6:31 AM, John Crispin <blogic at openwrt.org> wrote:
> no and i will resend your device back to you next week
>
> On 14/11/2014 20:26, Sami Olmari wrote:
>> I'm sorry to bother, but any luck with this? :) I have tried some
>> stuff what Matti has suspected above the quirk is located at, but no
>> good with mine coding skills :/
>>
>> Sami Olmari
>>
>> On Sun, Nov 9, 2014 at 11:49 AM, Matti Laakso <malaakso at elisanet.fi> wrote:
>>> Hi Jamie,
>>>
>>>> On Thu, Oct 30, 2014 at 12:58:40PM +0200, Matti Laakso 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
>>>>
>>>> That wasn't enough to get it to find the device for me for some
>>>> reason. The following change to proto_ncm_setup does make it work:
>>>>
>>>> echo "ncm[$$]" "Connected, starting DHCP"
>>>> - proto_init_update "*" 1
>>>> + proto_init_update "wwan0" 1
>>>> proto_send_update "$interface"
>>>>
>>>> For bringing the interface down the control device can't be found.
>>>> The following change in proto_ncm_teardown makes that work:
>>>>
>>>> json_get_vars device
>>>> +
>>>> + device="/dev/ttyUSB0"
>>>>
>>>> echo "ncm[$$]" "Stopping network"
>>>>
>>>> With the above two changes in place this all works fine. I don't know
>>>> enough about how this is all meant to work to know why this is needed
>>>> or why those configuration values are not making it to where they
>>>> need to be.
>>>>
>>>
>>> I suspect that the call to
>>>
>>> json_load "$(cat /etc/gcom/ncm.json)"
>>>
>>> in ncm.sh causes the interface information to get lost, so that subsequent
>>> json_* calls no longer work correctly. We should somehow "unload" ncm.json
>>> after the necessary AT-commands are read, and then restore normal
>>> interface information. Or can we read ncm.json into a separate namespace or
>>> something? Maybe Felix or Steven could give some advice?
>>>
>>> Matti
>>> _______________________________________________
>>> 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