I've installed Wammu and was pleasantly surprised by how easy it was to get it up and running. But as soon as I had it configured to talk with both our phones, I realized that what I really wanted was to use Gammu, its command line alter ego.
My plan is to run a backup script every night that will copy contents and settings from the phones to my laptop over Bluetooth. I'll post my backup script as soon as it's up and running for a few days.
In the meantime, let me present another script that I run as a scheduled task every night. It's job is to synchronize the date and time on both our phones to the laptop clock. This has several benefits:
- the phone clocks are more accurate (because the laptop clock is updated by NTP)
- the phone clocks switch automatically to and from Daylight savings time,
- the phone clocks become synchronized to each other
grep port= ~/.gammurc | cut -d= -f2 |
while read phone
name="$(grep -m $(( $section + 1 )) name= ~/.gammurc | tail -1 | sed s/name=//)"
gammu -s $section setdatetime
I run the script as a Cron job at 4:05 AM. The idea is to synchronize clocks after 2:00AM, which is when the switch to/from Daylight savings time occurs where I live:
- launch crontab:
crontab -ethis should launch a text editor (you can configure which one by modifying the EDITOR environment variable)
- add the following line
5 4 * * * /full/path/to/sync-phones.sh
- save the file and exit the editor