Open boroli opened 1 year ago
After some research I figured out how to start ModemManager in debug mode:
sudo service ModemManager stop
sudo /usr/sbin/ModemManager --debug
Then on a second shell (or maybe you can put the ModemManager output in bg), send your AT commands:
sudo mmcli -m 0 --command=$(echo AT+CCLK=\"`date -u +%y/%m/%d,%H:%M:%S+01`\")
sudo mmcli -m 0 --command=$(echo AT+CCLK?)
response: '+CCLK: "22/11/11,16:23:58+44"'
That seems to have worked. But when I log into the adb shell, it still gives me 1970 date:
~$ adb shell
sh-5.1# date
Thu Jan 1 01:01:34 UTC 1970
And the modem still tries to sync the time:
sh-5.1# tail /var/log/openqti.log
[95.3278] I time_sync: Waiting for network to be ready... 0
[125.3238] I start_scheduler_thread: Starting scheduler thread
[125.3245] I read_tasks_from_storage: Start
[125.3250] I read_tasks_from_storage: Open file
[125.3256] E read_tasks_from_storage: Can't open config file for writing
[125.3286] I time_sync: Waiting for network to be ready... 0
[155.3294] I time_sync: Waiting for network to be ready... 0
[185.3303] I time_sync: Waiting for network to be ready... 0
[215.3311] I time_sync: Waiting for network to be ready... 0
[245.3321] I time_sync: Waiting for network to be ready... 0
What's the reason for that? Then back to the first shell, or bring MM into foreground; and bring MM back to normal operation:
CTRL+C
sudo service ModemManager start
If I send an AT command directly to USB2, where can I read the response to it, like for this one?
sudo sh -c 'echo "AT+CCLK?\r" > /dev/ttyUSB2'
You can't, because nothing in that command stays around to listen for a response. If your distro has atinout
that's probably the simplest option:
echo 'AT+CCLK' | sudo atinout - /dev/ttyUSB2 -
Otherwise look at serial terminals (e.g. minicom, picocom, IIRC you can make screen
work as one, too).
Hi,
since some time I get the following error message, when I try to send AT commands via ModemManager:
or alternatively without sudo
And actually the MM man pages states, that this is only available in debug mode:
I tried to find some meaningful information, but google wasn't any helpful in this case. I thought maybe some group id's are missing?!?
In that particular instance, I tried to set the time and tried to send the AT command directly to USB2:
sudo mmcli -m any --command=$(echo AT+CCLK=\"`date -u +%y/%m/%d,%H:%M:%S+01`\")
But also this wasn't working.