Open bam80 opened 1 month ago
I'd suggest once #70 is merged you can use that as template for MBIM support using libmbim, should be essentially replacing a few calls to libqrtr/libqmi with libmbim but I'd imagine the rest of the code should be pretty similar.
I'd suggest once #70 is merged you can use that as template for MBIM support using libmbim, should be essentially replacing a few calls to libqrtr/libqmi with libmbim but I'd imagine the rest of the code should be pretty similar.
i'm asking an help of a friend because not an expert on C, but the way is this one, so we have everything inside lpac without external wrapper :)
@stich86 as reference implementation exists, I think it could be good opportunity for you to improve your C knowledge :)
So, https://github.com/estkme-group/lpac/pull/70 requires updates to ModemManager, which likely won't make it into operating system packages for quite some time, proving to be fairly inconvenient for some time. Does MBIM need any changes to ModemManager to work?
I am having the problem described here https://community.toradex.com/t/modem-manager-blocking-uart-for-at-commands/22221 with using the at
APDU Backend and can't use it without stopping ModemManager. Wondering if a MBIM approach would be a workaround (if supported by the modem) for this issue and allow keeping ModemManager running all the time?
Also, does MBIM use QMI or only QRTR uses QMI? Trying to understand if a modem supports both MBIM and QRTR which do we prefer to use? If QMI runs over MBIM, do we need https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/merge_requests/376 for MBIM to also work with lpac (also having the drawback I mention above about the change not making it into operating system packages for quite some time)?
Okay, so I did some testing and found the answers to most of my questions. Most of it is documented in https://github.com/stich86/lpac-libmbim-wrapper/issues/4 . Basically, seems as though MBIM requires no updates to ModemManager. Also, you don't need to stop ModemManager to use MBIM with lpac, both can communicate with the modem at the same time.
I made a PR to add support for using QMI directly: https://github.com/estkme-group/lpac/pull/131
It should work on any Qualcomm modem as they all should expose QMI in USB mode. For me it works great on Quectel RM520N.
@robimarko could you make MBIM PR also?
@bam80 Unfortunately, I dont have a use for MBIM currently at work, and no free time otherwise to figure out the libmbim glib-ism required.
Some e-SIM capable modems lack AT commands required for functioning AT APDU backend, or it's functionality is reduced. For these, alternative APDU backends could help, depending on the modems support:
PR exists but needs: https://github.com/estkme-group/lpac/pull/70libqmi
patching131
mbimcli
wrapper exists, needs to be converted to proper MBIM backend: https://github.com/stich86/lpac-libmbim-wrapper@stich86 @z3ntu