Skip to content

Commit 98921c7

Browse files
committed
add esim methods to athena
1 parent c990515 commit 98921c7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

system/athena/athenad.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,22 @@ def getNetworks():
560560
return HARDWARE.get_networks()
561561

562562

563+
@dispatcher.add_method
564+
def getEsimProfiles():
565+
return [asdict(p) for p in HARDWARE.get_sim_lpa().list_profiles()]
566+
567+
568+
@dispatcher.add_method
569+
def downloadEsimProfile(lpa_activation_code: str, profile_name: str):
570+
HARDWARE.get_sim_lpa().download_profile(lpa_activation_code, profile_name)
571+
572+
573+
@dispatcher.add_method
574+
def setEsimProfile(iccid: str):
575+
HARDWARE.get_sim_lpa().switch_profile(iccid)
576+
HARDWARE.reboot_modem()
577+
578+
563579
@dispatcher.add_method
564580
def takeSnapshot() -> str | dict[str, str] | None:
565581
from openpilot.system.camerad.snapshot import jpeg_write, snapshot

0 commit comments

Comments
 (0)