This is an example from the mmcli
manpage:
mmcli -m 0 --messaging-create-sms="text='Hello world',number='+1234567890'"
The details how it is parsed are unclear, the description says only --messaging-create-sms=['KEY1=VALUE1,...']
and lists known keys. The value for the text
key is an UTF-8 message text.
So this is the corresponding line from my script:
mmcli -m $modem --messaging-create-sms="text='$msg',number='$num'"
The probem is that the message must not contain a single quote. The error is:
'GDBus.Error:org.freedesktop.ModemManager1.Error.Message.InvalidPduParameter: Failed to convert message text to GSM'
Currently I'm replacing it by a double qoute. I tried backslash escaping, but it did not work. Could you please help?