From 66ce291b391e092b9af9b764ca5465ce448fb6c8 Mon Sep 17 00:00:00 2001 From: tick Date: Tue, 20 Nov 2007 06:05:28 +0000 Subject: [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 --- src/util/shell.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/util') 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); } -- cgit v1.2.3