[maemo-users] Offline mode from the command-line?

From: Tony Green tony at beermad.org.uk
Date: Wed Oct 1 14:31:05 EEST 2008
Thanks to all who replied.

/usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal
com.nokia.mce.signal.sig_device_mode_ind string:"[normal|flight]"
works a treat.

Had to live with a bit of a hack to get it to wake up again in the morning until I can find some documentation for alarmtool (though it seems the alarm's not that reliable anyway) but my battery was a lot fuller this morning ;-)

In case it's of help to anybody, this is the script that I'm now running. I start it via SSH from my server at the end of the backup. The downside is that the SSH session stays up until it restarts, but it's less of an overhead than staying connected (I've backgrounding the script, but SSH seems determined to stay.)

# Switch to offline mode
/usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal com.nokia.mce.signal.sig_device_mode_ind string:"flight"

# wait 8 1/2 hours so the device will reconnect in time for when I'll need it online again
sleep 30600

# Switch back to online mode and reconnect to the default access point
/usr/bin/dbus-send --system --type=signal /com/nokia/mce/signal com.nokia.mce.signal.sig_device_mode_ind string:"normal"

Tony Green
Ipswich, Suffolk, England

** This message is digitally signed. If your email client is unable to read digital signatures, you may see an attachment that you cannot open. See http://www.gnupg.org/documentation/faqs.en.html for more information.
You can validate my PGP key from my website: http://www.beermad.org.uk/
* No Micro$oft products were used in the generation of this communication

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.maemo.org/pipermail/maemo-users/attachments/20081001/e0695050/attachment.pgp 
More information about the maemo-users mailing list