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

Matti Laakso malaakso at elisanet.fi
Thu Dec 8 05:30:47 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 <http://lists.infradead.org/mailman/listinfo/lede-dev>:~# gcom -d /dev/ttyUSB0 -s /etc/gcom/getcardinfo.gcom
> AT+CGMI
> +CGMI: MTK1
>
> OK

Ah, that's the echo from the command messing up things. I was using the
cdc-wdm0 node, which doesn't echo, so I didn't notice this. Will send a
fix later today. However, it still wouldn't work with your modem as the
manufacturer would be "+cgmi:". This is a bug in the modem firmware,
since according to GSM spec AT+CGMI should only return the manufacturer
name and "OK". This from a Huawei:

AT+CGMI
huawei

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.

Possibly, then we should use the AT+CGMM to get the model in a
predictable way (unlike ATI-command):

AT+CGMM
E3276

>
> Bye.



More information about the Lede-dev mailing list