![]() |
2014-04-27
, 09:15
|
Posts: 33 |
Thanked: 32 times |
Joined on Nov 2007
@ Finland
|
#71
|
![]() |
2014-04-27
, 09:32
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#72
|
[root@Jolla ~]# hcitool con|awk '{print $3}'|grep -v '^$' 00:26:7E:0A:17:84 [root@Jolla ~]#
[root@Jolla ~]# address=$(hcitool con|awk '{print $3}'|grep -v '^$') [root@Jolla ~]# hcitool name $address Parrot Minikit Slim v1.31 [root@Jolla ~]#
|
2014-05-29
, 21:56
|
Guest |
Posts: n/a |
Thanked: 0 times |
Joined on
|
#73
|
![]() |
2014-05-29
, 22:08
|
Posts: 2,076 |
Thanked: 3,268 times |
Joined on Feb 2011
|
#74
|
Could I use DBUS to automagically start the mediaplayer after headset is inserted? What would be needed to achieve this? Any ideas?
|
2014-05-30
, 08:31
|
Guest |
Posts: n/a |
Thanked: 0 times |
Joined on
|
#75
|
![]() |
2014-05-30
, 10:13
|
Community Council |
Posts: 4,920 |
Thanked: 12,867 times |
Joined on May 2012
@ Southerrn Finland
|
#76
|
Sorry, I should have been more precise. I meant headphone, not headset. I can live with the fact that my headset's buttons are not supported, but I would like to automatically start the mediaplayer (maybe even start playback) when plugging in the headset/headphone.
Just started dbus-monitor to see if anything happens when music plays and I unplug the headphone. Thought this could give me a hint how to achieve the opposite, but nothing was thrown to the output when the music stopped after unplugging... now I'm out of ideas... can anybody help?
The Following User Says Thank You to juiceme For This Useful Post: | ||
![]() |
2014-05-30
, 11:11
|
Posts: 2,076 |
Thanked: 3,268 times |
Joined on Feb 2011
|
#77
|
Sorry, I should have been more precise. I meant headphone, not headset. I can live with the fact that my headset's buttons are not supported, but I would like to automatically start the mediaplayer (maybe even start playback) when plugging in the headset/headphone.
Just started dbus-monitor to see if anything happens when music plays and I unplug the headphone. Thought this could give me a hint how to achieve the opposite, but nothing was thrown to the output when the music stopped after unplugging... now I'm out of ideas... can anybody help?
dbus-monitor --system "type=signal, interface=com.nokia.policy, member=audio_actions" | while read -r line; do if echo $line | grep "string \"hs\""; then /usr/bin/jolla-mediaplayer fi done
|
2014-05-30
, 11:32
|
Guest |
Posts: n/a |
Thanked: 0 times |
Joined on
|
#78
|
|
2014-05-30
, 12:11
|
Guest |
Posts: n/a |
Thanked: 0 times |
Joined on
|
#79
|
dbus-monitor --system "type=signal, interface=com.nokia.policy" | while read -r line; do if echo $line | grep "string \"headphone\""; then /usr/bin/jolla-mediaplayer fi done
![]() |
2014-07-26
, 22:54
|
Posts: 9 |
Thanked: 11 times |
Joined on Apr 2009
|
#80
|
Anyone now how to get GPS-coordinates through dbus? Or some other simple way that can be used from a shell script?
import dbus, gi.repository.GObject as gobject import dbus.mainloop.glib as glib glib.DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() def myhandler(fields, timestamp, lat, lon, alt, acc): print "lat: %f lon: %f alt: %d acc: %d" % (lat, lon, alt, acc[1]) bus.add_signal_receiver(myhandler,"PositionChanged", "org.freedesktop.Geoclue.Position") loop = gobject.MainLoop() loop.run()