Thank you, that’s perfect.
I rather know all the details and make an informed decision.
Also, who knows if there won’t be any requests for an “expert mode” in the future, so it’s good to have all the traces already.
Some of us are overly curious and like to try lots of things ![]()
This has raised a question for me, which is how gbinder would work on dual SIM devices with two physical SIM cards that support eSIM (or when Jolla enables the eSIM chip on compatible phones such as the Xperia 10 V, allowing users to have the native eSIM chip and a physical SIM card with eSIM support). Will lpac be able to detect both slots? Since gbinder does not have the option that pcsc has to use one or the other in case it detects several. I think that will be a question for the lpac developers ![]()
I asked myself this very same question earlier today. I’m so tempted to but another 9eSIM card that I don’t need just to satisfy my curiosity ![]()
I was reviewing the lpac code, and for QMI drivers they have implemented an environment variable to indicate the SIM slot to use lpac/docs/backends/qmi.md at main · estkme-group/lpac · GitHub and driver: qmi_qrtr: Allow selecting SIM slot using environment variable by z3ntu · Pull Request #97 · estkme-group/lpac · GitHub , but for gbinder there seems to be nothing and the code detects the first available one lpac/driver/apdu/gbinder_hidl.c at main · estkme-group/lpac · GitHub .
I think it would be easy to patch it and put it in an environment variable like it is for QMI, but I don’t have a dual SIM device to test it.
If you can implement it without testing and send me the binary I can actually buy another 9eSIM to populate both slots.
I think I’ve managed to do the manual selection using LPAC_APDU_GBINDER_UIM_SLOT:
- Automatic selection as before (first slot with eSIM found, equals to
LPAC_APDU_GBINDER_UIM_SLOT=-1):
[21:34:17]defaultuser@Xperia10V:~✘☭ LPAC_APDU=gbinder lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot1
opened logical channel id: 1
{"type":"lpa","payload":{"code":0,"message":"success","data":[{"iccid":"8932**********3352","isdpAid":"a000********************1100","profileState":"d
isabled","profileNickname":"Firsty","serviceProviderName":"Firsty","profileName":"Firsty","iconType":"png","icon":"/9j/2wBDAAcFBgYGBQcGBgYICAcJCxIMCwoKCxcQE
Q0SGxccHBoXGhkdISokHR8oIBkaJTIlKCwtLzAvHSM0ODQuNyouLy7/2wBDAQgICAsKCxYMDBYuHhoeLi4uLi4uLi4uLi4uLi4uLi4u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DcS4ZvlHwUVKW7toh3SrnwDk0Zdao7gpACg/cd6KEUK3qF8IFMcZBlP+aCJJOScmuJJOScmurmu
3Jdv//Z","profileClass":"operational"},{"iccid":"8965**********7851","isdpAid":"a0000********************01200","profileState":"enabled","profileNickname
":null,"serviceProviderName":"Eskimo","profileName":"Eskimo","iconType":null,"icon":null,"profileClass":"operational"}]}} - Manual Slot 1
[21:34:24]defaultuser@Xperia10V:~✔☭ LPAC_APDU=gbinder LPAC_APDU_GBINDER_UIM_SLOT=1 lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot1
opened logical channel id: 1
{"type":"lpa","payload":{"code":0,"message":"success","data":[{"iccid":"8932**********3352","isdpAid":"a000********************1100","profileState":"d
isabled","profileNickname":"Firsty","serviceProviderName":"Firsty","profileName":"Firsty","iconType":"png","icon":"/9j/2wBDAAcFBgYGBQcGBgYICAcJCxIMCwoKCxcQE
Q0SGxccHBoXGhkdISokHR8oIBkaJTIlKCwtLzAvHSM0ODQuNyouLy7/2wBDAQgICAsKCxYMDBYuHhoeLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi7/wAARCABAA
EADASIAAhEBAxEB/8QAGgABAAMBAQEAAAAAAAAAAAAABQIEBgADCP/EACwQAAIBAwIFAgUFAAAAAAAAAAECAwAEEQUxEhMhIlFhcUFCgZHBFVJToaL/xAAXAQEBAQEAAAAAAAAAAAAAAAAAAQID/8QAGREBA
QEBAQEAAAAAAAAAAAAAAQARAiFB/9oADAMBAAIRAxEAPwD5trgCTgDJrgCTgb07p9iIFEkgBlP+aobUNqtrpbuA85KD9o3pKK0toh2xLnyRk1E3StcC3i7m+Y/BRU7qdbeFpD1OwHk10ALqAXrlQQvQE7CvO
S3glGHiU+uOtZ1p5Wm55c8ecg+K0kb82FXU44lyPSg7DrYq70woC9uSwG6nf6UXT9he8/McgCyr/dVNXtQhFwgwCcMPXzWUM0sdcmaUdHt+NzOw7U6L71a1S7MKCKM4kYdT4FWbGPlWsS/HGT7mqVxpss0zy
mZe4+NhVxDy1iHlLRouGFpiOrnA9hVTV5uZccsHtjGPrTMEYihSMfKMUY+lyu7O0y5Y5PSiOYRHMIqtHpxzZQ+35o/9Ik/mX7UpbRcmBIiclRvTkRpwI2fdzDeu6brIcfen7hRPauu4Zcj8UdJpUjyO/NXuJ
O1KRry4VVjnhUAn2FORryP26RuXCzKM8KkgfSi49UkeRE5SjiIG9I27Ce1Rtwy4P5oBEMN6iPusgz96dL8nS+ZaC5l5MDygZKjai/1eT+FfvSGojNlN7fms5TpRp2oyqapK7qghXLHA60nPIIoXkPyjNDaRD
zLjmEdsfX61b1mXhhWEHq5yfYUFzWoua0bfUpZpkiEK9x87Crt9JyrWVvjjA9zVbS7QwoZZBiRh0HgVV1i4DyCBT2p1b3pqHs1OfaWkXQQm3c4BOVPr4q3f2XPxJGQsq/3QFKWeplAEuAWA2cb/AFqCZjZ56
MxlZF5sLIwxxLgjxWbWCVpuSEPGDgjxWijuIJRlJVPpnrXphQS3QE7mtJtt528rWBbeFY16ncnyagLVWuDcS4ZvlHwUVKW7toh3SrnwDk0Zdao7gpACg/cd6KEUK3qF8IFMcZBlP+aCJJOScmuJJOScmurmu
3Jdv//Z","profileClass":"operational"},{"iccid":"8965**********7851","isdpAid":"a0000********************01200","profileState":"enabled","profileNickname
":null,"serviceProviderName":"Eskimo","profileName":"Eskimo","iconType":null,"icon":null,"profileClass":"operational"}]}} - Manual Slot 2 (firmware disabled eSIM chip in Xperia 10 V)
[21:34:31]defaultuser@Xperia10V:~✔☭ LPAC_APDU=gbinder LPAC_APDU_GBINDER_UIM_SLOT=2 lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot2
Failed to open APDU logical channel: 38
{"type":"lpa","payload":{"code":-1,"message":"euicc_init","data":""}}
@cypherpunks If you have a dual SIM device, you can try changing the 9eSIM SIM slot and see if the detection changes by manually selecting 1 or 2.
I am temporarily uploading the rpm with the change here (available for 30 days) Lufi - Disroot file uploader . If it works, I will open an issue in the lpac repo to discuss including the change in the code, since that part of the code has a comment indicating that, for the time being, they don’t want to force the user to make the manual selection.
I can confirm that it works as expected:
- Initial situation - slot 1: regular SIM, slot 2 eSIM
LPAC_APDU=gbinder lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot1
Failed to open APDU logical channel: 17
Attempting to connect to android.hardware.radio@1.0::IRadio/slot2
opened logical channel id: 1
{“type”:“lpa”,“payload”:{“code”:0,“message”:“success”,“data”:[{“iccid”: …
LPAC_APDU=gbinder LPAC_APDU_GBINDER_UIM_SLOT=1 lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot1
Failed to open APDU logical channel: 17
{“type”:“lpa”,“payload”:{“code”:-1,“message”:“euicc_init”,“data”:“”}}
LPAC_APDU=gbinder LPAC_APDU_GBINDER_UIM_SLOT=2 lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot2
opened logical channel id: 1
{“type”:“lpa”,“payload”:{“code”:0,“message”:“success”,“data”:[{“iccid”: …
- SIM cards swap - slot 1: eSIM, slot 2 regular SIM
LPAC_APDU=gbinder lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot1
opened logical channel id: 1
{“type”:“lpa”,“payload”:{“code”:0,“message”:“success”,“data”:[{“iccid”: …
LPAC_APDU=gbinder LPAC_APDU_GBINDER_UIM_SLOT=1 lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot1
opened logical channel id: 1
{“type”:“lpa”,“payload”:{“code”:0,“message”:“success”,“data”:[{“iccid”:" …
LPAC_APDU=gbinder LPAC_APDU_GBINDER_UIM_SLOT=2 lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot2
Failed to open APDU logical channel: 38
{“type”:“lpa”,“payload”:{“code”:-1,“message”:“euicc_init”,“data”:“”}}
- SIM cards swap back - slot 1: regular SIM, slot 2 eSIM
(stopped showing profiles entirely)
LPAC_APDU=gbinder lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot1
Failed to open APDU logical channel: 17
Attempting to connect to android.hardware.radio@1.0::IRadio/slot2
Failed to open APDU logical channel: 38
{“type”:“lpa”,“payload”:{“code”:-1,“message”:“euicc_init”,“data”:“”}}
LPAC_APDU=gbinder LPAC_APDU_GBINDER_UIM_SLOT=1 lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot1
Failed to open APDU logical channel: 17
{“type”:“lpa”,“payload”:{“code”:-1,“message”:“euicc_init”,“data”:“”}}
LPAC_APDU=gbinder LPAC_APDU_GBINDER_UIM_SLOT=2 lpac profile list
Attempting to connect to android.hardware.radio@1.0::IRadio/slot2
Failed to open APDU logical channel: 38
{“type”:“lpa”,“payload”:{“code”:-1,“message”:“euicc_init”,“data”:“”}}
A reboot of the phone was required to restore it to state 1.
Thank you!
I’ve added functionality to probe for eSIM (and external readers), but I can’t actively expose it in the UI because I can’t expect users to have the modified lpac version installed.
Now all we have to do is wait for upstream LPAC to adopt the changes?
Or do you see any other option for deploying the binary and libraries with SimPro?
I uploaded the changes to my fork of lpac and generated a new package pointing to it as upstream while they decide whether to implement it (it seems they want to refactor the gbinder driver Allow selecting SIM slot using environment variable in gbinder driver · Issue #413 · estkme-group/lpac · GitHub ). I have updated it in OpenRepos lpac | OpenRepos.net — Community Repository System.
Thank you!
I should now be able to build a settings page that allows selecting the card slot or reader to be used.
I think the following options would make sense:
- Automatic selection (default): a card in a USB reader is preferred, if none is found, the first available internal card is used
- Internal slot 1 (if a card is present)
- Internal slot 2 (if a card is present)
- External USB reader (if a card is present)
Alternatively, the app could load profiles from all eUICC cards and display them together in a single list, with clear indicators showing where each profile comes from. I’m not entirely sure which approach would be better.
Hi guys, just downloaded and installed via storeman. But the app is not present as installed app in the appdrawer. Is this app only CLI now or should be some GUI available?
Great! It might be helpful to know which app you have installed, though. ![]()
That also depends if you installed the CLI or the GUI app.
We provide full coverage here, all for your convenience. ![]()
CLI: lpac
GUI: SimPro
Both on OpenRepos.
Aah, thanks for info, it was lpac ![]()
That would explain things ![]()
If you install SimPro you should see an app icon.
The functionality should be exactly the same, because SimPro is basically just a front end to lpac.
I’ve added support for external card readers and a way to select a specific internal SIM slot.
Thank you! I’ve updated it and it looks great!
One have to reboot the phone to get a newly selected profile applied?
I had to do this every time, so likely, yes. Same with switching physical SIM cards.
Sailfish doesn’t seem to recognise the SIM otherwise.
Maybe the following would work:
devel-su killall ofonod
But I haven’t tried this yet.
I recall reading somewhere (probably TJC) that the standard requires it - which seems really rather quite archaic. But it would explain why at least some modems are not very happy about hotswapping, which in turn could lead to OS vendors choosing to enforce it (if they ever had an option) rather than deal with a cranky modem.