1 minute read

I use an UMTS modem with my raspberry pi 1.

the package mmcli is quite useful for handling the modem (e.g., sending SMS,..)

    • list modems:[code language="bash"]
      $ mmcli -L
      Found 1 modems:
      /org/freedesktop/ModemManager1/Modem/0 [huawei] E176
      [/code]

      • retrieve modem id from the output (here it is: 0)
    • enable modem:[code language="bash"]
      $ sudo mmcli -m 0 -e
      successfully enabled the modem
      [/code]
    • create sms:[code language="bash"]
      $ sudo mmcli -m 0 --messaging-create-sms="text='Hello world',number='+1234567890'"
      Successfully created new SMS:
      /org/freedesktop/ModemManager1/SMS/12 (unknown)
      [/code]

      • retrieve sms id from output (here: 12)
    • send sms:
      $ sudo mmcli -s 12 --send
      successfully sent the SMS
      
    • list modem settings:
      • full:
        $ mmcli -m 0
      • simplified output:
        $ mmcli -m 0 --simple-status
    • list sms in memory:
      $ mmcli -m 0 --messaging-list-sms
    • read received sms:
      $ mmcli -s XY

      where XY is a number from the list sms statement


sources: