List All Messages (0x0031) doesn't seem to delete the messages after reading them
Hi, I'm not sure if this is issue is on ModemManager or libqmi. From the code it seems like the request should be done from ModemManager, so that's why I'm opening this issue here.
On boot and after SIM unlock, ModemManager sends a QMI request to the modem with the ID 0x0031 to get all the messages stored in memory. The QMI answer from the modem is a list containing the number of messages and an array of message IDs that it can provide, for example:
ModemManager[9332]: <debug> [1671254668.389089] [/dev/cdc-wdm0] sent generic request (translated)...
<<<<<< QMUX:
<<<<<< length = 24
<<<<<< flags = 0x00
<<<<<< service = "wms"
<<<<<< client = 1
<<<<<< QMI:
<<<<<< flags = "none"
<<<<<< transaction = 9
<<<<<< tlv_length = 12
<<<<<< message = "List Messages" (0x0031)
<<<<<< TLV:
<<<<<< type = "Message Mode" (0x12)
<<<<<< length = 1
<<<<<< value = 01
<<<<<< translated = gsm-wcdma
<<<<<< TLV:
<<<<<< type = "Message Tag" (0x11)
<<<<<< length = 1
<<<<<< value = 01
<<<<<< translated = mt-not-read
<<<<<< TLV:
<<<<<< type = "Storage Type" (0x01)
<<<<<< length = 1
<<<<<< value = 01
<<<<<< translated = nv
ModemManager[9332]: <debug> [1671254668.418645] [/dev/cdc-wdm0] received message...
<<<<<< RAW:
<<<<<< length = 37
<<<<<< data = 01:24:00:80:05:01:02:09:00:31:00:18:00:02:04:00:00:00:00:00:01:0E:00:02:00:00:00:01:00:00:00:00:02:00:00:00:00
After that ModemManager will send an ACK and the modem will start sending all the messages in memory. ModemManager gets them, but it doesn't seem to delete them afterwards, in fact, there doesn't seem to attempt to (or at least that didn't show up in my logs). I looked into src/mm-broadband-modem-qmi.c
but there doesn't seem to be any call to qmi_message_wms_delete[something] anywhere, and can't really provide any helpful code since I don't know where that should be done, or if the expectation is that the deletion should be deferred at some other point when the modem has been fully initialized (this happens 1-2seconds from sim unlocking)