telit: enable extended sim status notification
authorChristopher Vogl <christopher.vogl@hale.at>
Wed, 29 Aug 2012 15:01:09 +0000 (17:01 +0200)
committerDenis Kenzior <denkenz@gmail.com>
Thu, 30 Aug 2012 14:45:27 +0000 (09:45 -0500)
commit03c4ccfd59cde5e7ffa9fb5e518ebd7df23a77f0
tree42a73d049a7a16ea9911a4db37c0d5e901c3d202
parentf94d112d2c9b8f5ea24f80e3dba8dd75eb8fa7c4
telit: enable extended sim status notification

Use AT#QSS=2 instead of AT#QSS=1 to get an URC when the SIM is not only
inserted but also when PIN is unlocked and when SMS + phonebook are
ready to be used.

Disable sim state notification in telit_enable() so that we sure get a
notification when we enable it later again. This way we don't have to
query the state the first time. Without this the Telit modem does not
always send an URC when AT#QSS=2 is sent.

Remove sim_inserted_source and sim_inserted_timeout_cb which are not
needed anymore as a consequence.
By the way the 1 second timeout was an ugly hack.

Don't query current SIM status in cfun_enable_cb() as the SIM is
disabled due to prior AT+CFUN=4.

Register '#QSS:' before enabling sim state notifications.

Remove telit_qss_cb() which was used as a callback for querying the
current SIM status.

Move sms atom creation into switch_sim_state_status() and add creation
of phonebook atom. These are created when QSS: 3 is received.
plugins/telit.c