PLSx3 MQTT looses conection after voice call | Telit Cinterion IoT Developer Community
September 14, 2023 - 8:39pm, 156 views
Hi, help is needed
I have built an application based on the MQTT example included in the SDK, and all has been stable for some weeks.
However, after experimenting with some FTP downloads and some AT+CGDCONT trial and error, the MQTT setup looses connection after a voice call has been received. As long as there are no incoming calls, everything works fine
A completely new modem right out of the box still works fine. I check that AT+CGDCONT settings are identical between new and old modems, but i find no differences and nothing helps.
Resetting the modem with AT&F, ATZ makes no difference.
I try to download new firmware, but the modem will not update. See screendump below.
Any idea of how I can reset or fix the modem??
Thanks Tore
OK
ati
Cinterion
PLS83-W
REVISION 02.000
OK
\SDK\tools>python firmware.py update ..\firmware\pls\pls83_w.usf
Updating Firmware on USB port COM7
********************************************
Ver-Num : vD_20210419_A
Ver-Inf : MODIFY -- del /r/n in in l2_fun.c .
DEBUG_LOG_LV : 0
TX_DELY_1_BEFORE_MS : 20(ms)
TX_DELY_2_AFTER_MS : 8(ms)
********************************************
--------------------------------------------
This exe is for UsuGUI / CmdLine !!!
--------------------------------------------
Initializing firmware update...
--------------------------------------------
1. Rdy to OPEN fw file . [@UpdateFirmware()]
--------------------------------------------
--------------------------------------------
2. Rdy to CNT block sum in fw file . [@UpdateFirmware()]
block sum = 7579 . [@UpdateFirmware()]
--------------------------------------------
--------------------------------------------
3. Rdy to OPEN COMEx : [@UpdateFirmware()]
pParams->fNoFirmware = 0
pParams->fUsb = 1
pParams->strComPort = COM7
pParams->iBaudrate = 921600
pParams->nOrgFlowControl = 2
--------------------------------------------
--------------------------------------------
4. Rdy to Prepare the module . [@UpdateFirmware()]
Try to Sync Bdr to Module . [@PrepareModule()]
Try baudrate 115200
SND REQ : AT [@l2_ATCommandRetries()]
RCV RSP [OK] : OK [@l2_ReadResponse()]
SND REQ : ATE1V1 [@l2_ATCommandRetries()]
RCV RSP [OK] : OK [@l2_ReadResponse()]
Try baudrate -- OK !!
OK : GET-dev-bdr + SET-dev-bdr .
--------------------------------------------
--------------------------------------------
5. Rdy to SND download-cmd-REQ : AT^SFDL . [@UpdateFirmware()]
SND REQ : AT^SFDL [@l2_ATCommandRetries()]
RCV RSP [OK] : +CME ERROR [@l2_ReadResponse()]
ERROR: Cannot send update command!
Rdy to Close COM port !
Close COM (0x234) OK! [pDlg=0x6ffbb8]
Close COM port res = 1 (0 : NG . 1 : OK) .
Rdy to Close FirmwareFile !
Rdy to Close COM port !
Close COM port res = 0 (0 : NG . 1 : OK) .
Module update failed
Hello,
Is it that with one module you have this issue and with the other identical one not?
Please also check AT^SMONI, AT+CGDCONT, AT+CGREG outputs before and during the voice call.
You can also enable some additional URCs with AT+CGEREP=2, AT^SIND="psinfo",1, AT+CREG=2, AT+CGREG=2, AT+CEREG=2.
Regards,
Bartłomiej
I have this issue with three modems where I have downloaded files using FTP. Befor I did this they were all working fine.
On new modems I do not have this issue.
Latest investigation show that MQTT disconnects on the ATH command on the affected modems, but not on new modems. I have changed to AT^CHUP command, and now all modems work as expected.
However, I would still like to know how I can completely reset the modems/load new firmware, see above screendump.
Thanks
Tore
As already mentioned, I got the problem after downloading files using FTP.
My goal was to make some form of remote update, as these modems have no OTAP function like the old Java modems. But so far, no success.
Are there any plans to issue a working example of how to remote update user applications on ThreadX modems? I really need help here.
Best Regards
Tore
Hello,
Could you compare the firmware versions of these working and non-working modules (ATI1 command output)?
As for the firmware update - on which interface did you do this? You should have used the modem interface or ASC0.
We probably do not currently have the complete remote update example. Do you have any external microprocessor that controls the module or is it only controlled by the embedded application?
BR,
Bartłomiej
Firmware is identical in all my modules. They were all purchased late this summer.
ati
Cinterion
PLS83-W
REVISION 02.000
I have tried updating firmware from python app in the SDK tool folder, using gwinswupcmd_pls83 -p:COM9 -b:115200 -f:pls83_w.usf where COM9 is the modem port and also the gWinSwup program downloaded from extranet on all available ports, including ASC0. With and without the "No Firmware in Module" tick-off.
I have no external microprosessor on this project. My idea was to download the .bin file to the modem, and then flash it as described in the update_app example found in the SDK.
Downloading the file to a:/ using FTP works OK (to "file:///a:/data/" does not work)
Edit 16.09.23 I actually got a working example now:
#include "gina_update_dam.h"
#define FS_BUFFER_FLASH_FILE 2048
#define FS_OEM_APP_FILE "/helloworld.bin"
static gstatus cellular_write_flashfile()
{
qapi_FS_Status_t ret;
char buffer[FS_BUFFER_FLASH_FILE];
uint32 bytes_read = 0;
static guint32 dataTransferEndFlag;
dataTransferEndFlag = 0;
GINA_UWLOG_INFO("Open File");
ret = qapi_FS_Open(FS_OEM_APP_FILE, QAPI_FS_O_RDWR_E, &Fd_ptr);
if (ret != QAPI_OK)
{
GINA_UWLOG_ERROR("Opening .bin failed! ERROR: %ld", ret);
return GINA_ERROR;
}
while (dataTransferEndFlag==0){
GINA_UWLOG_INFO("ReadOEM_AppFile:");
memset(buffer, 0, sizeof buffer);
ret = qapi_FS_Read(Fd_ptr, buffer, FS_BUFFER_FLASH_FILE - 1, &bytes_read);
if (ret != QAPI_OK)
{
qapi_FS_Close(Fd_ptr);
GINA_UWLOG_ERROR("Reading OEM_App file failed! ERROR: %ld", ret);
return GINA_ERROR;
}
if (bytes_read < FS_BUFFER_FLASH_FILE-1){
dataTransferEndFlag = 1;
}
ret = gina_app_update_flash(buffer, bytes_read, dataTransferEndFlag);
}
GINA_UWLOG_INFO("CloseFile:");
qapi_FS_Close(Fd_ptr);
return GINA_NOERROR;
}
In dam_main
GINA_UWLOG_INFO("START DAM UPGRADE AFTER 10 SECONDS ! "); qapi_Timer_Sleep(10,QAPI_TIMER_UNIT_SEC,true); gina_app_update_start("a:/helloworld.bin"); GINA_UWLOG_INFO("DAM UPGRADE DONE ! ");
Please send ATI1 instead of ATI command. This will also give you A-REVISION. What is the result with gWinSwup? What is the base and target version?
ati1
Cinterion
PLS83-W
REVISION 02.000
A-REVISION 01.000.00
I have tested the two gWinSwup i I found on the extranet
plsx3-w_rev01.210_arn01.000.02 and plsx3-w_rev01.301_arn01.000.00
Both om them go on for a while and ends with module update fail.
Tested on modem port 9.
Logfile below:
[2023-09-18 17:29:08]
[2023-09-18 17:29:08]********************************************
[2023-09-18 17:29:08]Ver-Num : vF_20220125_A
[2023-09-18 17:29:08]Ver-Inf : MODIFY -- do NOT reopen USB when usf-record snd over (@Swup.cpp) .
[2023-09-18 17:29:08]DEBUG_LOG_LV : 0
[2023-09-18 17:29:08]TX_DELY_1_BEFORE_MS : 20(ms)
[2023-09-18 17:29:08]TX_DELY_2_AFTER_MS : 8(ms)
[2023-09-18 17:29:08]********************************************
[2023-09-18 17:29:08]Rdy to extract Img File .[@l1_OpenAttachedFile()]
[2023-09-18 17:29:08]OK : Img File extract success . [@l1_OpenAttachedFile()]
[2023-09-18 17:29:08]--------------------------------------------
[2023-09-18 17:29:08]This exe is for Customer !!!
[2023-09-18 17:29:08]offset = 2041344 .
[2023-09-18 17:29:08]size = 37374036 .
[2023-09-18 17:29:08]index = 1 .
[2023-09-18 17:29:08]strFwFn = 1 .
[2023-09-18 17:29:08]--------------------------------------------
[2023-09-18 17:29:08]Initializing firmware update...
[2023-09-18 17:29:08]--------------------------------------------
[2023-09-18 17:29:08]1. Rdy to OPEN fw file . [@UpdateFirmware()]
[2023-09-18 17:29:09]--------------------------------------------
[2023-09-18 17:29:09]--------------------------------------------
[2023-09-18 17:29:09]2. Rdy to CNT block sum in fw file . [@UpdateFirmware()]
[2023-09-18 17:29:09]block sum = 7730 . [@UpdateFirmware()]
[2023-09-18 17:29:09]--------------------------------------------
[2023-09-18 17:29:09]--------------------------------------------
[2023-09-18 17:29:09]3. Rdy to OPEN COMEx : [@UpdateFirmware()]
[2023-09-18 17:29:09]pParams->fNoFirmware = 0
[2023-09-18 17:29:09]pParams->fUsb = 1
[2023-09-18 17:29:09]pParams->strComPort = COM9
[2023-09-18 17:29:09]pParams->iBaudrate = 115200
[2023-09-18 17:29:09]pParams->nOrgFlowControl = 2
[2023-09-18 17:29:09]--------------------------------------------
[2023-09-18 17:29:09]--------------------------------------------
[2023-09-18 17:29:09]4. Rdy to Prepare the module . [@UpdateFirmware()]
[2023-09-18 17:29:09]Try to Sync Bdr to Module . [@PrepareModule()]
[2023-09-18 17:29:09]Try baudrate 115200
[2023-09-18 17:29:10]SND REQ : AT [@l2_ATCommandRetries()]
[2023-09-18 17:29:20]RCV RSP [NG] : 0byte , timeup .
[2023-09-18 17:29:20]Try baudrate -- No ACK !!
[2023-09-18 17:29:20]Try baudrate 230400
[2023-09-18 17:29:22]SND REQ : AT [@l2_ATCommandRetries()]
[2023-09-18 17:29:22]RCV RSP [OK] : OK [@l2_ReadResponse()]
[2023-09-18 17:29:22]SND REQ : ATE1V1 [@l2_ATCommandRetries()]
[2023-09-18 17:29:22]RCV RSP [OK] : OK [@l2_ReadResponse()]
[2023-09-18 17:29:22]Try baudrate -- OK !!
[2023-09-18 17:29:22]OK : GET-dev-bdr + SET-dev-bdr .
[2023-09-18 17:29:22]--------------------------------------------
[2023-09-18 17:29:22]--------------------------------------------
[2023-09-18 17:29:22]5. Rdy to SND download-cmd-REQ : AT^SFDL . [@UpdateFirmware()]
[2023-09-18 17:29:22]SND REQ : AT^SFDL [@l2_ATCommandRetries()]
[2023-09-18 17:29:29]RCV RSP [OK] : OK [@l2_ReadResponse()]
[2023-09-18 17:29:29]OK : SND-req & RCV-rsp .
[2023-09-18 17:29:29]--------------------------------------------
[2023-09-18 17:29:29]--------------------------------------------
[2023-09-18 17:29:29]6. Rdy to CHK USB-Port vld . [@UpdateFirmware()]
[2023-09-18 17:29:29]Waiting for re-enumerated USB port , because DEV'usb rebooted when rcv AT^SFDL .
[2023-09-18 17:29:29]Rdy to Close COM port ! pDlg=0x135f2e8
[2023-09-18 17:29:29]Close COM port res = 1 (0 : NG . 1 : OK) .
[2023-09-18 17:29:36]--------------------------------------------
[2023-09-18 17:29:36]--------------------------------------------
[2023-09-18 17:29:36]7. Rdy to RCV rdy-Ntf : Dev rdy to rcv usf . [@UpdateFirmware()]
[2023-09-18 17:29:36]OK : RCV Rdy-Ntf = 0x01 before swup start! (01:OK , 02:Retry) [@UpdateFirmware()]
[2023-09-18 17:29:36]--------------------------------------------
[2023-09-18 17:29:36]--------------------------------------------
[2023-09-18 17:29:36]8. Rdy to SND block-pack . [@UpdateFirmware()]
[2023-09-18 17:29:36]Transferring firmware in progress...
[2023-09-18 17:29:36]ERROR: Unexpected or fatal response (0x03) to block 1 !
[2023-09-18 17:29:36]--------------------------------------------
[2023-09-18 17:29:36]--------------------------------------------
[2023-09-18 17:29:36]9. CHK result of tran . [@UpdateFirmware()]
[2023-09-18 17:29:36]ERROR: Firmware update failed!
[2023-09-18 17:29:36]--------------------------------------------
[2023-09-18 17:29:36]Rdy to Close COM port !
[2023-09-18 17:29:36]Close COM port res = 1 (0 : NG . 1 : OK) .
[2023-09-18 17:29:36]Rdy to Close FirmwareFile !
[2023-09-18 17:29:36]Rdy to Close COM port !
[2023-09-18 17:29:36]Close COM port res = 0 (0 : NG . 1 : OK) .
[2023-09-18 17:29:36]Module update failed
[2023-09-18 17:30:18]
[2023-09-18 17:30:18]********************************************
[2023-09-18 17:30:18]Ver-Num : vF_20220125_A
[2023-09-18 17:30:18]Ver-Inf : MODIFY -- do NOT reopen USB when usf-record snd over (@Swup.cpp) .
[2023-09-18 17:30:18]DEBUG_LOG_LV : 0
[2023-09-18 17:30:18]TX_DELY_1_BEFORE_MS : 20(ms)
[2023-09-18 17:30:18]TX_DELY_2_AFTER_MS : 8(ms)
[2023-09-18 17:30:18]********************************************
[2023-09-18 17:30:18]Rdy to extract Img File .[@l1_OpenAttachedFile()]
[2023-09-18 17:30:18]OK : Img File extract success . [@l1_OpenAttachedFile()]
[2023-09-18 17:30:18]--------------------------------------------
[2023-09-18 17:30:18]This exe is for Customer !!!
[2023-09-18 17:30:18]offset = 2041344 .
[2023-09-18 17:30:18]size = 37374036 .
[2023-09-18 17:30:18]index = 1 .
[2023-09-18 17:30:18]strFwFn = 1 .
[2023-09-18 17:30:18]--------------------------------------------
[2023-09-18 17:30:18]Initializing firmware update...
[2023-09-18 17:30:18]--------------------------------------------
[2023-09-18 17:30:18]1. Rdy to OPEN fw file . [@UpdateFirmware()]
[2023-09-18 17:30:19]--------------------------------------------
[2023-09-18 17:30:19]--------------------------------------------
[2023-09-18 17:30:19]2. Rdy to CNT block sum in fw file . [@UpdateFirmware()]
[2023-09-18 17:30:19]block sum = 7730 . [@UpdateFirmware()]
[2023-09-18 17:30:19]--------------------------------------------
[2023-09-18 17:30:19]--------------------------------------------
[2023-09-18 17:30:19]3. Rdy to OPEN COMEx : [@UpdateFirmware()]
[2023-09-18 17:30:19]pParams->fNoFirmware = 0
[2023-09-18 17:30:19]pParams->fUsb = 1
[2023-09-18 17:30:19]pParams->strComPort = COM9
[2023-09-18 17:30:19]pParams->iBaudrate = 115200
[2023-09-18 17:30:19]pParams->nOrgFlowControl = 2
[2023-09-18 17:30:19]--------------------------------------------
[2023-09-18 17:30:19]--------------------------------------------
[2023-09-18 17:30:19]4. Rdy to Prepare the module . [@UpdateFirmware()]
[2023-09-18 17:30:19]Try to Sync Bdr to Module . [@PrepareModule()]
[2023-09-18 17:30:19]Try baudrate 115200
[2023-09-18 17:30:20]SND REQ : AT [@l2_ATCommandRetries()]
[2023-09-18 17:30:30]RCV RSP [NG] : 0byte , timeup .
[2023-09-18 17:30:30]Try baudrate -- No ACK !!
[2023-09-18 17:30:30]Try baudrate 230400
[2023-09-18 17:30:32]SND REQ : AT [@l2_ATCommandRetries()]
[2023-09-18 17:30:32]RCV RSP [OK] : Q0E0V1OK [@l2_ReadResponse()]
[2023-09-18 17:30:32]SND REQ : ATE1V1 [@l2_ATCommandRetries()]
[2023-09-18 17:30:32]RCV RSP [OK] : O [@l2_ReadResponse()]
[2023-09-18 17:30:32]Try baudrate -- OK !!
[2023-09-18 17:30:32]OK : GET-dev-bdr + SET-dev-bdr .
[2023-09-18 17:30:32]--------------------------------------------
[2023-09-18 17:30:32]--------------------------------------------
[2023-09-18 17:30:32]5. Rdy to SND download-cmd-REQ : AT^SFDL . [@UpdateFirmware()]
[2023-09-18 17:30:32]SND REQ : AT^SFDL [@l2_ATCommandRetries()]
[2023-09-18 17:30:39]RCV RSP [OK] : OK [@l2_ReadResponse()]
[2023-09-18 17:30:39]OK : SND-req & RCV-rsp .
[2023-09-18 17:30:39]--------------------------------------------
[2023-09-18 17:30:39]--------------------------------------------
[2023-09-18 17:30:39]6. Rdy to CHK USB-Port vld . [@UpdateFirmware()]
[2023-09-18 17:30:39]Waiting for re-enumerated USB port , because DEV'usb rebooted when rcv AT^SFDL .
[2023-09-18 17:30:39]Rdy to Close COM port ! pDlg=0x135f2e8
[2023-09-18 17:30:39]Close COM port res = 1 (0 : NG . 1 : OK) .
[2023-09-18 17:30:46]--------------------------------------------
[2023-09-18 17:30:46]--------------------------------------------
[2023-09-18 17:30:46]7. Rdy to RCV rdy-Ntf : Dev rdy to rcv usf . [@UpdateFirmware()]
[2023-09-18 17:30:46]OK : RCV Rdy-Ntf = 0x01 before swup start! (01:OK , 02:Retry) [@UpdateFirmware()]
[2023-09-18 17:30:46]--------------------------------------------
[2023-09-18 17:30:46]--------------------------------------------
[2023-09-18 17:30:46]8. Rdy to SND block-pack . [@UpdateFirmware()]
[2023-09-18 17:30:46]Transferring firmware in progress...
[2023-09-18 17:30:46]ERROR: Unexpected or fatal response (0x03) to block 1 !
[2023-09-18 17:30:46]--------------------------------------------
[2023-09-18 17:30:46]--------------------------------------------
[2023-09-18 17:30:46]9. CHK result of tran . [@UpdateFirmware()]
[2023-09-18 17:30:46]ERROR: Firmware update failed!
[2023-09-18 17:30:46]--------------------------------------------
[2023-09-18 17:30:46]Rdy to Close COM port !
[2023-09-18 17:30:46]Close COM port res = 1 (0 : NG . 1 : OK) .
[2023-09-18 17:30:46]Rdy to Close FirmwareFile !
[2023-09-18 17:30:46]Rdy to Close COM port !
[2023-09-18 17:30:46]Close COM port res = 0 (0 : NG . 1 : OK) .
[2023-09-18 17:30:46]Module update failed
The update fails after the first data block is sent to the module which is replied with error response. I think that it's because you are trying to update the module that has revision 2 firmware installed with revision 1 firmware, which is not possible as far as I know.
OK. Thanks
I will leave this for now and wait for next firmware revision some time in the future.
Regards
Tore