Active Topics

 


Reply
Thread Tools
Posts: 33 | Thanked: 32 times | Joined on Nov 2007 @ Finland
#51
BTW, ConnMan dbus API descriptions can be found at http://git.kernel.org/cgit/network/c...n.git/tree/doc

The manager-api.txt and technology-api.txt are the most useful ones to check.
 
solbrit's Avatar
Posts: 126 | Thanked: 59 times | Joined on Jan 2011
#52
Originally Posted by jukkar View Post
This is the correct way, only cellular should be disabled now. If it does not, then that is a bug.
Then a bug it is
I did do some progresss though.

Originally Posted by jukkar View Post
You can go to flight mode via connman like this
Code:
dbus-send --system --type=method_call --print-reply --dest=net.connman / net.connman.Manager.SetProperty string:"OfflineMode" variant:boolean:true
Unlike mcetool (where I tried the same thing) using connman you can set offline mode and then reactivate only wifi:
Code:
dbus-send --system --type=method_call --print-reply --dest=net.connman /net/connman/technology/wifi net.connman.Technology.SetProperty string:"Powered" variant:boolean:true
This way the end result is the one I was looking for, even though you loose wlan connection for a few seconds. Great! I needed this for when I'm at work. Thankyou EmaNymton and Jukkar!
 
Posts: 958 | Thanked: 3,426 times | Joined on Apr 2012
#53
Any idea how to set an alarm via DBus?
 
Posts: 84 | Thanked: 79 times | Joined on Dec 2013
#54
Anyone now how to get GPS-coordinates through dbus? Or some other simple way that can be used from a shell script?
 
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#55
Originally Posted by evk View Post
Anyone now how to get GPS-coordinates through dbus? Or some other simple way that can be used from a shell script?
I had a couple of tries, but could not figure out how to do it.

Apparently the thing to use is "org.freedesktop.Geoclue.Master" but how to exactly do that escapes my understanding. I did some experimenting with qdbus but the format of the dbus commands are too difficult for me to understand...

It's got a org.freedesktop.Geoclue.Master.Create() method, and invoking that will give you a new thingy, something like "/org/freedesktop/Geoclue/Master/client0" for example, where the last number will probably increase based on how many thingies you have create():d...
 
Posts: 84 | Thanked: 79 times | Joined on Dec 2013
#56
Yes, I found the Geoclue interface, but didn't mess around with create. So that's one step fruther, thanks.

If I don't find anything else. I'll guess I'll have to write a small utility in c++. But it's fun to see how much that can be acomplished in pure(*) shell.


* What ever pure means. dbus-send, mcetool etc. aren't shell commands. But they would be available in a shell ready nemo/sailfish install.
 
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#57
Originally Posted by evk View Post
Yes, I found the Geoclue interface, but didn't mess around with create. So that's one step fruther, thanks.

If I don't find anything else. I'll guess I'll have to write a small utility in c++. But it's fun to see how much that can be acomplished in pure(*) shell.

* What ever pure means. dbus-send, mcetool etc. aren't shell commands. But they would be available in a shell ready nemo/sailfish install.
I have same thing in mind. Unfortunately I could not find any examples on how to interface to the positioning with c (or any other language either, bummer...)

I'd like to make a simple positionlogger utility, that just logs coordinates every second, to help me plot my running exercises. I still have to take my N9 with me when I am running since there's nothing like that for Sailfish
 
Posts: 131 | Thanked: 241 times | Joined on Feb 2012
#58
There is Rena: https://github.com/Simoma/rena. I did not try it with running, but it save tracks in GPX format.
 

The Following User Says Thank You to HolgerN For This Useful Post:
Posts: 37 | Thanked: 26 times | Joined on Aug 2013 @ Finland
#59
Originally Posted by juiceme View Post
I'd like to make a simple positionlogger utility, that just logs coordinates every second, to help me plot my running exercises. I still have to take my N9 with me when I am running since there's nothing like that for Sailfish
OpenRepos, OSMapper. Works fine.
 
Posts: 84 | Thanked: 79 times | Joined on Dec 2013
#60
Originally Posted by juiceme View Post
I have same thing in mind. Unfortunately I could not find any examples on how to interface to the positioning with c (or any other language either, bummer...)
I haven't tried this my self, but I think that's done with QtPositioning.
 
Reply


 
Forum Jump


All times are GMT. The time now is 10:06.