[OpenWrt-Devel] [PATCH 0/2] Add support for QMI-based mobile broadband modems

2014-05-18 Thread Matti Laakso
Many of the 4G/LTE and 3G modems utilize the QMI-protocol to control the
modem. At the moment there is no support for them in OpenWrt. These
patches add support for them in the form of a netifd script and a
control utility. Tested with Huawei E398 and ZTE MF820D (which requires
a delay of ~30 s before responding to QMI commands). I put myself up as
the maintainer, feel free to change this if you desire.

Changes to RFC version:
- Patch split into two
- Improved netifd script
- Minor fixes to uqmi command line help
- Fixed autoconnect in uqmi
- Fixed printing service versions in uqmi
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/2] Add support for QMI-based mobile broadband modems

2014-05-18 Thread Steven Barth

Hi Matti,

thanks for the patches. A few notes though:
I don't particularly like the dhcp-approach. Including the script 
directly looks hackish and also it wouldn't work for DHCP and RA/DHCPv6 
in parallel. Instead I would suggest to bring up the interface without 
any addresses and at the end of the protocol handler launch two 
subprotocols for dhcp and dhcpv6 respecitely. This way we avoid hacking 
around with the dhcp-handler.


To do this add something like this at the end of your setup_interface 
after the proto_send_update call:


json_init
json_add_string name ${INTERFACE}_dhcp
json_add_string ifname @$INTERFACE
json_add_string proto dhcp
json_close_object
ubus call network add_dynamic $(json_dump)

and then the same just with dhcp replaced by dhcpv6.


The second point would be that strictly speaking uci_set_state is 
deprecated. But I can understand why you used it here. We might want to 
think into other solutions at some point, i.e. add a kind of daemon mode 
to uqmi which handles the whole process and also avoids those nasty 
while - sleep loops.



Cheers,

Steven
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel