[LEDE-DEV] [PATCH] comgt-ncm: Add support for specifying profile index

Giuseppe Lippolis giu.lippolis at gmail.com
Wed Dec 7 11:03:07 PST 2016


> --- a/package/network/utils/comgt/files/getcardinfo.gcom
> +++ b/package/network/utils/comgt/files/getcardinfo.gcom
> @@ -6,7 +6,7 @@ opengt
>   flash 0.1
> 
>  :start
> - send "ATI^m"
> + send "AT+CGMI^m"

> diff --git a/package/network/utils/comgt/files/ncm.json


> diff --git a/package/network/utils/comgt/files/ncm.sh
> b/package/network/utils/comgt/files/ncm.sh
> index 14b6347..df60fe8 100644


> -	manufacturer=`gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk
'/Manufacturer/ { print tolower($2) }'`
> +	manufacturer=`gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk
+'NF { print tolower($1); exit; }'`

Unfortunately this currently doesn't work for me, but can be easily fixed.
Adding this line:
+       echo "Manufacturer: $manufacturer"
this is what I get in the logread:
Tue Dec  6 18:49:52 2016 daemon.notice netifd: Interface 'wan3g' is setting
up now
Tue Dec  6 18:49:52 2016 daemon.notice netifd: wan3g (1082): wwan[1082]
Using proto:wwan device:/dev/ttyUSB0 iface:usb0 desc:
Tue Dec  6 18:49:54 2016 daemon.notice netifd: wan3g (1082): Manufacturer:
at+cgmi
Tue Dec  6 18:49:54 2016 daemon.notice netifd: wan3g (1082): WARNING:
Variable 'at+cgmi' does not exist or is not an array/object
Tue Dec  6 18:49:54 2016 daemon.notice netifd: wan3g (1082): Unsupported
modem
Tue Dec  6 18:49:54 2016 daemon.notice netifd: wan3g (1122): Stopping
network device:
Tue Dec  6 18:49:54 2016 daemon.notice netifd: wan3g (1122): Can't open
device .
Tue Dec  6 18:49:54 2016 daemon.notice netifd: wan3g (1122): Failed to
disconnect
Tue Dec  6 18:49:54 2016 daemon.notice netifd: Interface 'wan3g' is now down

Running the getcardinfo script manually:
root at lede:~# gcom -d /dev/ttyUSB0 -s /etc/gcom/getcardinfo.gcom
AT+CGMI
+CGMI: MTK1

OK

A general comment:
Currently the wwan is dividing only for manufacturer and not per device
model.
I don't know if this is a good strategy. Probably the same manufacturer can
produce different modem models requiring some more specific configuration.
My suggestion is to keep the manufactured identification (as it is now) to
address the generic configuration, but identify also the model in order to
allow a more specific configuration if needed.

Bye.




More information about the Lede-dev mailing list