On 02/14/2017 04:47 PM, Denis Kenzior wrote:
> usb 1-1: New USB device found, idVendor=12d1, idProduct=15b7
> Using ATI, modem present itself like that:
> Manufacturer: huawei
> Model: E3372H
> Revision: 21.315.01.00.314
> IMEI: XXXX
> +GCAP: +CGSM,+DS,+ES
> My problem now is how to know if I should send AT+CGDATA="PPP",1 or
> ATD*99***1# when activating context in at modem driver. I see in this
> driver and others that a VENDOR information can be sent from plugin but
> I imagine that other Huawei devices support AT+CGDATA="PPP",1.
> Do you have any idea of what I should do to support this modem without
> disturbing other devices?
You could build a database of various quirks that are required for
each model. The index into the database could be the product id if it
is unique, or the model / revision information from 'ATI"
My problem with
this idea is that I only have one huawei modem. I have
no idea what other huawei modems support activation using
AT+CGDATA="PPP",1, what are their product ids, .... I could say that all
models except E3372H use this AT command and be quite safe, except if it
depends on firmware version.
Another idea would be to have the gprs context driver try to parse the
AT+CGDATA=? response. If 'PPP' L2P is not found, then fallback to
I can do that in huawei plugin or in gprs-context atmodem driver.
If I do that in huawei plugin, I need a way to give information to
gprs-context driver. Maybe using ofono_modem_set_boolean with a property
If I do that in gprs-context atmodem driver, this is one step more at
each context activation but no need to modify all plugins if other
modems have same behavior.
What do you think is the best way?