summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--test/set-sms-alphabet25
2 files changed, 27 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 6dee4ce3..10ace55b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -825,7 +825,8 @@ test_scripts = test/backtrace \
test/test-serving-cell-info \
test/ims-register \
test/ims-unregister \
- test/list-applications
+ test/list-applications \
+ test/set-sms-alphabet
if TEST
diff --git a/test/set-sms-alphabet b/test/set-sms-alphabet
new file mode 100644
index 00000000..5573891b
--- /dev/null
+++ b/test/set-sms-alphabet
@@ -0,0 +1,25 @@
+#!/usr/bin/python3
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 3:
+ path = sys.argv[1]
+ alphabet = sys.argv[2]
+elif len(sys.argv) == 2:
+ manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+ modems = manager.GetModems()
+ path = modems[0][0]
+ alphabet = sys.argv[1]
+else:
+ print("%s [PATH] turkish|spanish|portuguese|bengali|gujarati" % (sys.argv[0]))
+ sys.exit(1)
+
+print("Setting alphabet for modem %s..." % path)
+sms = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.MessageManager')
+
+sms.SetProperty("Alphabet", dbus.String(alphabet));