mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-20 12:28:33 +03:00
WIP SMS
Change-Id: I0d95e62c1e7183a7851d1fe38df0f5133830cb1f
This commit is contained in:
23
sms_test.py
Executable file
23
sms_test.py
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from pySim.sms import *
|
||||
from pprint import pprint as pp
|
||||
from construct import setGlobalPrintPrivateEntries
|
||||
|
||||
|
||||
print(UserDataHeader.fromBytes('027100'))
|
||||
print(UserDataHeader.fromBytes('027100abcdef'))
|
||||
print(UserDataHeader.fromBytes('03710110'))
|
||||
print(UserDataHeader.fromBytes('0571007001ffabcd'))
|
||||
|
||||
setGlobalPrintPrivateEntries(True)
|
||||
pp(AddressField.fromBytes('0480214399'))
|
||||
|
||||
s = SMS_SUBMIT.fromBytes('550d0b911614261771f000f5a78c0b050423f423f40003010201424547494e3a56434152440d0a56455253494f4e3a322e310d0a4e3a4d650d0a54454c3b505245463b43454c4c3b564f4943453a2b36313431363237313137300d0a54454c3b484f4d453b564f4943453a2b36313339353337303437310d0a54454c3b574f524b3b564f4943453a2b36313339363734373031350d0a454e443a')
|
||||
pp(s)
|
||||
print(s.tp_da)
|
||||
pp(b2h(s.toBytes()))
|
||||
|
||||
d = SMS_DELIVER.fromBytes('0408D0E5759A0E7FF6907090307513000824010101BB400101')
|
||||
pp(d)
|
||||
pp(b2h(d.toBytes()))
|
||||
Reference in New Issue
Block a user