Skip to contentSkip to conversation

Randomly SMS sent passes or fails

DISCUSSION Viallard Anthony 2 participants 19 messages Mar 5, 2013 – May 21, 2013

lore
Share & tools
lore
#0 lore raw

Hello,

I've a weird issue. I don't know what's going on...

I try to send SMS with a T-mobile SIM card in Germany. The SIM card doesn't require PIN code. I can get the GSM network and I don't use GPRS.

Sometimes, I can send SMS, and another time, It fails. More precisely, when I've got an ofono which can send SMS, I can send all the SMS I want, it works. But if I restart ofono, either it works or not.

I added OFONO_AT_DEBUG=1 in my env, and tried to find some troubles in the logs. I've got some errors but I don't think they are criticals and anyway, they appeared when SMS working too :

-------------------------------

Quoted 1 line

AT+CPINR\r

< \r\nERROR\r\n
Querying remaining pin retries failed

[...]

Provisioning failed
-------------------------------

I can see some differences in time for "AT+CRSM" commands but, they are in the same order. And, after many tests, I don't think the problem is here.

And, when the SMS send fails, the modem tells me :

-------------------------------
CMS ERROR: Unknown error\r\n

-------------------------------

Not very useful....

Also,@same time, I tested in Switzerland with SwissCom and I don't have problem.

1 month ago, it worked well. I don't get it...

I've got a "SIMCOM_SIM5216E" modem. Using the driver g1 or the new simcom driver I developped, with ofono 1.6 or 1.12, it's the same behavior.

Maybe have you already see this kind of things ? My brain is lost.

Regards,
avd.

Signature · 5 lines
.-------------------.-----------------------.-------------------.
| Viallard Anthony  | Syscom Instruments SA | Embedded System   |
| +41 024 455 24 82 | Rue de l'industrie 21 | Software Designer |
| ~~~~~~~~~~~~~~~~~ | 1450 Sainte-Croix     | ~~~~~~~~~~~~~~~~~ |
'-------------------^-----------------------^-------------------^
#1 lore raw

Hi,

Quoted 11 lines · Viallard Anthony

Hello,

I've a weird issue. I don't know what's going on...

I try to send SMS with a T-mobile SIM card in Germany. The SIM card doesn't require PIN code. I can get the GSM network and I don't use GPRS.

Sometimes, I can send SMS, and another time, It fails. More precisely, when I've got an ofono which can send SMS, I can send all the SMS I want, it works. But if I restart ofono, either it works or not.

Quoted 8 lines

I added OFONO_AT_DEBUG=1 in my env, and tried to find some troubles in the logs. I've got some errors but I don't think they are criticals and anyway, they appeared when SMS working too :

-------------------------------

Quoted 1 line

AT+CPINR\r

< \r\nERROR\r\n
Querying remaining pin retries failed

This is not supported by all modems, it is a generic 27.007 command for pin retry counts. However it was added in a fairly late version of the spec, so not many devices support this.

Quoted 5 lines

[...]

Provisioning failed
-------------------------------

This should not affect anything, unless your operator requires SMS to be sent over GPRS.

Quoted 5 lines

I can see some differences in time for "AT+CRSM" commands but, they are in the same order. And, after many tests, I don't think the problem is here.

Nope

Quoted 12 lines

And, when the SMS send fails, the modem tells me :

-------------------------------
CMS ERROR: Unknown error\r\n

-------------------------------

Not very useful....

Also, at same time, I tested in Switzerland with SwissCom and I don't have problem.

Quoted 7 lines

1 month ago, it worked well. I don't get it...

I've got a "SIMCOM_SIM5216E" modem. Using the driver g1 or the new simcom driver I developped, with ofono 1.6 or 1.12, it's the same behavior.

Maybe have you already see this kind of things ? My brain is lost.

Nope, can't really help here; perhaps if you shared a detailed AT log?

Regards,
-Denis

#2 lore raw
Quoted 5 lines · Denis Kenzior

Nope, can't really help here; perhaps if you shared a detailed AT log?

Regards,
-Denis

Hi Denis,

Here the logs when it fails (AT + ofono full debug) :

--------------------------------------------------------------------------
plugins/g1.c:g1_enable() src/modem.c:get_modem_property() modem 0xf4030 property Device src/modem.c:modem_change_state() old state: 0, new state: 1 plugins/g1.c:g1_pre_sim()

Quoted 1 line

ATE0Q0V1\r

< ATE0Q0V1\r\r\nOK\r\n

Quoted 1 line

AT+CFUN=1\r

src/sim.c:ofono_sim_add_state_watch() 0xf1b50
src/sim.c:ofono_sim_add_state_watch() 0xf1b50
src/sim.c:ofono_sim_add_state_watch() 0xf1b50
< \r\nOK\r\n
plugins/g1.c:cfun_set_on_cb()

Quoted 1 line

AT+GCAP\r

< \r\n+GCAP: +CGSM,+DS,+ES\r\n\r\nOK\r\n

Quoted 1 line

AT+CRC=1\r

< \r\nOK\r\n

Quoted 1 line

AT+CLIP=1\r

< \r\nOK\r\n

Quoted 1 line

AT+CDIP=1\r

< \r\nOK\r\n

Quoted 1 line

AT+CNAP=1\r

< \r\nERROR\r\n

Quoted 1 line

AT+COLP=1\r

< \r\nOK\r\n

Quoted 1 line

AT+CSSN=1,1\r

< \r\nOK\r\n

Quoted 1 line

AT+VTD?\r

< \r\n+VTD: 0\r\n\r\nOK\r\n

Quoted 1 line

AT+CCWA=1\r

< \r\nOK\r\n drivers/atmodem/voicecall.c:at_voicecall_initialized() voicecall_init:
registering to notifications src/sim.c:ofono_sim_add_state_watch() 0xf1b50

Quoted 1 line

AT+CRSM=192,12258\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0

Quoted 1 line

AT+CGMI\r

< \r\nSIMCOM INCORPORATED\r\n\r\nOK\r\n

Quoted 1 line

AT+CLCC\r

< \r\nOK\r\n

Quoted 1 line

AT+CGMM\r

< \r\nSIMCOM_SIM5216E\r\n\r\nOK\r\n

Quoted 1 line

AT+CRSM=192,28421\r

< \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n

Quoted 1 line

AT+CGMR\r

< \r\n+CGMR: SIM5216E_V1.5\r\n\r\nOK\r\n

Quoted 1 line

AT+CGSN\r

< \r\n359769031171256\r\n\r\nOK\r\n

Quoted 1 line

AT+CRSM=192,12037\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0

Quoted 1 line

AT+CPIN?\r

< \r\n+CPIN: READY\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_cpin_cb() crsm_pin_cb: READY drivers/atmodem/sim.c:at_pin_retries_query()

Quoted 1 line

AT+CPINR\r

< \r\nERROR\r\n
Querying remaining pin retries failed

Quoted 1 line

AT+CRSM=192,28599\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0 src/voicecall.c:ecc_g2_read_cb() 0

Quoted 1 line

AT+CRSM=192,28599\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0 src/voicecall.c:ecc_g3_read_cb() 0

Quoted 1 line

AT+CRSM=192,28590\r

< \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n

Quoted 1 line

AT+CRSM=192,28589\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0

Quoted 1 line

AT+CRSM=192,28438\r

< \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n

Quoted 1 line

AT+CRSM=192,28472\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0

Quoted 1 line

AT+CIMI\r

< \r\n262015500220406\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_cimi_cb() cimi_cb: 262015500220406 src/modem.c:modem_change_state() old state: 1, new state: 2 plugins/g1.c:g1_post_sim() drivers/atmodem/gprs-context.c:at_gprs_context_probe() src/modem.c:modem_change_state() old state: 2, new state: 3

Quoted 1 line

AT+CSCS?\r

< \r\n+CSCS: "IRA"\r\n\r\nOK\r\n

Quoted 1 line

AT+CUSD=1\r

< \r\nOK\r\n

Quoted 1 line

AT+CREG=?\r

< \r\n+CREG: (0-2)\r\n\r\nOK\r\n

Quoted 1 line

AT+CAOC=2\r

< \r\nOK\r\n

Quoted 1 line

AT+CCWE=1\r

< \r\nERROR\r\n

Quoted 1 line

AT+CSMS=?\r

< \r\n+CSMS: (0-1)\r\n\r\nOK\r\n drivers/atmodem/sms.c:at_csms_query_cb() CSMS query parsed successfully

Quoted 1 line

AT+CSCS=?\r

< \r\n+CSCS: ("IRA","GSM","UCS2")\r\n\r\nOK\r\n

Quoted 1 line

AT+CGDCONT=?\r

< \r\n+CGDCONT: (1-16),"IP",,,(0-2),(0-4)\r\n+CGDCONT:
(1-16),"PPP",,,(0-2),(0-4)\r\n+CGDCONT:
(1-16),"IPV6",,,(0-2),(0-4)\r\n\r\nOK\r\n

Quoted 1 line

AT+CREG=2\r

< \r\nOK\r\n

Quoted 1 line

AT+CSMS=1\r

< \r\n+CSMS: 1,1,1\r\n\r\nOK\r\n

Quoted 1 line

AT+CPBS=?\r

< \r\n+CPBS: ("SM","DC","FD","LD","MC","ME","RC","EN","ON")\r\n\r\nOK\r\n

Quoted 1 line

AT+CGREG=?\r

< \r\n+CGREG: (0-2)\r\n\r\nOK\r\n

Quoted 1 line

AT+CIND=?\r

< \r\n+CIND:
("battchg",(0-5)),("signal",(0-5)),("service",(0-1)),("call",(0-1)),("roam",(0-1)),("smsfull",(0-1)),("GPRS coverage",(0-1)),("callsetup",(0-3))\r\n\r\nOK\r\n
src/sim.c:ofono_sim_add_spn_watch() 0xf1b50

Quoted 1 line

AT+CSMS?\r

< \r\n+CSMS: 1,1,1,1\r\n\r\nOK\r\n

Quoted 1 line

AT+CGREG=2\r

< \r\nOK\r\n

Quoted 1 line

AT+CGAUTO=0\r

< \r\nOK\r\n

Quoted 1 line

AT+CGEREP=2,1\r

< \r\nOK\r\n
src/sim.c:ofono_sim_add_spn_watch() 0xf1b50

Quoted 1 line

AT+CMER=3,0,0,1\r

< \r\nOK\r\n

Quoted 1 line

AT+CREG?\r

< \r\n+CREG: 2,1, 889D, 13EB0D\r\n\r\nOK\r\n src/network.c:ofono_netreg_status_notify() /g1_0 status 1 tech -1

Quoted 1 line

AT+CMGF=?\r

< \r\n+CMGF: (0-1)\r\n\r\nOK\r\n

Quoted 1 line

AT+CPSB=1\r

< \r\nERROR\r\n

Quoted 1 line

AT+COPS=3,2\r

< \r\nOK\r\n

Quoted 1 line

AT+COPS?\r

< \r\n+COPS: 0,2,"26201",2\r\n\r\nOK\r\n drivers/atmodem/network-registration.c:cops_numeric_cb() Cops numeric got mcc: 262, mnc: 01

Quoted 1 line

AT+CIND?\r

< \r\n+CIND: 4,3,1,0,0,0,1,0\r\n\r\nOK\r\n src/network.c:ofono_netreg_strength_notify() strength 60

Quoted 1 line

AT+CIND?\r

< \r\n+CIND: 4,3,1,0,0,0,1,0\r\n\r\nOK\r\n

Quoted 1 line

AT+CPMS=?\r

< \r\n+CPMS:
("ME","MT","SM","SR"),("ME","MT","SM","SR"),("ME","SM")\r\n\r\nOK\r\n

Quoted 1 line

AT+CRSM=192,28480\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0

Quoted 1 line

AT+COPS=3,0\r

< \r\nOK\r\n

Quoted 1 line

AT+COPS?\r

< \r\n+COPS: 0,0,"T-Mobile D",2\r\n\r\nOK\r\n drivers/atmodem/network-registration.c:cops_cb() cops_cb: T-Mobile D, 262 01 2
src/network.c:current_operator_callback() 0xff868, (nil)

Quoted 1 line

AT+CMGF=0\r

< \r\nOK\r\n

Quoted 1 line

AT+CPMS="ME","ME","ME"\r

< \r\n+CPMS: 0,255,0,255,0,255\r\n\r\nOK\r\n

Quoted 1 line

AT+CNMI=?\r

< \r\n+CNMI: (0,1,2),(0,1,2,3),(0,2),(0,1,2),(0,1)\r\n\r\nOK\r\n drivers/atmodem/sms.c:build_cnmi_string() drivers/atmodem/sms.c:construct_ack_pdu()

Quoted 1 line

AT+CNMI=1,2,2,1,0\r

< \r\nOK\r\n src/network.c:__ofono_netreg_add_status_watch() 0xff868 src/sms.c:sms_restore_tx_queue() plugins/push-notification.c:sms_watch() registered plugins/smart-messaging.c:sms_watch() registered

Quoted 1 line

AT+CMGL=4\r

< \r\nOK\r\n
drivers/atmodem/sms.c:at_cmgl_done()

Quoted 1 line

AT+CGSMS=3\r

< \r\nOK\r\n

Quoted 1 line

AT+CRSM=192,28489\r

< \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n

Quoted 1 line

AT+CRSM=192,20256\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0

Quoted 1 line

AT+CRSM=192,28618\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0 Unable to read waiting messages numbers from SIM

Quoted 1 line

AT+CRSM=192,28617\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0 Unable to read mailbox identifies from SIM

Quoted 1 line

AT+CRSM=192,28433\r

< \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n src/message-waiting.c:mw_cphs_mwis_read_cb() No CPHS MWIS on SIM

Quoted 1 line

AT+CRSM=192,28613\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0

Quoted 1 line

AT+CRSM=192,28486\r

< \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0

Quoted 1 line

AT+CRSM=192,28437\r

< \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n

Quoted 1 line

AT+CRSM=192,28435\r

< \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n

Quoted 1 line

AT+CRSM=192,28436\r

< \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n Provisioning failed src/sim.c:ofono_sim_remove_spn_watch() 0xf1b50 src/gprs.c:add_context() Registering new context src/network.c:__ofono_netreg_add_status_watch() 0xff868

Quoted 1 line

AT+CGATT=1\r

< \r\nOK\r\n
src/gprs.c:gprs_attach_callback() /g1_0 error = 0

Quoted 1 line

AT+CGREG?\r

< \r\n+CGREG: 2,1, 889D, 13EB0D\r\n\r\nOK\r\n src/gprs.c:registration_status_cb() /g1_0 error 0 status 1 src/gprs.c:ofono_gprs_status_notify() /g1_0 status 1 src/sms.c:tx_queue_entry_new() pdu_len: 27, tpdu_len: 26 src/sms.c:tx_next() tx_next: 0xfe1a0

Quoted 1 line

AT+CMGS=26\r

< \r\n>

Quoted 1 line

0011000B911487584414F70000A70DCDF7FBFD7EBFDFEFF71B1402<CtrlZ>

< \r\n
< \r\n+CMS ERROR: Unknown error\r\n
src/sms.c:tx_finished() tx_finished 0xfe1a0
src/sms.c:sms_tx_queue_remove_entry() 0xfe1a0
--------------------------------------------------------------------------

I tried to find some information about the operator and SMS/GPRS. I didn't find documentation in my fluent language. I will ask to a german guy. Maybe, there are a AT command to know wether operator supports this ?

Otherwise, I try to find documentation about this amazing SMS over GPRS feature. From what I read, there an AT command to select the behavior. I guess it's the AT+CGSMS command. Ofono set CGSMS to 3 :

AT+CGSMS=3

From the modem documentation, I see :

A numeric parameter which indicates the service or service preference to be used
0 – GPRS(value is not really supported and is internally mapped to 2) 1 – circuit switched(value is not really supported and is internally mapped to 3)
2 – GPRS preferred (use circuit switched if GPRS not available) 3 – circuit switched preferred (use GPRS if circuit switched not available)

Maybe the "circuit switched" has got some troubles on the operator network and as I disabled GPRS, the SMS sending failed most of the time ?

There also the command AT+CSMS :

+CSMS: 1,1,1

The first 1 tells the "SMS@command is compatible with GSM phase 2+.". Perhaps, the thing has an impact about the issue ...

Regards,
avd.

#3 lore raw
Quoted 31 lines · Viallard Anthony
Quoted 5 lines · Denis Kenzior

Nope, can't really help here; perhaps if you shared a detailed AT log?

Regards,
-Denis

I tried to find some information about the operator and SMS/GPRS. I didn't find documentation in my fluent language. I will ask to a german guy. Maybe, there are a AT command to know wether operator supports this ?

Otherwise, I try to find documentation about this amazing SMS over GPRS feature. From what I read, there an AT command to select the behavior. I guess it's the AT+CGSMS command. Ofono set CGSMS to 3 :

AT+CGSMS=3

From the modem documentation, I see :

A numeric parameter which indicates the service or service preference to be used
0 – GPRS(value is not really supported and is internally mapped to 2) 1 – circuit switched(value is not really supported and is internally mapped to 3)
2 – GPRS preferred (use circuit switched if GPRS not available) 3 – circuit switched preferred (use GPRS if circuit switched not available)

Maybe the "circuit switched" has got some troubles on the operator network and as I disabled GPRS, the SMS sending failed most of the time ?

Quoted 6 lines

There also the command AT+CSMS :

+CSMS: 1,1,1

The first 1 tells the "SMS at command is compatible with GSM phase 2+.". Perhaps, the thing has an impact about the issue ...

Any comments ? :(

Before, I tested with 1.6.

And, today, I tried with 1.12.

And, I've got some troubles at modem power up... During the 3 first start, ofono was blocked after sending a command. Here 2 pastes :

------------------------------
[...]
ofonod[13400]: drivers/atmodem/cbs.c:at_cbs_set_topics() ofonod[13400]: Data: > AT+CSCB=0,"4352-4356"\r ofonod[13400]: Data: < \r\nOK\r\n
ofonod[13400]: Data: > AT+CRSM=192,28437\r ofonod[13400]: Data: < \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n ofonod[13400]: Data: > AT+CRSM=192,28436\r
------------------------------

------------------------------
[...]
ofonod[10387]: src/network.c:ofono_netreg_status_notify() /simcom_0 status 1 tech -1
ofonod[10387]: src/cbs.c:cbs_location_changed() 1, -1, -1, -1, (null)(null) ofonod[10387]: Data: > AT+CRSM=192,28480\r
ofonod[10387]: Data: < \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n ofonod[10387]: drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0
ofonod[10387]: Data: > AT+CMGF=?\r
------------------------------

As you can see, It's not always at the same moment. After that, I can't send AT command anymore, the modem seems to be locked.

I try to debug this and found the CMUX and CMUXSRVPORT ports. I can have a DIAG port, so, I try to configure it. I stopped ofono, the modem and sent these commands :

------------------------------
AT+CMUXSRVPORT=0, 0
AT+CMUXSRVPORT=1, 5
AT+CMUXSRVPORT=2, 1
AT+CMUXSRVPORT=3, 1

+CMUX=0
------------------------------

------------------------------
AT+CMUXSRVPORT
--------------
< port >: virtual com port
0 – 3 currently support 4 virtual com ports index from 0 to 3

< service >: valid service
0 – DIAG Service
1 – DATA(MODEM) Service
5 – NMEA Service
------------------------------

And now, each time I start ofono and power up the modem, it works. No lock. Hum, I'm disapointed. I didn't think theses commands could fix the problem. And, no messages in diag or NMEA tty. Hum... And moreover, now all SMS I send are received. No failure. So good news, but, I'm troubled.

After grepping on ofono source, I see some driver plugins do a CMUX set (calipso, phonesim). Maybe, I need to execute a CMUX set ??? It can be important ?

Nevertheless, I don't understand why I have problems with this T-Mobile SIM card and not with Vodafone for example...

Regards,
Anthony.

#4 lore raw

Hi Anthony,

Quoted 2 lines

Any comments ? :(

Nope, the logs looked fine.

Quoted 8 lines

Before, I tested with 1.6.

And, today, I tried with 1.12.

And, I've got some troubles at modem power up... During the 3 first start, ofono was blocked after sending a command. Here 2 pastes :

Quoted 10 lines

------------------------------
[...]
ofonod[13400]: drivers/atmodem/cbs.c:at_cbs_set_topics() ofonod[13400]: Data: > AT+CSCB=0,"4352-4356"\r ofonod[13400]: Data: < \r\nOK\r\n
ofonod[13400]: Data: > AT+CRSM=192,28437\r ofonod[13400]: Data: < \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n ofonod[13400]: Data: > AT+CRSM=192,28436\r
------------------------------

No idea, it just stops responding

Quoted 12 lines

------------------------------
[...]
ofonod[10387]: src/network.c:ofono_netreg_status_notify() /simcom_0 status 1 tech -1
ofonod[10387]: src/cbs.c:cbs_location_changed() 1, -1, -1, -1, (null)(null) ofonod[10387]: Data: > AT+CRSM=192,28480\r
ofonod[10387]: Data: < \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n ofonod[10387]: drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 0
ofonod[10387]: Data: > AT+CMGF=?\r
------------------------------

Ditto

Quoted 28 lines

As you can see, It's not always at the same moment. After that, I can't send AT command anymore, the modem seems to be locked.

I try to debug this and found the CMUX and CMUXSRVPORT ports. I can have a DIAG port, so, I try to configure it. I stopped ofono, the modem and sent these commands :

------------------------------
AT+CMUXSRVPORT=0, 0
AT+CMUXSRVPORT=1, 5
AT+CMUXSRVPORT=2, 1
AT+CMUXSRVPORT=3, 1

+CMUX=0
------------------------------

------------------------------
AT+CMUXSRVPORT
--------------
< port >: virtual com port
0 – 3 currently support 4 virtual com ports index from 0 to 3

< service >: valid service
0 – DIAG Service
1 – DATA(MODEM) Service
5 – NMEA Service
------------------------------

Quoted 9 lines

And now, each time I start ofono and power up the modem, it works. No lock. Hum, I'm disapointed. I didn't think theses commands could fix the problem. And, no messages in diag or NMEA tty. Hum... And moreover, now all SMS I send are received. No failure. So good news, but, I'm troubled.

After grepping on ofono source, I see some driver plugins do a CMUX set (calipso, phonesim). Maybe, I need to execute a CMUX set ??? It can be important ?

CMUX is used on devices with 1 physical serial port. It is used to enter into so-called Multiplexing mode, a binary protocol that runs multiple logical AT ports over a single physical port. Refer to 3GPP 27.010. I do not know whether your hardware supports multiplexing or not. If the modem is detected with multiple serial ports, then likely it does not require messing with CMUX.

Regards,
-Denis

#5 lore raw
Quoted 7 lines · Denis Kenzior

Hi Anthony,

Quoted 2 lines

Any comments ? :(

Nope, the logs looked fine.

I found the issue !

On our embedded platform, there a CPLD which drive the reset, the power and the flight mode of the GSM chips.

And, guess what ? There has been an update of the CPLD sometime ago. And this update enables always the flight mode ... !!!

So that, depending of the board I used, the version for the CPLD was different (not all my boards were updated), sometimes I could send SMS, sometimes not, sometimes the GSM modem was blocked, ...

An update of CPLD code fix the problem !

Sorry for the noise :)

It's time to take a tea and be happy.

Regards,
Anthony Viallard.

#6 lore raw
In reply to Denis Kenzior
Quoted 9 lines · Denis Kenzior
Quoted 5 lines

[...]

Provisioning failed
-------------------------------

This should not affect anything, unless your operator requires SMS to be sent over GPRS.

Hi,

I try to find how i can fix the "provisioning failed" message.

Actually, I have always troubles with T-Mobile. I think I need to fix this provisioning issue. How can I do this ? I tried to see where this provisioning in the source code but I was quickly lost.

Bellow, you could see some troubles I have.

scenario:
* enable modem power ;
* enter pin code ;
* set APN ;
* and tried to enable GPRS.

------------------------------------------------------------------
[...]
ofonod[14111]: Data: > AT+CREG?\r
ofonod[14111]: Data: < \r\n+CREG: 2,1, 889D, 13EB0D\r\n\r\nOK\r\n ofonod[14111]: src/network.c:ofono_netreg_status_notify() /simcom_1 status 1 tech -1
ofonod[14111]: src/cbs.c:cbs_location_changed() 1, -1, -1, -1, (null)(null) ofonod[14111]: src/gprs.c:netreg_status_changed() 1 ofonod[14111]: Data: > AT+CGATT=0\r
ofonod[14111]: Data: < \r\n+CGREG: 0\r\n\r\nOK\r\n ofonod[14111]: Data: < \r\n+CGEV: ME DETACH\r\n
ofonod[14111]: src/gprs.c:ofono_gprs_status_notify() /simcom_1 status 0 ofonod[14111]: src/gprs.c:gprs_attach_callback() /simcom_1 error = 0 ofonod[14111]: src/gprs.c:ofono_gprs_detached_notify() /simcom_1 ofonod[14111]: Data: > AT+COPS=3,2\r
------------------------------------------------------------------

First, there are no answer from modem about "AT+COPS=3,2" command.

And next, the "+CGEV: ME DETACH" disturb me. In the documentation of the SIMCOM module, I see :

"The mobile equipment has forced a Packet Domain detach. This implies that all active contexts have been deactivated. These are not reported separately."

I tried to re-attach with "Active" command but it fails :

------------------------------------------------------------------

# dbus-send --system --type=method_call --print-reply --dest=org.ofono 
/simcom_1/context1 org.ofono.ConnectionContext.SetProperty 
string:"Active" variant:boolean:true
Error org.ofono.Error.NotAttached: GPRS is not attached
------------------------------------------------------------------

In ConnectionManager, I see the "Attached" variable is "False".

Can you help me ?

Regards,
Anthony.

#7 lore raw

Hi Anthony,

Quoted 4 lines

Actually, I have always troubles with T-Mobile. I think I need to fix this provisioning issue. How can I do this ? I tried to see where this provisioning in the source code but I was quickly lost.

plugins/provision.c

Quoted 8 lines

Bellow, you could see some troubles I have.

scenario:
* enable modem power ;
* enter pin code ;
* set APN ;
* and tried to enable GPRS.

Quoted 17 lines

------------------------------------------------------------------
[...]
ofonod[14111]: Data: > AT+CREG?\r
ofonod[14111]: Data: < \r\n+CREG: 2,1, 889D, 13EB0D\r\n\r\nOK\r\n ofonod[14111]: src/network.c:ofono_netreg_status_notify() /simcom_1 status 1 tech -1
ofonod[14111]: src/cbs.c:cbs_location_changed() 1, -1, -1, -1, (null)(null) ofonod[14111]: src/gprs.c:netreg_status_changed() 1 ofonod[14111]: Data: > AT+CGATT=0\r
ofonod[14111]: Data: < \r\n+CGREG: 0\r\n\r\nOK\r\n ofonod[14111]: Data: < \r\n+CGEV: ME DETACH\r\n
ofonod[14111]: src/gprs.c:ofono_gprs_status_notify() /simcom_1 status 0 ofonod[14111]: src/gprs.c:gprs_attach_callback() /simcom_1 error = 0 ofonod[14111]: src/gprs.c:ofono_gprs_detached_notify() /simcom_1 ofonod[14111]: Data: > AT+COPS=3,2\r
------------------------------------------------------------------

Is the modem auto-attaching to GPRS by default? You might want to turn off that behavior if posible.

Quoted 1 line

First, there are no answer from modem about "AT+COPS=3,2" command.

Looks like a firmware bug

Quoted 7 lines

And next, the "+CGEV: ME DETACH" disturb me. In the documentation of the SIMCOM module, I see :

"The mobile equipment has forced a Packet Domain detach. This implies that all active contexts have been deactivated. These are not reported separately."

That is the result of AT+CGATT=0 command.

Quoted 12 lines

I tried to re-attach with "Active" command but it fails :

------------------------------------------------------------------

# dbus-send --system --type=method_call --print-reply --dest=org.ofono
/simcom_1/context1 org.ofono.ConnectionContext.SetProperty
string:"Active" variant:boolean:true
Error org.ofono.Error.NotAttached: GPRS is not attached
------------------------------------------------------------------

In ConnectionManager, I see the "Attached" variable is "False".

Try toggling the ConnectionManager Powered property off and then on. Also a fuller log might be helpful.

Quoted 4 lines

Can you help me ?

Regards,
Anthony.

Regards,
-Denis

#8 lore raw

Hi denis and ofono guys,

Quoted 4 lines · Denis Kenzior

Is the modem auto-attaching to GPRS by default? You might want to turn off that behavior if posible.

I'm still searching why I've issues on SMS with SIM5216 GSM module and T-Mobile.

What did you mean by auto-attaching to GPRS by default ?

To bring GPRS up, I configure it and I call ConnectionContext.SetProperty with Active=1 and then, I've got GPRS.

I dig out this old answer because I searched why in ConnectionManager I've got Bearer: "none". Then, I've found a place (in gprs_initialized() function) where ofono try to get data bearer. By default, ofono uses "AT+CPSB=1" and a callback on "+CPSB:" reply.

There haven't "AT+CPSB" command for SIM5216. I thought I needed to add a quirk like Telit or Huawai. I searched on internet and found an old message from this list ("[PATCH 6/8] gprs: data bearer for telit with PSNT") where you, Denis, answer to Christopher Vogl about the data bearer quirk which made for telit and wonder :

"Do you really need to query this? In theory if we are turning off auto-attach, we should never be in a state where the bearer should be queried."

So, I don't know if I must add a quirk (there AT+CNSMOD command for SIM5216). What does auto-attach mean ?

Regards,
Anthony Viallard.

#9 lore raw

Hi everyone,

I'm still working on this subject. I analyzed ofono logs to see if there are troubles.

Quoted 9 lines · Denis Kenzior
Quoted 4 lines

Is the modem auto-attaching to GPRS by default? You might want to turn off that behavior if posible.

What did you mean by auto-attaching to GPRS by default ?

To bring GPRS up, I configure it and I call ConnectionContext.SetProperty with Active=1 and then, I've got GPRS.

I still don't understand what do you mean by auto-attaching. Where can I see this ? in an AT command return ? viewing AT command sent ?

Quoted 5 lines

I dig out this old answer because I searched why in ConnectionManager I've got Bearer: "none". Then, I've found a place (in gprs_initialized() function) where ofono try to get data bearer. By default, ofono uses "AT+CPSB=1" and a callback on "+CPSB:" reply.

So, I added AT+CNSMOD simcom quirk... I don't know if it mandatory. This bearer is required to do right stuff ?

Otherwise, I see weird things in logs:

* some AT+CRSM requests (READ RECORD) return "FFFFF..." :

------------
ofonod[11230]: Data: < \r\n+CRSM: 144,0,"FFFFFFFFFFFFFFFF"\r\n\r\nOK\r\n
------------

Is it normal ? For example, on EFmsisdn (6F40), the first AT command is a "GET RESPONSE" and next, ofono does a "READ RECORD". And this "READ RECORD" returns FFFFF.... whereas "GET RESPONSE" returns pretty good data" :

------------
ofonod[11230]: Data: > AT+CRSM=192,28480,0,0,255\r
ofonod[11230]: Data: < \r\n+CRSM:
144,0,"6221182050221001E0483026F40A5038001718A01058B036F060B800200788800F10100"\r\n\r\nOK\r\n ofonod[11230]: drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90,
00, 35
ofonod[11230]: Data: > AT+CRSM=178,28480,1,4,30\r
ofonod[11230]: Data: < \r\n+CRSM:
144,0,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"\r\n\r\nOK\r\n ofonod[11230]: drivers/atmodem/sim.c:at_crsm_read_cb() crsm_read_cb: 90,
00, 30
------------

* Some SIM files aren't found. On this T-Mobile SIM card, it's
essentially about "CPHS: ..." files (6F16, 6F13, 6F15), on Service Dialing Numbers (6F49), on Phase identification (6FAE). I guess phase identification file is important, isn't it ?

* on AF20 file (GSM ciphering key Kc), I see this error message :

------------
ofonod[11230]: Requested file structure differs from SIM: 4f20
------------

* some AT commands fails : AT+CCWE (Call meter max event), AT+CPSB
(fixed with AT+CNSMOD quirk), AT+CNAP (Calling name presentation). Must I add quirk for all theses commands ?

King regards,
Viallard Anthony.

#10 lore raw

Hi,

Quoted 10 lines · Viallard Anthony

Hi everyone,

I'm still working on this subject. I analyzed ofono logs to see if there are troubles.

Quoted 5 lines · Denis Kenzior
Quoted 4 lines

Is the modem auto-attaching to GPRS by default? You might want to turn off that behavior if posible.

Quoted 8 lines
Quoted 4 lines

What did you mean by auto-attaching to GPRS by default ?

To bring GPRS up, I configure it and I call ConnectionContext.SetProperty with Active=1 and then, I've got GPRS.

I still don't understand what do you mean by auto-attaching. Where can I see this ? in an AT command return ? viewing AT command sent ?

This is generally a vendor-specific command or some sort of setting in the firmware. What it means is that when the modem is brought up into Online mode, it does not automatically try to attach to the GPRS network, but instead waits to be explicitly told to attach via AT+CGATT=1

Quoted 9 lines
Quoted 5 lines

I dig out this old answer because I searched why in ConnectionManager I've got Bearer: "none". Then, I've found a place (in gprs_initialized() function) where ofono try to get data bearer. By default, ofono uses "AT+CPSB=1" and a callback on "+CPSB:" reply.

So, I added AT+CNSMOD simcom quirk... I don't know if it mandatory. This bearer is required to do right stuff ?

No idea what this is...

Quoted 5 lines

Otherwise, I see weird things in logs:

* some AT+CRSM requests (READ RECORD) return "FFFFF..." :

Quoted 8 lines

------------
ofonod[11230]: Data: < \r\n+CRSM: 144,0,"FFFFFFFFFFFFFFFF"\r\n\r\nOK\r\n
------------

Is it normal ? For example, on EFmsisdn (6F40), the first AT command is a "GET RESPONSE" and next, ofono does a "READ RECORD". And this "READ RECORD" returns FFFFF.... whereas "GET RESPONSE" returns pretty good data" :

Yes, FF just means the record is empty.

Quoted 12 lines

------------
ofonod[11230]: Data: > AT+CRSM=192,28480,0,0,255\r
ofonod[11230]: Data: < \r\n+CRSM:
144,0,"6221182050221001E0483026F40A5038001718A01058B036F060B800200788800F10100"\r\n\r\nOK\r\n

ofonod[11230]: drivers/atmodem/sim.c:at_crsm_info_cb() crsm_info_cb: 90, 00, 35
ofonod[11230]: Data: > AT+CRSM=178,28480,1,4,30\r
ofonod[11230]: Data: < \r\n+CRSM:
144,0,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"\r\n\r\nOK\r\n

Quoted 8 lines

ofonod[11230]: drivers/atmodem/sim.c:at_crsm_read_cb() crsm_read_cb: 90, 00, 30
------------

* Some SIM files aren't found. On this T-Mobile SIM card, it's
essentially about "CPHS: ..." files (6F16, 6F13, 6F15), on Service Dialing Numbers (6F49), on Phase identification (6FAE). I guess phase identification file is important, isn't it ?

If this is a 3G card, then this is normal. And many of the files are optional in the first place.

Quoted 7 lines

* on AF20 file (GSM ciphering key Kc), I see this error message :

------------
ofonod[11230]: Requested file structure differs from SIM: 4f20
------------

That one is indeed strange...

Quoted 4 lines

* some AT commands fails : AT+CCWE (Call meter max event), AT+CPSB
(fixed with AT+CNSMOD quirk), AT+CNAP (Calling name presentation). Must I add quirk for all theses commands ?

Your modem might simply not support these...

Regards,
-Denis

#11 lore raw

Hello,

I think I found a solution about this issue !

If I set the bearer for SMS at "cs-only", it works perfectly.

Therefore, I think there an problem in the firmware of my chip about the "cs-prefered" mode.

I will see this with simcom and update my conclusion with their answer.

Regards,
Anthony Viallard.

#12 lore raw
In reply to Viallard Anthony
Quoted 11 lines · Viallard Anthony
Quoted 9 lines · Denis Kenzior
Quoted 5 lines

[...]

Provisioning failed
-------------------------------

This should not affect anything, unless your operator requires SMS to be sent over GPRS.

Quoted 8 lines

Hi,

I try to find how i can fix the "provisioning failed" message.

Actually, I have always troubles with T-Mobile. I think I need to fix this provisioning issue. How can I do this ? I tried to see where this provisioning in the source code but I was quickly lost.

I think I've found where the issue is. The MCC and MNC can't be retrieve. And the cause is the mnc length can't be retrieve in this callback:

static void sim_ad_read_cb(int ok, int length, int record,
const unsigned char *data, int record_length, void *userdata)

The call returns at the test "if (!ok)". So, mnt_length stay at 0 and next, on IMSI callback, as it doesn't know mnc_length, it doesn't extract MCC and MNC.

I don't know why ofono call the callback with ok=0. In the log, I see the command was successful:

---------------

Mar 28 13:50:05 mr3000 ofonod[6859]: Data: > AT+CRSM=192,28589\r
Mar 28 13:50:05 mr3000 ofonod[6859]: Data: < \r\n+CRSM: 

144,0,""\r\n\r\nOK\r\n
---------------

Maybe a clue on my problem... Why ofono says the command failed ?

Regards,
Anthony.

#13 lore raw

Hi Anthony,

Quoted 9 lines

I don't know why ofono call the callback with ok=0. In the log, I see the command was successful:

---------------

Mar 28 13:50:05 mr3000 ofonod[6859]: Data: > AT+CRSM=192,28589\r
Mar 28 13:50:05 mr3000 ofonod[6859]: Data: < \r\n+CRSM:

144,0,""\r\n\r\nOK\r\n
---------------

The above CRSM response is equivalent to: "File not found".

Regards,
-Denis

#14 lore raw
Quoted 5 lines · Denis Kenzior

Hi Anthony,

Quoted 3 lines

I don't know why ofono call the callback with ok=0. In the log, I see the command was successful:

Quoted 9 lines
Quoted 6 lines

---------------

Mar 28 13:50:05 mr3000 ofonod[6859]: Data: > AT+CRSM=192,28589\r
Mar 28 13:50:05 mr3000 ofonod[6859]: Data: < \r\n+CRSM:

144,0,""\r\n\r\nOK\r\n
---------------

The above CRSM response is equivalent to: "File not found".

Errr, ok :P

How do you known this ? I looked on AT documentation for my modem, on 3GPP TS 27.007 V3.13.0, I saw nothing...

I added some logs and each time ofono does AT+CRSM commands, there a call to "sim_fs_op_error" function ...

I've got two kind of answers on AT+CRSM commands :

ofonod[12357]: Data: < \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n

or

ofonod[6859]: Data: < \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n

It means all the CRSM commands fails ???

Regards,
Anthony.

#15 lore raw

Hi Anthony,

Quoted 5 lines

Errr, ok :P

How do you known this ? I looked on AT documentation for my modem, on 3GPP TS 27.007 V3.13.0, I saw nothing...

You really do not want to know. But if you do, see 3GPP 51.011 or ETSI 102.221 for details.

Quoted 8 lines

I added some logs and each time ofono does AT+CRSM commands, there a call to "sim_fs_op_error" function ...

I've got two kind of answers on AT+CRSM commands :

ofonod[12357]: Data: < \r\n+CRSM: 106,130,""\r\n\r\nOK\r\n

I'm guessing you have a 3G sim. Refer to 'Table 10.14: Status byte coding - wrong parameters' in ETSI 102.221. Literally 106 means '6A', 130 means '82' -> File Not Found.

Quoted 7 lines

or

ofonod[6859]: Data: < \r\n+CRSM: 144,0,""\r\n\r\nOK\r\n

It means all the CRSM commands fails ???

Actually, this is peculiar, the CRSM command is not failing and the result is fine. Just that it is empty. Perhaps you need to quirk the CRSM behavior in this case. Does adding your modem to the list in at_sim_read_info()

                 /* Maximum possible length */
                 len += sprintf(buf + len, ",0,0,255");
                 break;

make it work properly?

Regards,
-Denis

#16 lore raw

Hi Denis and ofono guys,

I hope you enjoy Easter celebration !

Quoted 11 lines

Actually, this is peculiar, the CRSM command is not failing and the result is fine. Just that it is empty. Perhaps you need to quirk the CRSM behavior in this case. Does adding your modem to the list in at_sim_read_info()

/* Maximum possible length */
len += sprintf(buf + len, ",0,0,255");
break;

make it work properly?

I added the quirk as above and Yes ! I've got values now:

-------------------------------------
ofonod[11230]: Data: > AT+CRSM=178,28614,1,4,8\r ofonod[11230]: Data: < \r\n+CRSM: 144,0,"62F2100000FFFE01"\r\n\r\nOK\r\n ofonod[11230]: drivers/atmodem/sim.c:at_crsm_read_cb() crsm_read_cb: 90, 00, 8
-------------------------------------

and SMS work ! Actually, It works if GPRS isn't Active... If I enable GPRS, It fails with message CMS ERROR: 500 (Unknown error):

-------------------------------------
ofonod[11230]: Data: > AT+CMGS=49\r
ofonod[11230]: Data: < \r\n>
ofonod[11230]: Data: > 0011000B911487584414F70000A728C8329BFD0699E5EF368858AED3C76866D84D06DDD3743468DA9C82DEF6B21C74844AA7<CtrlZ> ofonod[11230]: Data: < \r\n
ofonod[11230]: Data: < \r\n+CMS ERROR: 500\r\n
ofonod[11230]: src/sms.c:tx_finished() tx_finished 0xfecf8
ofonod[11230]: src/sms.c:sms_tx_queue_remove_entry() 0xfecf8
-------------------------------------

So, I guess when I enable GPRS, my GSM module wants to send SMS over GPRS... And maybe, I can't because ofono always fails on provisioning:

-------------------------------------
ofonod[7135]: src/gprs-provision.c:__ofono_gprs_provision_get_settings() Calling provisioning plugin 'Provisioning'
ofonod[7135]: plugins/provision.c:provision_get_settings() Provisioning for MCC 262, MNC 01, SPN 'Telekom.de'
ofonod[7135]:
/usr/share/mobile-broadband-provider-info/serviceproviders.xml:1562 Duplicate context detected
ofonod[7135]: Provisioning failed
-------------------------------------

I read the source code which can explain the issue. I guess the problem isn't really a problem. There 2 apn tags in serviceproviders.xml for T-Mobile. This is why I've got "Duplicate context detected" message.

As I understand, the provision plugin wants only 1 apn (allow_duplicates is FALSE) by MCC/MNC. Why ? There are many others operators (according to serviceproviders.xml) who have more than 1 apn. So, for these, the provisioning always fails ?

Maybe I must write an another provision plugin which supports multiples apn entries ? It's tricky to implement this ?

Regards,
Anthony.

#17 lore raw

Hi Anthony,

Quoted 18 lines · Viallard Anthony

Hi Denis and ofono guys,

I hope you enjoy Easter celebration !

Quoted 11 lines

Actually, this is peculiar, the CRSM command is not failing and the result is fine. Just that it is empty. Perhaps you need to quirk the CRSM behavior in this case. Does adding your modem to the list in at_sim_read_info()

/* Maximum possible length */
len += sprintf(buf + len, ",0,0,255");
break;

make it work properly?

I added the quirk as above and Yes ! I've got values now:

Quoted 8 lines

-------------------------------------
ofonod[11230]: Data: > AT+CRSM=178,28614,1,4,8\r ofonod[11230]: Data: < \r\n+CRSM: 144,0,"62F2100000FFFE01"\r\n\r\nOK\r\n ofonod[11230]: drivers/atmodem/sim.c:at_crsm_read_cb() crsm_read_cb: 90, 00, 8
-------------------------------------

and SMS work ! Actually, It works if GPRS isn't Active... If I enable

Good

Quoted 8 lines

GPRS, It fails with message CMS ERROR: 500 (Unknown error):

-------------------------------------
ofonod[11230]: Data: > AT+CMGS=49\r
ofonod[11230]: Data: < \r\n>
ofonod[11230]: Data: > 0011000B911487584414F70000A728C8329BFD0699E5EF368858AED3C76866D84D06DDD3743468DA9C82DEF6B21C74844AA7<CtrlZ>

Quoted 9 lines

ofonod[11230]: Data: < \r\n
ofonod[11230]: Data: < \r\n+CMS ERROR: 500\r\n ofonod[11230]: src/sms.c:tx_finished() tx_finished 0xfecf8 ofonod[11230]: src/sms.c:sms_tx_queue_remove_entry() 0xfecf8
-------------------------------------

So, I guess when I enable GPRS, my GSM module wants to send SMS over GPRS... And maybe, I can't because ofono always fails on provisioning:

I doubt provisioning has anything to do with this. That is only for activating a context.

Quoted 11 lines

-------------------------------------
ofonod[7135]: src/gprs-provision.c:__ofono_gprs_provision_get_settings() Calling provisioning plugin 'Provisioning'
ofonod[7135]: plugins/provision.c:provision_get_settings() Provisioning for MCC 262, MNC 01, SPN 'Telekom.de'
ofonod[7135]:
/usr/share/mobile-broadband-provider-info/serviceproviders.xml:1562 Duplicate context detected
ofonod[7135]: Provisioning failed
-------------------------------------

Quoted 8 lines

I read the source code which can explain the issue. I guess the problem isn't really a problem. There 2 apn tags in serviceproviders.xml for T-Mobile. This is why I've got "Duplicate context detected" message.

As I understand, the provision plugin wants only 1 apn (allow_duplicates is FALSE) by MCC/MNC. Why ? There are many others operators (according to serviceproviders.xml) who have more than 1 apn. So, for these, the provisioning always fails ?

This is automatic provisioning. If there are multiple possibilities that fit, then this requires user input. Obviously oFono does not support user input, so a UI of some sort to finish provisioning is required.

Quoted 3 lines

Maybe I must write an another provision plugin which supports multiples apn entries ? It's tricky to implement this ?

You can certainly do this, however you still need to know which context to activate.

Regards,
-Denis

#18 lore raw

Hi,

Quoted 3 lines · Denis Kenzior

I doubt provisioning has anything to do with this. That is only for activating a context.

Indeed, I tried to remove duplicate entries, provisioning is good but SMS fail with GPRS enabled.

I see stange behavior too. When I try to re-enabled a disabled GPRS context (Active true --> Active false --> Active true), I've got an error:

----------------------------
ofonod[25358]: Modem: > AT+CGDATA="PPP",1\r
ofonod[25358]: Modem: < \r\nCONNECT 115200\r\n ofonod[25358]: drivers/atmodem/gprs-context.c:at_cgdata_cb() ok 1 ofonod[25358]: drivers/atmodem/gprs-context.c:setup_ppp() ofonod[25358]: drivers/atmodem/gprs-context.c:ppp_connect() ofonod[25358]: IP: 10.47.176.26
ofonod[25358]: DNS: 10.74.210.210, 10.74.210.211 ofonod[25358]: src/gprs.c:pri_activate_callback() 0x101a58 ofonod[25358]: plugins/udev.c:udev_event() subsystem net add ofonod[25358]: plugins/udev.c:udev_event() subsystem net finished ofonod[25358]: plugins/udevng.c:check_modem_list() ofonod[25358]:
drivers/atmodem/gprs-context.c:at_gprs_deactivate_primary() cid 1 ofonod[25358]: plugins/udevng.c:remove_device() /sys/devices/virtual/net/ppp0
ofonod[25358]: plugins/udev.c:udev_event() subsystem net remove ofonod[25358]: plugins/udev.c:remove_modem() /devices/virtual/net/ppp0 ofonod[25358]: plugins/udev.c:udev_event() subsystem net finished ofonod[25358]: drivers/atmodem/gprs-context.c:ppp_disconnect() Reason: 6 ofonod[25358]: Modem: < \r\nNO CARRIER\r\n
ofonod[25358]: Data: < \r\nNO CARRIER\r\n
ofonod[25358]: drivers/atmodem/gprs-context.c:at_gprs_activate_primary() cid 1
ofonod[25358]: src/gprs.c:pri_activate_callback() 0x101a58 ofonod[25358]: src/gprs.c:pri_activate_callback() Activating context failed with error: Unknown error type
----------------------------

But it works well on the first activation... I need to investiguate this issue to see what happenning in the source code.

Quoted 5 lines

This is automatic provisioning. If there are multiple possibilities that fit, then this requires user input. Obviously oFono does not support user input, so a UI of some sort to finish provisioning is required.

Yes of course ! Sorry, I've chocolate instead of brain since few days.

Regards,