estkme-group / lpac

C-based eUICC LPA
GNU Affero General Public License v3.0
315 stars 75 forks source link

Qualcomm QMI/QRTR backend? #41

Closed z3ntu closed 6 months ago

z3ntu commented 9 months ago

Hi,

In the last week I've got lpac to work on two different Qualcomm-based smartphones running that both have an eSIM built-in. Software stack is upstream Linux kernel plus postmarketOS user space.

So far I've written a (not too horrible) wrapper around lpac that uses the stdio interface and handles/forwards the request using qmicli from libqmi. More meant as a proof of concept, I think building a proper QMI backend for lpac would be a good idea - given there's already an AT and PCSC backend for it.

I haven't looked much into it but generally my idea would be to use (glib-based) libqmi (with my patches https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/merge_requests/376) and then the C API of libqmi to do the different operations.

Are there any major concerns I should be aware of?

Alternatively it might be possible to include .qmi-based description of the messages and generate C bindings with https://github.com/andersson/qmic and probably also using libqrtr from https://github.com/andersson/qrtr but I'm pretty sure this would be quite a bit more work compared to using libqmi.

estkme commented 9 months ago

Thanks for interested in lpac.

If you want create a new APDU interface, mostly work is "how to make it work" , besides this, you may take care of error handling when possible crash cause external resources (e.g. channel fd) leak.

You can find a gbinder interface in recent PR for reference.

Sent from Proton Mail for iOS

2024 年 3 月 1 日星期五 22:29, Luca Weiss @.***(mailto:2024 年 3 月 1 日星期五 22:29, Luca Weiss < 来信:

Hi,

In the last week I've got lpac to work on two different Qualcomm-based smartphones running that both have an eSIM built-in. Software stack is upstream Linux kernel plus postmarketOS user space.

So far I've written a (not too horrible) wrapper around lpac that uses the stdio interface and handles/forwards the request using qmicli from libqmi. More meant as a proof of concept, I think building a proper QMI backend for lpac would be a good idea - given there's already an AT and PCSC backend for it.

I haven't looked much into it but generally my idea would be to use (glib-based) libqmi (with my patches https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/merge_requests/376) and then the C API of libqmi to do the different operations.

Are there any major concerns I should be aware of?

Alternatively it might be possible to include .qmi-based description of the messages and generate C bindings with https://github.com/andersson/qmic and probably also using libqrtr from https://github.com/andersson/qrtr but I'm pretty sure this would be quite a bit more work compared to using libqmi.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

estkme commented 8 months ago

Since no active in this issue for 30 days, I will close it in next 30 days. Feel free to reopen it once have update on it. We are looking forward for your contribution.

z3ntu commented 8 months ago

I'm working on implementing this :)