Skip to contentSkip to conversation

Telit HE910 modem --- unable be put on line by Connman

DISCUSSION Ming Li Wu 4 participants 7 messages Nov 30, 2012 – Dec 3, 2012

lore
Share & tools
lore

Ming Li Wu

author
#0 lore raw

Hello,

I am working on Telit HE910 modem.

I am using ofono 1.11, and the commit is
6e3a6156b34c52bde253b097976d0ba9dd575879.

For the Telit modem, "AT+CFUN=4" is used to enable the modem. According to "Telit He910 AT Commands Reference Guide", "issuing AT+CFUN=4[,0] actually causes the module to perform either a network deregistration and a SIM deactivation."

After this command is sent out, an unsolicited indication "\r\n#QSS: 0\r\n" is received by of ofono. This means that the sim card cannot be detected by the modem. It turns out that Connman will not put the modem on line.

if "AT+CFUN=5" was used, it worked fine.

My questions are:
1. Why is "AT+CFUN=4" used to enable the modem, instead of "AT+CFUN=1" or "AT+CFUN=5"?
2. If "AT+CFUN=4" is reasonable, are there any solutions to solve this problem?

Thanks!

Mingli

The following is the log when "AT+CFUN=4" was used. ofonod[358]: plugins/udevng.c:setup_telit() modem=/dev/ttyACM0 aux=/dev/ttyACM3 gps=(null) diag=/dev/ttyACM1
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Modem
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Aux ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Diag ofonod[358]: src/modem.c:ofono_modem_register() 0x1152008 ofonod[358]: plugins/telit.c:telit_probe() 0x1152008 ofonod[358]: src/modem.c:emit_modem_added() 0x1152008 ofonod[358]: src/modem.c:call_modemwatches() 0x1152008 added:1 ofonod[358]: plugins/hfp_ag.c:modem_watch() modem: 0x1152008, added: 1 ofonod[358]: plugins/dun_gw.c:modem_watch() modem: 0x1152008, added: 1 ofonod[358]: plugins/smart-messaging.c:modem_watch() modem: 0x1152008,
added: 1
ofonod[358]: plugins/push-notification.c:modem_watch() modem: 0x1152008,
added: 1
ofonod[358]: plugins/telit.c:telit_enable() 0x1152008 ofonod[358]: src/modem.c:get_modem_property() modem 0x1152008 property Modem
ofonod[358]: plugins/telit.c:open_device() Modem /dev/ttyACM0 ofonod[358]: src/modem.c:get_modem_property() modem 0x1152008 property Aux ofonod[358]: plugins/telit.c:open_device() Aux /dev/ttyACM3 ofonod[358]: Aux: > ATE0 +CMEE=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT#QSS=0\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CFUN=4\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: plugins/telit.c:cfun_enable_cb() 0x1152008 ofonod[358]: src/modem.c:modem_change_state() old state: 0, new state: 1 ofonod[358]: plugins/telit.c:telit_pre_sim() 0x1152008 ofonod[358]: Aux: > AT&C0\r
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+GCAP\r
ofonod[358]: Aux: < \r\n+GCAP: +CGSM,+DS,+FCLASS,+MS,+ES\r\n\r\nOK\r\n ofonod[358]: Aux: > AT+CRC=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CLIP=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CDIP=1\r
ofonod[358]: Aux: < \r\nERROR\r\n
ofonod[358]: Aux: > AT+CNAP=1\r
ofonod[358]: Aux: < \r\nERROR\r\n
ofonod[358]: Aux: > AT+COLP=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CSSN=1,1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+VTD?\r
ofonod[358]: Aux: < \r\n0\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CCWA=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: drivers/atmodem/voicecall.c:at_voicecall_initialized()
voicecall_init: registering to notifications
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: Aux: > AT#AUTOATT=0\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT#QSS=2\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CGMI\r
ofonod[358]: Aux: < \r\nTelit\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CLCC\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CGMM\r
ofonod[358]: Aux: < \r\nHE910\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CGMR\r
ofonod[358]: Aux: < \r\n12.00.003\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CGSN\r
ofonod[358]: Aux: < \r\n357164040533674\r\n\r\nOK\r\n ofonod[358]: Aux: < \r\n#QSS: 0\r\n
ofonod[358]: plugins/telit.c:telit_qss_notify() 0x1152008 ofonod[358]: plugins/telit.c:switch_sim_state_status() 0x1152008, SIM
status: 0

Signature · 4 lines
Mingli Wu                       South Pole AB
Phone:  +46 8 56237100          Anderstorpsvägen 16
Mobile: +46 73 7628460          SE - 171 54 Solna
e-mail: mingli(a)southpole.se      www.southpole.se
#1 lore raw

Hi Mingli,

Quoted 4 lines · Ming Li Wu

Hello,

I am working on Telit HE910 modem.

Quoted 8 lines

I am using ofono 1.11, and the commit is 6e3a6156b34c52bde253b097976d0ba9dd575879.

For the Telit modem, "AT+CFUN=4" is used to enable the modem. According to "Telit He910 AT Commands Reference Guide", "issuing AT+CFUN=4[,0] actually causes the module to perform either a network deregistration and a SIM deactivation."

Is rfkill enabled?

cheers,
daniel

author
#2 lore raw

Hi Daniel,

Thanks for your reply.

I am using an arm development board in which ofono is running. rfkill is not installed. should I install it?

Thanks!

Mingli

Quoted 21 lines · Daniel Wagner

Hi Mingli,

Quoted 4 lines · Ming Li Wu

Hello,

I am working on Telit HE910 modem.

Quoted 8 lines

I am using ofono 1.11, and the commit is 6e3a6156b34c52bde253b097976d0ba9dd575879.

For the Telit modem, "AT+CFUN=4" is used to enable the modem. According to "Telit He910 AT Commands Reference Guide", "issuing AT+CFUN=4[,0] actually causes the module to perform either a network deregistration and a SIM deactivation."

Is rfkill enabled?

cheers,
daniel

Signature · 4 lines
Mingli Wu                       South Pole AB
Phone:  +46 8 56237100          Anderstorpsvägen 16
Mobile: +46 73 7628460          SE - 171 54 Solna
e-mail: mingli(a)southpole.se      www.southpole.se
#3 lore raw

Hi Mingli

[please don't top post.]

Quoted 6 lines · Ming Li Wu

Hi Daniel,

Thanks for your reply.

I am using an arm development board in which ofono is running. rfkill is not installed. should I install it?

I wanted to ask you if the the interface is rfkilled (e.b. by ConnMan). The rfkill tool is able to show the current applied settings.

HTH,
daniel

#4 lore raw
In reply to Ming Li Wu

Hi Mingli,

Quoted 102 lines · Ming Li Wu

Hello,

I am working on Telit HE910 modem.

I am using ofono 1.11, and the commit is
6e3a6156b34c52bde253b097976d0ba9dd575879.

For the Telit modem, "AT+CFUN=4" is used to enable the modem. According to "Telit He910 AT Commands Reference Guide", "issuing AT+CFUN=4[,0] actually causes the module to perform either a network deregistration and a SIM deactivation."

After this command is sent out, an unsolicited indication "\r\n#QSS: 0\r\n" is received by of ofono. This means that the sim card cannot be detected by the modem. It turns out that Connman will not put the modem on line.

if "AT+CFUN=5" was used, it worked fine.

My questions are:
1. Why is "AT+CFUN=4" used to enable the modem, instead of "AT+CFUN=1" or "AT+CFUN=5"?
2. If "AT+CFUN=4" is reasonable, are there any solutions to solve this problem?

Thanks!

Mingli

The following is the log when "AT+CFUN=4" was used. ofonod[358]: plugins/udevng.c:setup_telit() modem=/dev/ttyACM0 aux=/dev/ttyACM3 gps=(null) diag=/dev/ttyACM1
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Modem
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Aux
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Diag
ofonod[358]: src/modem.c:ofono_modem_register() 0x1152008 ofonod[358]: plugins/telit.c:telit_probe() 0x1152008 ofonod[358]: src/modem.c:emit_modem_added() 0x1152008 ofonod[358]: src/modem.c:call_modemwatches() 0x1152008 added:1 ofonod[358]: plugins/hfp_ag.c:modem_watch() modem: 0x1152008, added: 1 ofonod[358]: plugins/dun_gw.c:modem_watch() modem: 0x1152008, added: 1 ofonod[358]: plugins/smart-messaging.c:modem_watch() modem: 0x1152008,
added: 1
ofonod[358]: plugins/push-notification.c:modem_watch() modem:
0x1152008, added: 1
ofonod[358]: plugins/telit.c:telit_enable() 0x1152008 ofonod[358]: src/modem.c:get_modem_property() modem 0x1152008 property Modem
ofonod[358]: plugins/telit.c:open_device() Modem /dev/ttyACM0 ofonod[358]: src/modem.c:get_modem_property() modem 0x1152008 property Aux
ofonod[358]: plugins/telit.c:open_device() Aux /dev/ttyACM3 ofonod[358]: Aux: > ATE0 +CMEE=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT#QSS=0\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CFUN=4\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: plugins/telit.c:cfun_enable_cb() 0x1152008 ofonod[358]: src/modem.c:modem_change_state() old state: 0, new state: 1 ofonod[358]: plugins/telit.c:telit_pre_sim() 0x1152008 ofonod[358]: Aux: > AT&C0\r
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+GCAP\r
ofonod[358]: Aux: < \r\n+GCAP: +CGSM,+DS,+FCLASS,+MS,+ES\r\n\r\nOK\r\n ofonod[358]: Aux: > AT+CRC=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CLIP=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CDIP=1\r
ofonod[358]: Aux: < \r\nERROR\r\n
ofonod[358]: Aux: > AT+CNAP=1\r
ofonod[358]: Aux: < \r\nERROR\r\n
ofonod[358]: Aux: > AT+COLP=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CSSN=1,1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+VTD?\r
ofonod[358]: Aux: < \r\n0\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CCWA=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: drivers/atmodem/voicecall.c:at_voicecall_initialized()
voicecall_init: registering to notifications
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: Aux: > AT#AUTOATT=0\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT#QSS=2\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CGMI\r
ofonod[358]: Aux: < \r\nTelit\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CLCC\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CGMM\r
ofonod[358]: Aux: < \r\nHE910\r\n\r\nOK\r\n

Quoted 10 lines

ofonod[358]: Aux: > AT+CGMR\r
ofonod[358]: Aux: < \r\n12.00.003\r\n\r\nOK\r\n ofonod[358]: Aux: > AT+CGSN\r
ofonod[358]: Aux: < \r\n357164040533674\r\n\r\nOK\r\n ofonod[358]: Aux: < \r\n#QSS: 0\r\n
ofonod[358]: plugins/telit.c:telit_qss_notify() 0x1152008 ofonod[358]: plugins/telit.c:switch_sim_state_status() 0x1152008, SIM
status: 0

AT+CFUN=1 is used to set the modem online, i.e. enable RX, TX it also enables the SIM. AT+CFUN = 4 is used to set the modem in flight mode. I cannot see that the modem is set online in your debug output, i.e. a D-Bus call to org.ofono.Modem.SetProperty('Online', true) is made. Without this call you will never get an URC of #QSS with a value greater than 0. SIM detection is enabled after AT+CFUN=1.
I never worked with ConnMan so I don't know what causes ConnMan to set the modem online.

Try to issue
dbus-send --system --type=method_call --print-reply --dest=org.ofono /telit_0 org.ofono.Modem.SetProperty string:'Online' variant:boolean:'true' and see what happens (you may need to change /telit_0 to what dbus-send --system --type=method_call --print-reply --dest=org.ofono / org.ofono.Manager.GetModems
returns)

If this works for you, you will run into the next problem. In /drivers/atmodem/sim.c, at_qss_notify()
case 2: /* PIN unlocked */
has to be changed to
case 3: /* SIM INSERTED and READY */

otherwise AT+CMER= ... for example will return +CME ERROR: 14 (SIM BUSY).

After a PIN has been entered, we have to wait until the modem reports that the SIM is ready.
The above change solves the problem when a PIN is required but we have to do something similar when no PIN is required, otherwise we will run into the same problem.

--
Scanned by MailScanner.

#5 lore raw
Quoted 116 lines · Christopher Vogl

Hi Mingli,

Quoted 102 lines · Ming Li Wu

Hello,

I am working on Telit HE910 modem.

I am using ofono 1.11, and the commit is
6e3a6156b34c52bde253b097976d0ba9dd575879.

For the Telit modem, "AT+CFUN=4" is used to enable the modem. According to "Telit He910 AT Commands Reference Guide", "issuing AT+CFUN=4[,0] actually causes the module to perform either a network deregistration and a SIM deactivation."

After this command is sent out, an unsolicited indication "\r\n#QSS: 0\r\n" is received by of ofono. This means that the sim card cannot be detected by the modem. It turns out that Connman will not put the modem on line.

if "AT+CFUN=5" was used, it worked fine.

My questions are:
1. Why is "AT+CFUN=4" used to enable the modem, instead of "AT+CFUN=1" or "AT+CFUN=5"?
2. If "AT+CFUN=4" is reasonable, are there any solutions to solve this problem?

Thanks!

Mingli

The following is the log when "AT+CFUN=4" was used. ofonod[358]: plugins/udevng.c:setup_telit() modem=/dev/ttyACM0 aux=/dev/ttyACM3 gps=(null) diag=/dev/ttyACM1
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Modem
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Aux
ofonod[358]: src/modem.c:set_modem_property() modem 0x1152008 property Diag
ofonod[358]: src/modem.c:ofono_modem_register() 0x1152008 ofonod[358]: plugins/telit.c:telit_probe() 0x1152008 ofonod[358]: src/modem.c:emit_modem_added() 0x1152008 ofonod[358]: src/modem.c:call_modemwatches() 0x1152008 added:1 ofonod[358]: plugins/hfp_ag.c:modem_watch() modem: 0x1152008, added: 1 ofonod[358]: plugins/dun_gw.c:modem_watch() modem: 0x1152008, added: 1 ofonod[358]: plugins/smart-messaging.c:modem_watch() modem: 0x1152008,
added: 1
ofonod[358]: plugins/push-notification.c:modem_watch() modem:
0x1152008, added: 1
ofonod[358]: plugins/telit.c:telit_enable() 0x1152008 ofonod[358]: src/modem.c:get_modem_property() modem 0x1152008 property Modem
ofonod[358]: plugins/telit.c:open_device() Modem /dev/ttyACM0 ofonod[358]: src/modem.c:get_modem_property() modem 0x1152008 property Aux
ofonod[358]: plugins/telit.c:open_device() Aux /dev/ttyACM3 ofonod[358]: Aux: > ATE0 +CMEE=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT#QSS=0\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CFUN=4\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: plugins/telit.c:cfun_enable_cb() 0x1152008 ofonod[358]: src/modem.c:modem_change_state() old state: 0, new state: 1 ofonod[358]: plugins/telit.c:telit_pre_sim() 0x1152008 ofonod[358]: Aux: > AT&C0\r
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+GCAP\r
ofonod[358]: Aux: < \r\n+GCAP: +CGSM,+DS,+FCLASS,+MS,+ES\r\n\r\nOK\r\n ofonod[358]: Aux: > AT+CRC=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CLIP=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CDIP=1\r
ofonod[358]: Aux: < \r\nERROR\r\n
ofonod[358]: Aux: > AT+CNAP=1\r
ofonod[358]: Aux: < \r\nERROR\r\n
ofonod[358]: Aux: > AT+COLP=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CSSN=1,1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+VTD?\r
ofonod[358]: Aux: < \r\n0\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CCWA=1\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: drivers/atmodem/voicecall.c:at_voicecall_initialized()
voicecall_init: registering to notifications
ofonod[358]: src/sim.c:ofono_sim_add_state_watch() 0x1153d30 ofonod[358]: Aux: > AT#AUTOATT=0\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT#QSS=2\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CGMI\r
ofonod[358]: Aux: < \r\nTelit\r\n\r\nOK\r\n
ofonod[358]: Aux: > AT+CLCC\r
ofonod[358]: Aux: < \r\nOK\r\n
ofonod[358]: Aux: > AT+CGMM\r
ofonod[358]: Aux: < \r\nHE910\r\n\r\nOK\r\n

Quoted 10 lines

ofonod[358]: Aux: > AT+CGMR\r
ofonod[358]: Aux: < \r\n12.00.003\r\n\r\nOK\r\n ofonod[358]: Aux: > AT+CGSN\r
ofonod[358]: Aux: < \r\n357164040533674\r\n\r\nOK\r\n ofonod[358]: Aux: < \r\n#QSS: 0\r\n
ofonod[358]: plugins/telit.c:telit_qss_notify() 0x1152008 ofonod[358]: plugins/telit.c:switch_sim_state_status() 0x1152008, SIM
status: 0

Quoted 8 lines

AT+CFUN=1 is used to set the modem online, i.e. enable RX, TX it also enables the SIM. AT+CFUN = 4 is used to set the modem in flight mode. I cannot see that the modem is set online in your debug output, i.e. a D-Bus call to org.ofono.Modem.SetProperty('Online', true) is made. Without this call you will never get an URC of #QSS with a value greater than 0. SIM detection is enabled after AT+CFUN=1.
I never worked with ConnMan so I don't know what causes ConnMan to set the modem online.

ConnMan can enable the modem, but needs the GPRS interface exported from Ofono in order to be able to do so, something which happens in post_sim for the Telit modem. So this is a catch 22...

The online-modem command works fine for this modem, the dilemma is to get ConnMan to do issue it for us.

So I guess, in summary, the problem is that post_sim will not be called until _after_ telit_online, whereas we really would need it to somehow be called in conjunction with telit_enable so that telit_online can be invoked by ConnMan... hope that makes sense.

Any suggestions?

The Telit HE910 manual says:

Note: the command reports the SIM status change after the <mode> has been set to
2. We suggest to set <mode>=2 and save the value in the user profile, then power off the module. The proper SIM status will be available at the next power on.

So, my thinking is that we need to do something like this:

i) At telit_enable, set CFUN=1 and wait for QSS=2 or QSS=3.
ii) When we get QSS=2 or QSS=3 then we can set SIM_READY state so that post_sim gets called... this should be called after all the IMSI querying, etc. (right?)
iii) Once we're in SIM_READY state, we set CFUN=4... this is the 'end' of the 'telit_enable' phase
iv) While in CFUN=4 state, we ignore QSS: 0
V) This should result in the GPRS interface being exported so that
connman can call 'online' call which will result in the switch to the "real" CFUN=1

What do you think? Reasonable? Will it work?

Best regards,
Jonas Bonn
South Pole Consulting

#6 lore raw
Quoted 12 lines · Jonas Bonn

So, my thinking is that we need to do something like this:

i) At telit_enable, set CFUN=1 and wait for QSS=2 or QSS=3.
ii) When we get QSS=2 or QSS=3 then we can set SIM_READY state so that post_sim gets called... this should be called after all the IMSI querying, etc. (right?)
iii) Once we're in SIM_READY state, we set CFUN=4... this is the 'end' of the 'telit_enable' phase
iv) While in CFUN=4 state, we ignore QSS: 0
V) This should result in the GPRS interface being exported so that
connman can call 'online' call which will result in the switch to the "real" CFUN=1

I gave this a try with the HE910 from Telit and the following works (not in git format, this is just for reference... I will resubmit it later after comment). Just note that it takes about 1 min for the SIM to reach "ready" state after power up.

This also doesn't account for QSS: 0 occurring during 'offline' state... need to check what happens there.

Comments?

plugins/telit.c +0 -0
index fe2ccd6..40d72fe 100644
@@ -339,7 +339,7 @@ static int telit_enable(struct ofono_modem *modem)
         g_at_chat_send(data->chat, "AT#QSS=0", none_prefix, NULL, NULL, 

NULL);

         /* Set phone functionality */
-       g_at_chat_send(data->chat, "AT+CFUN=4", none_prefix,
+       g_at_chat_send(data->chat, "AT+CFUN=1", none_prefix,
                                 cfun_enable_cb, modem, NULL);

         return -EINPROGRESS;

@@ -565,6 +565,16 @@ static void telit_post_sim(struct ofono_modem *modem)

         if (gprs && gc)
                 ofono_gprs_add_context(gprs, gc);
+
+       /*
+        * We need the modem in CFUN!=4 state in order to get to
+        * post_sim... now we can check if we really should be offline
+        * and, if so, set CFUN=4
+        */

+ if (!ofono_modem_get_online(modem)) {
+ g_at_chat_send(data->chat, "AT+CFUN=4", none_prefix,
+ NULL, NULL, NULL);
+ }
}

static void set_online_cb(gboolean ok, GAtResult *result, gpointer
user_data)

/Jonas