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@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel