Shouldn't there be declared "proto_config_add_string ifname" somewhere at the /lib/netifd/proto/ncm.sh ? and use that as argument somewhere in here:
echo "ncm[$$]" "Connected, starting DHCP" proto_init_update "*" 1 proto_send_update "$interface" And something similar for teardown? Sami Olmari On Sun, Nov 2, 2014 at 9:34 AM, Jamie Lenehan <lene...@twibble.org> wrote: > 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. > > This is the configuration: > > config interface optus > option proto 'ncm' > option ifname 'wwan0' > option device '/dev/ttyUSB0' > option apn 'connect' > option ip4table 'optus' > > The ip4table part didn't work either. I added this to proto_ncm_setup > when setting up the dhcp sub-interface parameters to make it work: > > + json_add_string ip4table optus > > [...] > -- > Jamie Lenehan <lene...@twibble.org> > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel