On Wed, Dec 2, 2015 at 5:50 PM, Carlo Lobrano <c.lobr...@gmail.com> wrote:
> I am trying to solve a problem on HE910 Telit modem (I also opened bug 93135
> about this), which does not support NULL items for AT+CPMS command, so
> commands like
>
>     AT+CPMS="","ME"
>
> return with error. My idea is basically to provides always MEM1 parameter
> when AT+CPMS is issued, using the current value set on the modem if not
> provided in other ways.
>
> As suggested by Aleksander on bugtrace, the right way to do it would be to
> call +CPMS? "somewhere" and parse the reply.
> I'd like to keep those changes in telit plugin, but I wouldn't re-implement
> all messaging interface for this and it is not clear to me how access to
> "current_sms_mem1_storage" parameter in MMBroadbandModemPrivate. Is it even
> possible?

Well, nothing is impossible, but I wouldn't try to do it that way. The
current_sms_mem1_storage variable is part of the MMBroadbandModem
logic, it doesn't apply out of it, it's only used as part of the logic
doing the storage lock/unlock before R/W.

Instead, what I would do, is to provide in MMBroadbandModemClass a new
async virtual method to "load_current_sms_mem_storage()" (or something
like that). The logic in MMBroadbandModem which checks which are the
supported storages could then have a new step to query which is the
current storage (which we only need to do once), all this in the
MMBroadbandModem class.

This class would then provide an implementation of the virtual method
itself, not in the Telit plugin, as the change shouldn't affect other
implementations and actually kind of makes sense. If we see that the
change affects other modems, we can later just move the implementation
of the virtual method to the Telit plugin and leave the generic
MMBroadbandModem with the virtual method pointers to NULL so that
other plugins don't use that logic.

What do you think?

-- 
Aleksander
https://aleksander.es
_______________________________________________
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Reply via email to