Off by one bug? --dms-select-stored-image

Nick mips171 at icloud.com
Mon Jan 4 03:56:25 UTC 2021


Hey,

I am using qmicli 1.26.6 to select firmware images, but I have tested this with various versions and it is present in all of the ones I tested. I also tested with several MC74xx modems to be sure. The bug is in the output of —dms-list-stored-images; the modem index is off by one (+1).

The verbose qmicli output is here: https://pastebin.com/jzudbm1S but it is demonstrated below with regular output.

As you can see the modem index does not appear to change in the CLI output, but when you check with --dms-get-revision it shows the truth.

Is anyone able to replicate it?

root at OpenWrt:~# qmicli -p -d /dev/cdc-wdm0 --dms-list-stored-images
[/dev/cdc-wdm0] Device list of stored images retrieved:

	[0] Type:    'modem'
	    Maximum: '4'

		[modem0]
		Unique ID:     '?_?'
		Build ID:      '02.24.05.06_?'
		Storage index: '1'
		Failure count: '0'

		[modem1]
		Unique ID:     '002.044_000'
		Build ID:      '02.30.03.00_TELSTRA'
		Storage index: '2'
		Failure count: '0'

		>>>>>>>>>> [CURRENT] <<<<<<<<<<
		[modem2]
		Unique ID:     '002.072_000'
		Build ID:      '02.33.03.00_GENERIC'
		Storage index: '3'
		Failure count: '0'

	[1] Type:    'pri'
	    Maximum: '50'

		[pri0]
		Unique ID:     '001.007_000'
		Build ID:      '02.24.05.06_DOCOMO'

		>>>>>>>>>> [CURRENT] <<<<<<<<<<
		[pri1]
		Unique ID:     '002.072_000'
		Build ID:      '02.33.03.00_GENERIC'

		[pri2]
		Unique ID:     '001.005_000'
		Build ID:      '02.24.05.06_KDDI'

		[pri3]
		Unique ID:     '001.006_000'
		Build ID:      '02.24.05.06_Softbank'

		[pri4]
		Unique ID:     '002.044_000'
		Build ID:      '02.30.03.00_TELSTRA'


# Request modem1,pri4: Telstra firmware, Telstra PRI.
root at OpenWrt:~# qmicli -p -d /dev/cdc-wdm0 --dms-select-stored-image=modem1,pri4
root at OpenWrt:~# qmicli -p -d /dev/cdc-wdm0 --dms-set-operating-mode=offline
[/dev/cdc-wdm0] Operating mode set successfully
root at OpenWrt:~# qmicli -p -d /dev/cdc-wdm0 --dms-set-operating-mode=reset
[/dev/cdc-wdm0] Operating mode set successfully

# wait about a minute for it to reset then check, but it selected modem2, not modem1.

root at OpenWrt:~# qmicli -p -d /dev/cdc-wdm0 --dms-list-stored-images
[/dev/cdc-wdm0] Device list of stored images retrieved:

	[0] Type:    'modem'
	    Maximum: '4'

		[modem0]
		Unique ID:     '?_?'
		Build ID:      '02.24.05.06_?'
		Storage index: '1'
		Failure count: '0'

		[modem1]
		Unique ID:     '002.044_000'
		Build ID:      '02.30.03.00_TELSTRA'
		Storage index: '2'
		Failure count: '0'

		>>>>>>>>>> [CURRENT] <<<<<<<<<<
		[modem2]
		Unique ID:     '002.072_000'
		Build ID:      '02.33.03.00_GENERIC'
		Storage index: '3'
		Failure count: '0'

	[1] Type:    'pri'
	    Maximum: '50'

		[pri0]
		Unique ID:     '001.007_000'
		Build ID:      '02.24.05.06_DOCOMO'

		[pri1]
		Unique ID:     '002.072_000'
		Build ID:      '02.33.03.00_GENERIC'

		[pri2]
		Unique ID:     '001.005_000'
		Build ID:      '02.24.05.06_KDDI'

		[pri3]
		Unique ID:     '001.006_000'
		Build ID:      '02.24.05.06_Softbank'

		>>>>>>>>>> [CURRENT] <<<<<<<<<<
		[pri4]
		Unique ID:     '002.044_000'
		Build ID:      ’02.30.03.00_TELSTRA'

--dms-get-revision shows differently
root at OpenWrt:~# qmicli -p -d /dev/cdc-wdm0 --dms-get-revision
[/dev/cdc-wdm0] Device revision retrieved:
	Revision: 'SWI9X30C_02.30.03.00 r7804 CARMD-EV-FRMWR2 2018/07/25 01:10:04'


All the best,
Nick




More information about the libqmi-devel mailing list