maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Tinkering with DBus on Jolla (https://talk.maemo.org/showthread.php?t=92303)

jukkar 2014-03-05 18:13

Re: Tinkering with DBus on Jolla
 
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 2014-03-05 21:50

Re: Tinkering with DBus on Jolla
 
Quote:

Originally Posted by jukkar (Post 1415576)
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 :D
I did do some progresss though.

Quote:

Originally Posted by jukkar (Post 1415576)
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!

taixzo 2014-04-02 06:42

Re: Tinkering with DBus on Jolla
 
Any idea how to set an alarm via DBus?

evk 2014-04-16 18:50

Re: Tinkering with DBus on Jolla
 
Anyone now how to get GPS-coordinates through dbus? Or some other simple way that can be used from a shell script?

juiceme 2014-04-16 19:52

Re: Tinkering with DBus on Jolla
 
Quote:

Originally Posted by evk (Post 1421625)
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...

evk 2014-04-17 06:01

Re: Tinkering with DBus on Jolla
 
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.

juiceme 2014-04-17 10:03

Re: Tinkering with DBus on Jolla
 
Quote:

Originally Posted by evk (Post 1421659)
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 :(

HolgerN 2014-04-17 10:07

Re: Tinkering with DBus on Jolla
 
There is Rena: https://github.com/Simoma/rena. I did not try it with running, but it save tracks in GPX format.

rannari 2014-04-17 14:49

Re: Tinkering with DBus on Jolla
 
Quote:

Originally Posted by juiceme (Post 1421684)
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.

evk 2014-04-17 15:49

Re: Tinkering with DBus on Jolla
 
Quote:

Originally Posted by juiceme (Post 1421684)
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.


All times are GMT. The time now is 12:40.

vBulletin® Version 3.8.8