RC7620-1 Modem FOTA +WDSI wrong unsolicited response code when no FOTA is available

Other modems like HL7692 usually respond with the following sequence when no FOTA update is available or setup on AirVantage:

[2023-11-28 11:59:09] >> Checking if there is an update for the modem
[2023-11-28 11:59:09] AT+CGACT=0,1
[2023-11-28 11:59:10] 
[2023-11-28 11:59:10] +CGREG: 0
[2023-11-28 11:59:10] 
[2023-11-28 11:59:10] OK
[2023-11-28 11:59:10] AT+WDSS=0,"our_apn","our_user","our_pass",1
[2023-11-28 11:59:10] 
[2023-11-28 11:59:10] OK
[2023-11-28 11:59:10] AT+WDSC=3,0
[2023-11-28 11:59:10] 
[2023-11-28 11:59:10] OK
[2023-11-28 11:59:10] 
[2023-11-28 11:59:10] +CGREG: 5
[2023-11-28 11:59:10] AT+WDSC=4,0
[2023-11-28 11:59:10] 
[2023-11-28 11:59:10] OK
[2023-11-28 11:59:10] AT+CGACT=1,1
[2023-11-28 11:59:11] 
[2023-11-28 11:59:11] OK
[2023-11-28 11:59:11] AT+WDSS=1,1
[2023-11-28 11:59:12] 
[2023-11-28 11:59:12] OK
[2023-11-28 11:59:12] 
[2023-11-28 11:59:12] +WDSI: 4
[2023-11-28 11:59:12] 
[2023-11-28 11:59:13] +WDSI: 8
[2023-11-28 11:59:13] ATI3
[2023-11-28 12:00:12] 
[2023-11-28 12:00:12] RHL769x.2.27.183100.201809071813.x7120m_3
[2023-11-28 12:00:12] 
[2023-11-28 12:00:12] OK
[2023-11-28 12:00:12] AT+WDSS=1,0
[2023-11-28 12:00:12] 
[2023-11-28 12:00:12] OK
[2023-11-28 12:00:12] > PDP context released from Device Service Session

This happens pretty fast and the modem driver continues to do other stuff.
With the RC Modem, the response is different


[2023-11-28 12:08:14] >> Checking if there is an update for the modem
[2023-11-28 12:08:14] >
[2023-11-28 12:08:14] AT+WDSS=1,0
[2023-11-28 12:08:14] 
[2023-11-28 12:08:14] OK
[2023-11-28 12:08:14] AT+WDSI=4479
[2023-11-28 12:08:14] 
[2023-11-28 12:08:14] OK
[2023-11-28 12:08:14] AT+WDSS?
[2023-11-28 12:08:15] 
[2023-11-28 12:08:15] 
[2023-11-28 12:08:15] +WDSS: 1,0
[2023-11-28 12:08:15] +WDSS: 2,1
[2023-11-28 12:08:15] 
[2023-11-28 12:08:15] OK
[2023-11-28 12:08:15] AT+WDSS=2,1
[2023-11-28 12:08:15] 
[2023-11-28 12:08:15] OK
[2023-11-28 12:08:15] AT+WDSC=3,0
[2023-11-28 12:08:15] 
[2023-11-28 12:08:15] OK
[2023-11-28 12:08:15] AT+WDSC=4,0
[2023-11-28 12:08:15] 
[2023-11-28 12:08:15] OK
[2023-11-28 12:08:15] AT+WDSC?
[2023-11-28 12:08:16] 
[2023-11-28 12:08:16] 
[2023-11-28 12:08:16] +WDSC: 0,0
[2023-11-28 12:08:16] +WDSC: 1,0
[2023-11-28 12:08:16] +WDSC: 2,0
[2023-11-28 12:08:16] +WDSC: 3,0
[2023-11-28 12:08:16] +WDSC: 4,0
[2023-11-28 12:08:16] +WDSC: 5,0
[2023-11-28 12:08:16] +WDSC: 6,0
[2023-11-28 12:08:16] 
[2023-11-28 12:08:16] OK
[2023-11-28 12:08:16] AT+WDSG
[2023-11-28 12:08:16] 
[2023-11-28 12:08:16] 
[2023-11-28 12:08:16] +WDSG: 0,3
[2023-11-28 12:08:16] +WDSG: 1,0
[2023-11-28 12:08:16] 
[2023-11-28 12:08:16] OK
[2023-11-28 12:08:16] AT+CGACT?
[2023-11-28 12:08:16] 
[2023-11-28 12:08:16] +CGACT: 1,1
[2023-11-28 12:08:16] +CGACT: 2,0
[2023-11-28 12:08:16] +CGACT: 3,0
[2023-11-28 12:08:16] 
[2023-11-28 12:08:16] OK
[2023-11-28 12:08:16] AT+WDSS=2,1
[2023-11-28 12:08:17] 
[2023-11-28 12:08:17] OK
[2023-11-28 12:08:17] AT+WDSS=1,1
[2023-11-28 12:08:18] 
[2023-11-28 12:08:18] OK
[2023-11-28 12:08:18] 
[2023-11-28 12:08:19] 
[2023-11-28 12:08:19] +WDSI: 4
[2023-11-28 12:08:19] 
[2023-11-28 12:08:19] 
[2023-11-28 12:08:21] 
[2023-11-28 12:08:21] +WDSI: 6
[2023-11-28 12:08:21] 
[2023-11-28 12:08:21] 
[2023-11-28 12:08:21] 
[2023-11-28 12:08:21] +WDSI: 23,1
[2023-11-28 12:08:21] 

Instead of “+WDSI: 8” the response is “+WDSI: 6” and then “+WDSI: 23,1” which is part of the process to download a package from Airvantage.
The inconvenience is that in a normal situation when we do have a FOTA set up, this logic also happens so it is important to have in the driver. But when there is no FOTA scheduled, we waste 5 minutes waiting until timeout. The timeout cannot be lowered because it is a valid duration for the normal case.
Can someone kindly help with the clarification how we can detect there is no FOTA package available on the server for this modem and return immediately?

from you log, it just uses 4 seconds to connect to AVMS server, where is the 5 mins wasted time?


[2023-11-28 12:08:17] AT+WDSS=1,1
[2023-11-28 12:08:18] 
[2023-11-28 12:08:18] OK
[2023-11-28 12:08:18] 
[2023-11-28 12:08:19] 
[2023-11-28 12:08:19] +WDSI: 4
[2023-11-28 12:08:19] 
[2023-11-28 12:08:19] 
[2023-11-28 12:08:21] 
[2023-11-28 12:08:21] +WDSI: 6
[2023-11-28 12:08:21] 
[2023-11-28 12:08:21] 
[2023-11-28 12:08:21] 
[2023-11-28 12:08:21] +WDSI: 23,1
[2023-11-28 12:08:21]

After
+WDSI: 23,1
Usually the driver is waiting with a timeout for a firmware
If there was no firmware payload why is this response coming?

The problem is in the case where there is a firmware, this response is parsed, otherwise we expect the usual
+WDSI: 8 or +WDSI: 7

+WDSI (notification)
6—Authentication has succeeded and session with the server has started.
7—Session with the server failed.
8—Session with the server is finished.
9—Package is available on the server and can be downloaded by the module. A
parameter is returned indicating the package size in kB. When downloading
session is retried, it will notify this event again, user application should be prepared to
handle this event in downloading.

23—Session type (only in LWM2M protocol)

We wait for 9 with a timeout of about 5 minutes. How long does it take for the +WDSI: 9 indication to come from the server when the firmware is available?
Why does the server not send +WDSI: 8 when no FOTA is scheduled for this modem?

I think you need to send AT+WDSS+1,0

at+Wdss=1,1
OK


+WDSI: 4



+WDSI: 5



+WDSI: 4



+WDSI: 6



+WDSI: 23,0



+WDSI: 4



+WDSI: 6



+WDSI: 23,1

ati3
Manufacturer: Sierra Wireless, Incorporated
Model: RC7620
Revision: SWI9X07H_00.08.24.02 f90cbd jenkins 2022/03/21 03:47:54
IMEI: 353634110012345
IMEI SV: 19
FSN: 7Q947200012345
+GCAP: +CGSM

OK

at+Wdss?

+WDSS: 1,1
+WDSS: 2,1

OK
at+wdss=1,1
OK
at+wdss=1,0
OK


+WDSI: 8

at+Wdss=1,1
OK


+WDSI: 4



+WDSI: 6



+WDSI: 23,1



+WDSI: 9,35140368

My point is, there is no indication for “No FOTA available at this time” from Airvantage, for this modem.

AT+WDSS=<Mode>[,<Action>]
<Mode> (Connection method)
• 1—User-initiated connection to the AirVantage server
• 2—PDP context configuration for AirVantage server
• Note: Mode 0 is deprecated; use Mode 2 instead.
(PDP context identifier)
• String
(Connect to/disconnect from AirVantage server)
• For =1 only
• 0—Release connection (Default)
• 1—Establish connection

How can we release connection without knowing if there is an update already set up?

Like I said, with other modems, we do get

+WDSI: 8

immediately if there is no FOTA package scheduled and we exit on that.

[2023-11-28 11:59:11] AT+WDSS=1,1
[2023-11-28 11:59:12]
[2023-11-28 11:59:12] OK
[2023-11-28 11:59:12]
[2023-11-28 11:59:12] +WDSI: 4
[2023-11-28 11:59:12]
[2023-11-28 11:59:13] +WDSI: 8

What logic can we use to differentiate whether there is a package coming so we can wait, or not?

I guess you can set AT+WDSC=1,1, if there is package to download, there should be indication.
If no package to download, you can just type AT+WDSS=1,0 to release the connection

In other words, how long between these two indications?

did you set up the test to measure the timing?

Yes, sometimes up to 5 minutes depending on the network connection in the field. We have many stations in the field and when we need to update, we have to be sure it will work. The issue is, we do FOTA check with every communication and it is now wasting 5 minutes every time with this modem.

then will this relate to network connection?
I remember I don’t need to wait for 5 minutes

I will test it again with GPRS in the field and see. I used bridge mode and timed it.