Skip to content

broadband-modem: always set all parameters of AT+CPMS write command

Petr Krasnoshchekov requested to merge PeterK/ModemManager:sms-storage into main

During SMS management ModemManager uses AT+CPMS with only mem1 parameter assuming that mem2 and mem3 stay unchanged. SIMCOM A7602E-H resets omitted parameters in AT+CPMS write command to SM, breaking MM logic. So we should always set mem1, mem2 and mem3 in each AT+CPMS write

ModemManager[31430]: <debug> [1703075075.961160] [ttyUSB1/at] device open count is 3 (open)
ModemManager[31430]: <debug> [1703075075.961409] [ttyUSB1/at] device open count is 2 (close)
ModemManager[31430]: <debug> [1703075075.963286] [ttyUSB1/at] --> 'AT+CPMS="SM","ME","ME"<CR>'
ModemManager[31430]: <debug> [1703075076.141551] [ttyUSB1/at] <-- '<CR><LF>+CPMS: 15,15,0,180,0,180<CR><LF>'
ModemManager[31430]: <debug> [1703075076.142877] [ttyUSB1/at] <-- '<CR><LF>OK<CR><LF>'
ModemManager[31430]: <debug> [1703075076.143307] [modem0] listing SMS parts in storage 'me'
ModemManager[31430]: <debug> [1703075076.143448] [modem0] locking SMS storages to: mem1 (ME), mem2 (none)...
ModemManager[31430]: <debug> [1703075076.143590] [ttyUSB1/at] device open count is 3 (open)
ModemManager[31430]: <debug> [1703075076.143800] [ttyUSB1/at] device open count is 2 (close)
ModemManager[31430]: <debug> [1703075076.144011] [ttyUSB1/at] --> 'AT+CPMS="ME"<CR>'
ModemManager[31430]: <debug> [1703075076.522338] [ttyUSB1/at] <-- '<CR><LF>+CPMS: 0,180,15,15,15,15<CR><LF>'
ModemManager[31430]: <debug> [1703075076.522939] [ttyUSB1/at] <-- '<CR><LF>OK<CR><LF>'
ModemManager[31430]: <debug> [1703075076.523399] [ttyUSB1/at] device open count is 3 (open)
ModemManager[31430]: <debug> [1703075076.523660] [ttyUSB1/at] device open count is 2 (close)
ModemManager[31430]: <debug> [1703075076.523869] [ttyUSB1/at] --> 'AT+CMGL=4<CR>'
ModemManager[31430]: <debug> [1703075076.716814] [ttyUSB1/at] <-- '<CR><LF>OK<CR><LF>'
ModemManager[31430]: <debug> [1703075076.717468] [modem0] listing SMS parts in storage 'sm'
ModemManager[31430]: <debug> [1703075076.717641] [modem0] locking SMS storages to: mem1 (SM), mem2 (none)...
ModemManager[31430]: <debug> [1703075076.717800] [ttyUSB1/at] device open count is 3 (open)
ModemManager[31430]: <debug> [1703075076.718010] [ttyUSB1/at] device open count is 2 (close)
ModemManager[31430]: <debug> [1703075076.718292] [ttyUSB1/at] --> 'AT+CPMS="SM"<CR>'
ModemManager[31430]: <debug> [1703075077.072915] [ttyUSB1/at] <-- '<CR><LF>+CPMS: 15,15,15,15,15,15<CR><LF><CR><LF>OK<CR><LF>'
ModemManager[31430]: <debug> [1703075077.073513] [ttyUSB1/at] device open count is 3 (open)
ModemManager[31430]: <debug> [1703075077.073787] [ttyUSB1/at] device open count is 2 (close)
ModemManager[31430]: <debug> [1703075077.074023] [ttyUSB1/at] --> 'AT+CMGL=4<CR>'
Edited by Petr Krasnoshchekov

Merge request reports

Loading