Created
November 15, 2018 08:14
-
-
Save parrotmac/59fc81076e475866a8645b5ff2bdce72 to your computer and use it in GitHub Desktop.
Send serial command to modem using ModemManager via DBus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Sends command 'ATI' to modem #3 | |
# Get a list of modems by running `mmcli -L` | |
# Timeout is (probably) 2 seconds | |
# Also see https://www.freedesktop.org/software/ModemManager/api/latest/gdbus-org.freedesktop.ModemManager1.Modem.html#gdbus-method-org-freedesktop-ModemManager1-Modem.Command | |
dbus-send --system --dest=org.freedesktop.ModemManager1 --print-reply /org/freedesktop/ModemManager1/Modem/3 org.freedesktop.ModemManager1.Modem.Command string:'ATI' uint32:2000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment