Function error message in response to Commands

Aleksander Morgado aleksander at aleksander.es
Mon Dec 29 08:32:30 PST 2014


Hey,

Modems may reply with Function Error messages to Command requests if
the error is e.g. Not-Opened. This means that the users of
mbim_device_command() should not expect always a Command Done message
as response. In libmbim 1.8.0, anyway, MbimDevice was making sure that
messages passed as response to Command requests were always Command
Done messages, but that's going to change in the next release.

There's a branch in upstream git...
http://cgit.freedesktop.org/libmbim/libmbim/log/?h=aleksander/function-error-in-transaction

... which will take Function Errors in-transaction as replies to the
Command (or Open or Close) messages.

In order to ease the use of mbim_device_command_finish() response
messages, there is also a new mbim_message_response_get_result()
function which can take a message of a specific type (e.g. Command
Done) or instead a Function Error message.

See e.g. this commit in ModemManager (not yet in master) which makes
use of this new API:
http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?h=aleksander/mbim-not-open-3&id=f7f7482b3995228b0c83bb0b03eb231b4a5e8914

I plan to merge these changes for the next libmbim release, this or
next week, so comments appreciated!

-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list