Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add MBIM APDU backend #94

Open
2 of 3 tasks
bam80 opened this issue May 12, 2024 · 9 comments
Open
2 of 3 tasks

Feature request: Add MBIM APDU backend #94

bam80 opened this issue May 12, 2024 · 9 comments

Comments

@bam80
Copy link

bam80 commented May 12, 2024

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:

@stich86 @z3ntu

@z3ntu
Copy link
Contributor

z3ntu commented May 15, 2024

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.

@stich86
Copy link

stich86 commented May 15, 2024

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 :)

@bam80
Copy link
Author

bam80 commented May 22, 2024

@stich86 as reference implementation exists, I think it could be good opportunity for you to improve your C knowledge :)

@AndySchroder
Copy link
Contributor

So, #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?

@AndySchroder
Copy link
Contributor

AndySchroder commented May 25, 2024

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)?

@AndySchroder
Copy link
Contributor

Okay, so I did some testing and found the answers to most of my questions. Most of it is documented in stich86/lpac-libmbim-wrapper#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.

@damonto damonto added wontfix This will not be worked on and removed wontfix This will not be worked on labels May 26, 2024
@robimarko
Copy link
Contributor

robimarko commented Jul 3, 2024

I made a PR to add support for using QMI directly: #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.

@bam80
Copy link
Author

bam80 commented Jul 3, 2024

@robimarko could you make MBIM PR also?

@robimarko
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants