summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authortick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-20 06:05:28 +0000
committertick <tick@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-11-20 06:05:28 +0000
commit66ce291b391e092b9af9b764ca5465ce448fb6c8 (patch)
treeaf3c1f3d02cbb5fabfdaa103069def34c388dcad /src/util
parentce08f5ee38bca622527551b28678f4e3a283fca1 (diff)
[gsmd] New feature for power on/off GSM modem (Sean Chiang)
git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@3449 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/util')
-rw-r--r--src/util/shell.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/shell.c b/src/util/shell.c
index 6a07fe6..5c57598 100644
--- a/src/util/shell.c
+++ b/src/util/shell.c
@@ -356,6 +356,8 @@ static int shell_help(void)
"\tH\tHangup call\n"
"\tO\tPower On\n"
"\to\tPower Off\n"
+ "\tM\tModem Power On\n"
+ "\tm\tModem Power Off\n"
"\tr\tRegister to network\n"
"\tR\tRegister to given operator (R=number)\n"
"\tU\tUnregister from netowrk\n"
@@ -675,6 +677,12 @@ int shell_main(struct lgsm_handle *lgsmh, int sync)
printf("Get imsi\n");
lgsm_get_imsi(lgsmh);
pending_responses ++;
+ } else if (!strncmp(buf, "M", 1)) {
+ printf("Modem Power On\n");
+ lgsm_modem_power(lgsmh, 1);
+ } else if (!strncmp(buf, "m", 1)) {
+ printf("Modem Power Off\n");
+ lgsm_modem_power(lgsmh, 0);
} else {
printf("Unknown command `%s'\n", buf);
}
personal git repositories of Harald Welte. Your mileage may vary