Transaction ID Meaning and function

Bjørn Mork bjorn at mork.no
Fri May 8 10:22:17 PDT 2015


Joe <joe.on.list at gmail.com> writes:

> Hi all,
>
> I'd like some more info about Transaction IDs used in mbim-network
> script as an argument of "--no-open" option of mbimcli.
>
> Could you explain me better why there's need specifying a "$TRID"
> transaction id?
> I think the answer likely will envolves some basics of MBIM
> communication protocol...

I'll recommend reading the spec if you are interested in the details.
It's quite readable for a standard :-)

The transaction ID is defined in section 9, "MBIM CONTROL MESSAGES", as

 MBIM control messages must be supported by an MBIM function.  In the
 more detailed descriptions below, the messages include a TransactionId
 field.  This is used to match sent messages with responses.  With this
 mechanism, a host can send multiple MBIM messages to a function
 concurrently without concern for the ordering of responses.  An MBIM
 function must maintain the TransactionId field when returning a
 response.  For notifications, the TransactionId must be set to 0 by the
 function.

and further refined in Table 9‐1, "MBIM_MESSAGE_HEADER":

 Specifies the MBIM message id value.  This value is used to match
 host‐sent messages with function responses.  This value must be unique
 among all outstanding transactions.  For notifications, the
 TransactionId must be set to 0 by the function.

So according to the spec you are really quite free to choose any ID you
want, as long as it's
a) different from 0
b) different from all IDs you are currently waiting for the modem to
   answer 

But I'm sure there are vendors who have managed to screw this up, and
have firmwares assuming some specific transaction ID sequence...  Most
likely whatever Windows uses.  I haven't bothered to check that.

Note that Errata-1 updated the spec without changing the revision number
with, among other changes, a new section 6.5 "MBIM EXTENDED FUNCTIONAL
DESCRIPTOR" defining... well, surprise, surprise, the "MBIM Extended
Functional Descriptor".  Which has a bMaxOutstandingCommandMessages
field described as

 Max number of outstanding Command Messages the device can handle
 simultaneously.  Shall be greater than 0.

So an errata-1 MBIM device is allowed to limit the number of outstanding
messages to 1, in which case the transaction ID becomes completely
irrelevant.  Which is more than a theoretical issue given that for
example my Sierra Wireless EM7345 has this:

      CDC MBIM Extended:
        bcdMBIMExtendedVersion           1.00
        bMaxOutstandingCommandMessages      1
        wMTU                             1428

There are probably pre-errata-1 devices out there with a similar, but
unknown, limit.

> Anyway I've not found any documentation regarding... so if you
> could give me few more details that would be really appreciated.

The docs are here:
http://www.usb.org/developers/docs/devclass_docs/MBIM10Errata1_073013.zip


Bjørn


More information about the libmbim-devel mailing list