Reply
Thread Tools
Posts: 204 | Thanked: 443 times | Joined on Jul 2012 @ Germany - Potsdam
#971
Hi,

I like that Profilematic very much an use it to put my phone at work to flight mode, because of very weak gsm signal level, what drains the battery.

Using the standard flight mode switch from profilematic always switched the wlan off at the same time. So I cannot use the WLAN condition to trigger it, because the WLAN connection is lost if the rule hits and the rule kills its own contition and ist deactivated next. But today I found a way to switch off the gsm modem only, using custom action and a dbus command, documented at:

http://wiki.maemo.org/User:Jebba/DBUS

Instead of the standard flight mode I am now using the custom action for activation:

dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:false

to switch off the gsm-modem and obtain the wifi connection

on deactivation:

dbus-send --system --type=method_call --dest=com.nokia.phone.SSC /com/nokia/phone/SSC com.nokia.phone.SSC.set_radio boolean:true

to switch the gsm-modem on again, if the wifi connection at work ist lost.

This work around helps me to use the wifi-ssid at work as condition to switch the gsm-modem of, as long as I am at work.

Hope it will help someone else.
 

The Following 9 Users Say Thank You to meemorph For This Useful Post:
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#972
Originally Posted by meemorph View Post
This work around helps me to use the wifi-ssid at work as condition to switch the gsm-modem of, as long as I am at work.

Hope it will help someone else.
Thank you for sharing this. I have added your post to first post's recipes list.
__________________
My N9/N950 projects:
 

The Following 2 Users Say Thank You to ajalkane For This Useful Post:
Posts: 594 | Thanked: 1,094 times | Joined on Aug 2012 @ Rhine
#973
Originally Posted by meemorph View Post
Using the standard flight mode switch from profilematic always switched the wlan off at the same time. So I cannot use the WLAN condition to trigger it, because the WLAN connection is lost if the rule hits and the rule kills its own contition and ist deactivated next. But today I found a way to switch off the gsm modem only, using custom action and a dbus command, documented at:

http://wiki.maemo.org/User:Jebba/DBUS
Exactly the same problem with PSM, i'd love to trigger PSM by WLAN-condition, but sadly found nothing about it, reading the linked page.

Any idea anyone?
 
Posts: 204 | Thanked: 443 times | Joined on Jul 2012 @ Germany - Potsdam
#974
Originally Posted by Leinad View Post
Exactly the same problem with PSM, i'd love to trigger PSM by WLAN-condition, but sadly found nothing about it, reading the linked page.

Any idea anyone?
you should use gconftool-2 for that:

activate:
gconftool-2 -s -t bool /system/osso/dsm/energymanagement/force_power_saving true

deactivate:
gconftool-2 -s -t bool /system/osso/dsm/energymanagement/force_power_saving false

check status:
gconftool-2 -g /system/osso/dsm/energymanagement/force_power_saving
 

The Following User Says Thank You to meemorph For This Useful Post:
Posts: 77 | Thanked: 27 times | Joined on Nov 2011
#975
can anyone help me figure out how to run an app based on timing? i know it should be simple but i haven't figured it out

i essentially want the IPRadio app to start up (along with BT) when I drive in the morning so the car can connect and start enjoying some music

any help is appreciated
 
Posts: 594 | Thanked: 1,094 times | Joined on Aug 2012 @ Rhine
#976
Originally Posted by meemorph View Post
you should use gconftool-2 for that:

activate:
gconftool-2 -s -t bool /system/osso/dsm/energymanagement/force_power_saving true

deactivate:
gconftool-2 -s -t bool /system/osso/dsm/energymanagement/force_power_saving false

check status:
gconftool-2 -g /system/osso/dsm/energymanagement/force_power_saving
Well, this works, but i'm still in an endless loop, because triggering PSM still deactivates internet connection and this means no WLAN and this triggers no PSM again and so on... endless loop.

My aim is a constant WLAN-connection, but without checking mails and tweets and social networks... because most of the time, when i have WLAN im sitting next to a computer, so no need to double-check it...
 
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#977
Originally Posted by dolphins View Post
can anyone help me figure out how to run an app based on timing? i know it should be simple but i haven't figured it out

i essentially want the IPRadio app to start up (along with BT) when I drive in the morning so the car can connect and start enjoying some music

any help is appreciated
You'll find the answer from the first post of this thread, in the recipes section!
__________________
My N9/N950 projects:
 

The Following User Says Thank You to ajalkane For This Useful Post:
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#978
I found out a better way to use an NFC tag on my car holder than explained here.

My aim was to put my phone on my car holder (on which I put an NFC sticker on) and have it automatically switch BT on, pair with my Belkin CarAudio Connect and start some apps. Once I'd remove the phone from the cradle, BT would switch off and the apps would close.

I got this working with the previous setup but it was a little flakey at times. Most of the time my phone wouldn't connect automatically to the Belkin even though it should have. I had to press the button on the Belkin to pair it. Also, the annoying popup for NFC had to be dismissed every time. The scripts and BT switching worked reliably.

Here's a much better way:
  • Get NFC Tag Writer from the store and use the "Write Bluetooth Audio Tag"-wizard to write a unique tag for the audio device you're going to be using. Place that tag on your car holder so that it will be under the NFC antenna of the N9 when it's in the cradle. The tag will turn on BT and pair your (or anyone elses) N9 with the audio device. Don't use ProfileMatic's BT actions.
  • In ProfileMatic, create a new rule that has an NFC-condition and Custom Action. NFC condition should be for the tag you just created, so tap your phone on the tag. Leave the toggle condition off, so that this rule is active only when the phone is near the tag (i.e. the phone is in the cradle.)
  • For Custom action on rule activate (i.e. phone is put in the cradle) you can start some apps with a script explained here.
  • For Custom action on rule deactivate (i.e. phone is taken out of the cradle) you can kill those apps with:

    Code:
    killall app1 app2 app3
    where app# is the name of the process you want to kill.

    You probably want to also turn off BT at the same time. A nice way to do that, is to install Toggle BT and add to your app killer script:

    Code:
    xdg-open /usr/share/applications/toggleBT_harmattan.desktop
    For example, my start and stop scripts look like this:

    Start:
    Code:
    #!/bin/sh
    xdg-open /usr/share/applications/music-suite.desktop
    xdg-open /usr/share/applications/meegotouchhome-incar_harmattan.desktop
    Stop:
    Code:
    #!/bin/sh
    killall meegotouchhome-incar drive-qml music-suite
    xdg-open /usr/share/applications/toggleBT_harmattan.desktop

That's it! No more annoying popups and reliable automatic connecting to my BT device.
 

The Following 2 Users Say Thank You to slarti For This Useful Post:
Posts: 1,313 | Thanked: 2,977 times | Joined on Jun 2011 @ Finland
#979
Originally Posted by slarti View Post
That's it! No more annoying popups and reliable automatic connecting to my BT device.
Thanks, I have added this to the recipes list. Just one question, so there is no popup at all with the NFC tag when you wrote this to it? If so, have you found any other tags that do not display the popup?
__________________
My N9/N950 projects:
 

The Following 2 Users Say Thank You to ajalkane For This Useful Post:
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#980
Originally Posted by ajalkane View Post
Thanks, I have added this to the recipes list. Just one question, so there is no popup at all with the NFC tag when you wrote this to it? If so, have you found any other tags that do not display the popup?
No, there's no popup, it just connects to the bluetooth address written on the tag. It does show a banner after the connection is established (or fails) but that goes away in a couple of seconds. I think this is a built-in function in harmattan. A lumia does nothing with this tag.

I only have empty tags.
 

The Following 2 Users Say Thank You to slarti For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 01:18.