how to handle ofono_netreg_status_notify() without valid LAC or cellid or status
Hi,
I've noticed when using a Quectel EC20 (qmimodem) sometimes I see a LAC and a cellid, sometimes I do not.
After looking into it, the problems lies in the ofono plugin api or in the qmimodem driver. I'm unsure where I should fix this issue.
The problem:
The qmimodem notifies ofono about any change of lac, ci, tech or status. But the qmimodem will only include those items which have been changed, not all. But ofono doesn't allow only to update one single item, only all of them at the same time.
void ofono_netreg_status_notify(struct ofono_netreg *netreg, int status,
int lac, int ci, int tech)
If lac or ci is -1 it seems to mean invalid (TODO: create a define or enum)
So how to fix this?
a) when something change, do another call to get all values from the modem
b) extend the ofono api to allow #define NO_CHANGE -2 for lac ci tech, status
c) unlikely: buffer the old values in the driver/qmimodem code
d) ??
Regards,
Alexander
Signature · 6 lines
Alexander Couzens mail: lynxis(a)fe80.eu jabber: lynxis(a)fe80.eu mobile: +4915123277221 gpg: 390D CF78 8BF9 AA50 4F8F F1E2 C29E 9DA6 A0DF 8604
Hi Alexander,
Quoted 19 lines · Alexander Couzens
Hi,
I've noticed when using a Quectel EC20 (qmimodem) sometimes I see a LAC and a cellid, sometimes I do not.
After looking into it, the problems lies in the ofono plugin api or in the qmimodem driver. I'm unsure where I should fix this issue.The problem:
The qmimodem notifies ofono about any change of lac, ci, tech or status. But the qmimodem will only include those items which have been changed, not all. But ofono doesn't allow only to update one single item, only all of them at the same time.
void ofono_netreg_status_notify(struct
ofono_netreg*netreg, int status,
int lac, int ci, int tech)
If lac or ci is-1it seems to mean invalid (TODO: create a define or enum)
Quoted 5 lines
So how to fix this?
a) when something change, do another call to get all values from the modem
That sounds expensive, why do you want to incur extra round-trips?
Quoted 2 lines
b) extend the ofono api to allow
#define NO_CHANGE -2for lac ci tech, status
Eww, please don't ;) FYI, we long time ago decided to base the driver API on what is mandated by 27.007. In the case where things are skipped by 27.007 we improvise. However, in this case all the parameters are updated via +CREG, so I don't really want to introduce new semantics. The driver has to handle this.
Quoted 2 lines
c) unlikely: buffer the old values in the driver/qmimodem code
This sounds best so far. What don't you like about this approach?
Regards,
-Denis