MangohRed sample smsApp unable to read the inbox and messages

I am working on the MangoH red with 76XX. I have compiled the sample smsApp in the wp76-legato/apps/sample/ and uploaded to the red board. I could launch app on the board and execute all options with sms command. When I have executed the app and sent some binary smses to the sim(AT&T IOT sim) I could verify that the smses are received by the sms with the sms count command. I could also view those binary messages cm sms monitor command.

But i am unable to view the inbox and messages with sms inbox and sms next command. I am always getting the error 'inbox empty" where as the sms count is showing the number of messages. When I debugged the code in the ./smsApp/smsClient/main.c::ctrlSMS_GetInbox() -->the following code is giving always null value for MsgListHandler and that’s the reason I am always getting “inbox empty” error.

MsgListHandler = le_sms_CreateRxMsgList();
if (MsgListHandler == NULL)
{
  LE_ERROR("Inbox empty!");
  return LE_OK;
}

I have attached the logs. Kindly help me with this issue.Log_Trace_SMS.txt (107.5 KB) Sms_App_Log.txt (8.7 KB)

I don’t see problem with cm tool:

root@swi-mdm9x28-wp:~# microcom /dev/ttyAT
at+cpms?
+CPMS: “SM”,0,40,“SM”,0,40,“SM”,0,40

OK
at+cmgf=1
OK
at+cmgs=“51322099”

asdfasdf

+CMGS: 252

OK

+CMTI: “SM”,0

at+cpms?
+CPMS: “SM”,1,40,“SM”,1,40,“SM”,1,40

OK

at+cmgr=0
+CMGR: “REC UNREAD”,“+85251322099”,“20/11/13,13:02:47+32”
asdfasdf

OK
root@swi-mdm9x28-wp:~# cm sms list
–[ 0]---------------------------------------------------------------
Type: LE_SMS_TYPE_RX
Sender: +85251322099
Timestamp: 20/11/13,13:02:47+32
Format: LE_SMS_FORMAT_TEXT
Text (8): asdfasdf
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# cm sms count
1
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# app status
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[running] cellNetService
[running] dataConnectionService
[running] fwupdateService
[running] gpioService
[running] modemService
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
root@swi-mdm9x28-wp:~# cm info
Device: WP7605
IMEI: 353532100020465
IMEISV: 6
FSN: 2A917285070404
Firmware Version: SWI9X07Y_02.28.03.05 000000 jenkins 2019/07/08 11:04:16
Bootloader Version: SWI9X07Y_02.28.03.05 000000 jenkins 2019/07/08 11:04:16
MCU Version:
PRI Part Number (PN): 9908705
PRI Revision: 002.006
Carrier PRI Name: SIERRA
Carrier PRI Revision: 001.032_000
SKU: 1104208
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 47 Unexpected: 0

@jyijyi thank you for your response. cm tool is working fine and i have mentioned in the question that i could see the messages with cm sms monitor.

I have issue with smsApp and I am unable to see the messages sms inbox and sms next commands.

I have compiled and uploaded the sample smsApp that came up with wp76-legato/ package

Why don’t you use the code in cm tool if that is working fine for you?

Cm tool used same api le_sms_CreateRxMsgList()