I'm stuck on a problem using ModemManager (mmcli 1.14.2) to programmatically send SMS which contains a certain combination of special characters which I have yet to identify.
The SMS I'm trying to send is the following:
OK({ yRgK1DNXQKo4C7uK43WnHArW1XbNekn6JJ80qgMTRcPM8pgGTJMwYDgseRRYOEA6NdCgQNgiSoheRZnK0czZy5P0GTny3rRrSEE9HTiFepFnhDxM6B2J3bpbHnHJiYbSQt40rt0dwIoZYeiEYyo7glw1kswTrg7He5Ojl8ysyxF4X54SCQomZrKRPsrEHpT2vLjCLfGn9pDGHxodwXbbKADm8j4waiGVnZfRBJBDSx8VUO28Yit068aM32t9a91NC0eUVkyUEGkNsm75cVQ7KJ0rpzucTRSudO7DJLxrgetz })
I'm using a random string here just to simulate a large payload. In reality, the payload between curly braces is a more structured model.
The problem is that whenever I use the curly braces to encapsulate the payload, the message is not delivered to the recipient.
I'm facing this issue using the following send methods.
Using MMCLI
Sending SMS using mmcli with:
mmcli -m 1 --messaging-create-sms="number=<NUMBER>,text='OK({yRgK1DNXQKo4C7uK43WnHArW1XbNekn6JJ80qgMTRcPM8pgGTJMwYDgseRRYOEA6NdCgQNgiSoheRZnK0czZy5P0GTny3rRrSEE9HTiFepFnhDxM6B2J3bpbHnHJiYbSQt40rt0dwIoZYeiEYyo7glw1kswTrg7He5Ojl8ysyxF4X54SCQomZrKRPsrEHpT2vLjCLfGn9pDGHxodwXbbKADm8j4waiGVnZfRBJBDSx8VUO28Yit068aM32t9a91NC0eUVkyUEGkNsm75cVQ7KJ0rpzucTRSudO7DJLxrgetz})'"
and then
mmcli -m 1 --sms <id> --send
Which gives the following result:
successfully sent the SMS
Using DBUS
I use the Messaging DBUS interface to create a new SMS, set its "number" and "text" (UTF8 string) properties and then send it using its Send() method.
I use C# and Tmds.Dbus to interact with the bus.
The problem
Using both methods, I'm unable to receive the message on the recipient's phone. If I try to send the same message without curly braces, it gets delivered without any problme. If I try to send another message with curly braces (something like "OK({Test})" it still gets delivered without any problem. If I try to send any of the above messages from a phone to the device I'm using (with modem manager) they get received without any problem (with or without curly braces, long and short version).
It seems like there's a special combination of chars which causes problem to ModemManager and therefore does not get sent.
The fact the same message can be sent from a phone to ModemManager makes me think there isn't any problem on the mobile operator side.
Unluckly, since the actual payload contains a JSON encoded model, curly braces are important.