MC74xx: wrong running image in QMI_GET_STORED_IMAGES

Hey,

Testing the QMI_GET_STORED_IMAGES on a MC7455 with several modem+pri images; firmware selection based on QMI_SET_FIRMWARE_PREFERENCE.

When a 02.14.03.xx image is selected, the “index of running image” in both the “modem” and “pri” lists refer to the index in the list. This is what is expected by the QMI DMS specification.

When a 02.20.03.xx image is selected, though, the “index of running image” in the “modem” list seems to refer to the storage (slot) index (WRONG!), not to the index in the list returned. The “index of running image” in the “pri” list refers to the index in the returned list, as expected.

Looking at the customer release notes, I see there was a fix done for this specific field of the QMI_GET_STORED_IMAGES in SWI9X30C 2.0 Release 15 (version 02.18.02.00, just in between the versions that work ok and wrong):
ID: 89775
Title: QMI_GET_STORED_IMAGES
Description: QMI_GET_STORED_IMAGES reports incorrect running image if AUTO-SIM feature is enabled.

I wonder if that fix actually broke the logic of the “index of running image” field.

Can someone in Sierra confirm the issue?

Thanks!

I’m bumping this old topic I opened a while ago, because I’m still seeing the same issue, and I really believe this is a bug in the firmware: The “index of running image” in the QMI_GET_STORED_IMAGES response in the “modem” list should refer to the index in the returned list. The same “index of running image” in the “pri” list does report the correct value.

E.g. I get the current firmware info using the Sierra-specific DMS 0x5556 command:

$ sudo qmicli -d /dev/cdc-wdm1 -p --dms-swi-get-current-firmware
[/dev/cdc-wdm1] Successfully retrieved current firmware:
	Model: MC7455
	Boot version: SWI9X30C_02.20.03.00
	AMSS version: SWI9X30C_02.20.03.00
	SKU ID: 1102476
	Package ID: unknown
	Carrier ID: 1
	Config version: 002.017_000

I then list stored images using the generic DMS command, and this is what the device replies:
[29 ago 2019, 14:19:04] [Debug] [/dev/cdc-wdm1] received generic response (translated)…
<<<<<< QMUX:
<<<<<< length = 351
<<<<<< flags = 0x80
<<<<<< service = “dms”
<<<<<< client = 3
<<<<<< QMI:
<<<<<< flags = “response”
<<<<<< transaction = 1
<<<<<< tlv_length = 339
<<<<<< message = “List Stored Images” (0x0049)
<<<<<< TLV:
<<<<<< type = “Result” (0x02)
<<<<<< length = 4
<<<<<< value = 00:00:00:00
<<<<<< translated = SUCCESS
<<<<<< TLV:
<<<<<< type = “List” (0x01)
<<<<<< length = 329
<<<<<< value = 02:00:04:04:04:01:00:3F:5F:3F:00:00:00:00:00:00:00:00:00:00:00:00:00:0D:30:32:2E:32:30:2E:30:33:2E:32:32:5F:3F:02:00:3F:5F:3F:00:00:00:00:00:00:00:00:00:00:00:00:00:0D:30:32:2E:31:34:2E:30:33:2E:30:30:5F:3F:03:00:3F:5F:3F:00:00:00:00:00:00:00:00:00:00:00:00:00:0D:30:32:2E:31:34:2E:30:33:2E:30:32:5F:3F:04:00:3F:5F:3F:00:00:00:00:00:00:00:00:00:00:00:00:00:0D:30:32:2E:32:30:2E:30:33:2E:30:30:5F:3F:01:32:00:05:FF:FF:30:30:32:2E:30:31:37:5F:30:30:30:00:00:00:00:00:13:30:32:2E:32:30:2E:30:33:2E:30:30:5F:47:45:4E:45:52:49:43:FF:FF:30:30:32:2E:30:31:32:5F:30:30:31:00:00:00:00:00:12:30:32:2E:31:34:2E:30:33:2E:30:32:5F:53:50:52:49:4E:54:FF:FF:30:30:31:2E:30:30:30:5F:30:30:30:00:00:00:00:00:15:30:30:2E:30:30:2E:30:30:2E:30:30:5F:4F:45:4D:50:52:49:39:31:38:FF:FF:30:30:32:2E:30:32:36:5F:30:30:30:00:00:00:00:00:13:30:32:2E:32:30:2E:30:33:2E:32:32:5F:56:45:52:49:5A:4F:4E:FF:FF:30:30:30:2E:30:30:38:5F:30:30:30:00:00:00:00:00:14:30:32:2E:31:34:2E:30:33:2E:30:30:5F:56:4F:44:41:46:4F:4E:45
<<<<<< translated = { [0] = '[ type = ‘modem’ maximum_images = ‘4’ index_of_running_image = ‘4’ sublist = '{ [0] = '[ storage_index = ‘1’ failure_count = ‘0’ unique_id = '{ [0] = '63 ’ [1] = '95 ’ [2] = '63 ’ [3] = '0 ’ [4] = '0 ’ [5] = '0 ’ [6] = '0 ’ [7] = '0 ’ [8] = '0 ’ [9] = '0 ’ [10] = '0 ’ [11] = '0 ’ [12] = '0 ’ [13] = '0 ’ [14] = '0 ’ [15] = '0 ‘}’ build_id = ‘02.20.03.22_?’ ] ’ [1] = '[ storage_index = ‘2’ failure_count = ‘0’ unique_id = '{ [0] = '63 ’ [1] = '95 ’ [2] = '63 ’ [3] = '0 ’ [4] = '0 ’ [5] = '0 ’ [6] = '0 ’ [7] = '0 ’ [8] = '0 ’ [9] = '0 ’ [10] = '0 ’ [11] = '0 ’ [12] = '0 ’ [13] = '0 ’ [14] = '0 ’ [15] = '0 ‘}’ build_id = ‘02.14.03.00_?’ ] ’ [2] = '[ storage_index = ‘3’ failure_count = ‘0’ unique_id = '{ [0] = '63 ’ [1] = '95 ’ [2] = '63 ’ [3] = '0 ’ [4] = '0 ’ [5] = '0 ’ [6] = '0 ’ [7] = '0 ’ [8] = '0 ’ [9] = '0 ’ [10] = '0 ’ [11] = '0 ’ [12] = '0 ’ [13] = '0 ’ [14] = '0 ’ [15] = '0 ‘}’ build_id = ‘02.14.03.02_?’ ] ’ [3] = '[ storage_index = ‘4’ failure_count = ‘0’ unique_id = '{ [0] = '63 ’ [1] = '95 ’ [2] = '63 ’ [3] = '0 ’ [4] = '0 ’ [5] = '0 ’ [6] = '0 ’ [7] = '0 ’ [8] = '0 ’ [9] = '0 ’ [10] = '0 ’ [11] = '0 ’ [12] = '0 ’ [13] = '0 ’ [14] = '0 ’ [15] = '0 ‘}’ build_id = ‘02.20.03.00_?’ ] ‘}’ ] ’ [1] = '[ type = ‘pri’ maximum_images = ‘50’ index_of_running_image = ‘0’ sublist = '{ [0] = '[ storage_index = ‘255’ failure_count = ‘255’ unique_id = '{ [0] = '48 ’ [1] = '48 ’ [2] = '50 ’ [3] = '46 ’ [4] = '48 ’ [5] = '49 ’ [6] = '55 ’ [7] = '95 ’ [8] = '48 ’ [9] = '48 ’ [10] = '48 ’ [11] = '0 ’ [12] = '0 ’ [13] = '0 ’ [14] = '0 ’ [15] = '0 ‘}’ build_id = ‘02.20.03.00_GENERIC’ ] ’ [1] = '[ storage_index = ‘255’ failure_count = ‘255’ unique_id = '{ [0] = '48 ’ [1] = '48 ’ [2] = '50 ’ [3] = '46 ’ [4] = '48 ’ [5] = '49 ’ [6] = '50 ’ [7] = '95 ’ [8] = '48 ’ [9] = '48 ’ [10] = '49 ’ [11] = '0 ’ [12] = '0 ’ [13] = '0 ’ [14] = '0 ’ [15] = '0 ‘}’ build_id = ‘02.14.03.02_SPRINT’ ] ’ [2] = '[ storage_index = ‘255’ failure_count = ‘255’ unique_id = '{ [0] = '48 ’ [1] = '48 ’ [2] = '49 ’ [3] = '46 ’ [4] = '48 ’ [5] = '48 ’ [6] = '48 ’ [7] = '95 ’ [8] = '48 ’ [9] = '48 ’ [10] = '48 ’ [11] = '0 ’ [12] = '0 ’ [13] = '0 ’ [14] = '0 ’ [15] = '0 ‘}’ build_id = ‘00.00.00.00_OEMPRI918’ ] ’ [3] = '[ storage_index = ‘255’ failure_count = ‘255’ unique_id = '{ [0] = '48 ’ [1] = '48 ’ [2] = '50 ’ [3] = '46 ’ [4] = '48 ’ [5] = '50 ’ [6] = '54 ’ [7] = '95 ’ [8] = '48 ’ [9] = '48 ’ [10] = '48 ’ [11] = '0 ’ [12] = '0 ’ [13] = '0 ’ [14] = '0 ’ [15] = '0 ‘}’ build_id = ‘02.20.03.22_VERIZON’ ] ’ [4] = '[ storage_index = ‘255’ failure_count = ‘255’ unique_id = '{ [0] = '48 ’ [1] = '48 ’ [2] = '48 ’ [3] = '46 ’ [4] = '48 ’ [5] = '48 ’ [6] = '56 ’ [7] = '95 ’ [8] = '48 ’ [9] = '48 ’ [10] = '48 ’ [11] = '0 ’ [12] = '0 ’ [13] = '0 ’ [14] = '0 ’ [15] = '0 ‘}’ build_id = ‘02.14.03.00_VODAFONE’ ] ‘}’ ] '}

In the previous reply, the modem is saying that the “index of running image” in the modem list is 4:
[ type = ‘modem’ maximum_images = ‘4’ index_of_running_image = ‘4’…
There is NO item in the list with index 4, because the list only has 4 items (indices 0 to 3). This index value should have been 3 instead, pointing to the image with build_id “02.20.03.00_?”. If I’m not mistaken, the value 4 reported by the modem could be the “storage index” instead, not the index in the list. This issue is seen only since firmware 02.20.xx.xx, there was no issue in 02.14.xx.xx.

And the “index of running image” in the pri list is 0:
[ type = ‘pri’ maximum_images = ‘50’ index_of_running_image = ‘0’…
The first item in the list (index 0) is the one with unique_id “002.017_000” and build_id “02.20.03.00_GENERIC” (CORRECT one)

Can someone in Sierra confirm the issue?