the-modem-distro / pinephone_modem_sdk

Pinephone Modem SDK: Tools to build your own bootloader, kernel and rootfs
GNU General Public License v3.0
597 stars 64 forks source link

time syncing wrong #173

Open bgkillas opened 1 year ago

bgkillas commented 1 year ago

while catting /dev/ttyUSB2 to check output i ran

doas su -c 'echo -ne AT+CCLK=\"22/12/01,00:09:18-24\""\r" > /dev/ttyUSB2' doas sh -c 'echo -ne "AT+CCLK?\r" > /dev/ttyUSB2'

and it outputs

OK +CCLK: "24/10/13,10:09:23-24"

before i tried to set time it was

+CCLK: "24/10/13,11:08:20-20"

do i just have to use mmcli? running it in debug mode is so silly

Biktorgj commented 1 year ago

No need to use ModemManager in debug mode for this, but the command you posted has a typo: doas su -c 'echo -ne "AT+CCLK=\"22/12/01,00:09:18-24\"\r" > /dev/ttyUSB2'

Now, things to keep in mind:

OpenQTI doesn't really need the baseband to know the correct time (messages received from the network will still have the correct time set), it just needs the RTC for the userspace to have it so fake SMS's and call recordings come with the correct date (there's two separate clocks in the modem)

bgkillas commented 1 year ago

still cant set CCLK right but i can set adb shell date correctly at least