diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-09-07 20:15:49 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-09-07 20:16:16 -0500 |
commit | 74d0493230416dbf15e5dfe41de8d53e166ac0c7 (patch) | |
tree | 7e51a9e2065518268be39244328420c0a25c0b4a /plugins/calypso.c | |
parent | 3c0ea95f9a07b83cd28770c3d08c1c6a6f5d8248 (diff) | |
download | ofono-74d0493230416dbf15e5dfe41de8d53e166ac0c7.tar.bz2 |
Add a few more comments to the calypso plugin
Diffstat (limited to 'plugins/calypso.c')
-rw-r--r-- | plugins/calypso.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/plugins/calypso.c b/plugins/calypso.c index 2d9a5e4e..9dd4e1ec 100644 --- a/plugins/calypso.c +++ b/plugins/calypso.c @@ -144,14 +144,22 @@ static void setup_modem(struct ofono_modem *modem) { struct calypso_data *data = ofono_modem_get_data(modem); + /* Generate unsolicited notifications as soon as they're generated */ g_at_chat_send(data->chat, "AT%CUNS=0", NULL, NULL, NULL, NULL); - g_at_chat_send(data->chat, "AT%CSTAT=1", NULL, NULL, NULL, NULL); - g_at_chat_send(data->chat, "@ST=\"-26\"", NULL, NULL, NULL, NULL); - g_at_chat_send(data->chat, "%SLEEP=2", NULL, NULL, NULL, NULL); - g_at_chat_send(data->chat, "+CLVL=255", NULL, NULL, NULL, NULL); + /* CSTAT tells us when SMS & Phonebook are ready to be used */ g_at_chat_register(data->chat, "%CSTAT:", cstat_notify, FALSE, modem, NULL); + g_at_chat_send(data->chat, "AT%CSTAT=1", NULL, NULL, NULL, NULL); + + /* audio side tone: set to minimum */ + g_at_chat_send(data->chat, "AT@ST=\"-26\"", NULL, NULL, NULL, NULL); + + /* Disable deep sleep */ + g_at_chat_send(data->chat, "AT%SLEEP=2", NULL, NULL, NULL, NULL); + + /* Set audio level to maximum */ + g_at_chat_send(data->chat, "AT+CLVL=255", NULL, NULL, NULL, NULL); } static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data) |