misiak
|
2012-06-14
, 15:55
|
Posts: 804 |
Thanked: 1,598 times |
Joined on Feb 2010
@ Gdynia, Poland
|
#11
|
|
2012-06-20
, 14:18
|
Posts: 1,424 |
Thanked: 2,623 times |
Joined on Jan 2011
@ Touring
|
#12
|
|
2012-06-20
, 14:22
|
Posts: 804 |
Thanked: 1,598 times |
Joined on Feb 2010
@ Gdynia, Poland
|
#13
|
|
2012-06-20
, 14:38
|
Posts: 482 |
Thanked: 550 times |
Joined on Oct 2010
|
#14
|
I have C code which detects wired headset button presses. I need to:
1. Clean it up a bit (it's modified headset-control source)
2. Translate it to Python
3. Find someone to test it with bluetooth headsets.
Do you have bluetooth headset? If you do, you may try to install headset-button-enabler and headset-control from extras-devel and chceck if it works (it should start/stop music in stock media player when button is pressed - try long press, with my cheap wired headset I need to hold the button for 1-2 seconds before it's noticed by the phone)
|
2012-06-20
, 14:41
|
Posts: 804 |
Thanked: 1,598 times |
Joined on Feb 2010
@ Gdynia, Poland
|
#15
|
sudo gainroot apt-get install headset-button-enabler headset-control
The Following User Says Thank You to misiak For This Useful Post: | ||
|
2012-06-20
, 15:04
|
Posts: 1,424 |
Thanked: 2,623 times |
Joined on Jan 2011
@ Touring
|
#16
|
|
2012-06-20
, 15:48
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#17
|
I have C code which detects wired headset button presses. I need to:
1. Clean it up a bit (it's modified headset-control source)
2. Translate it to Python
3. Find someone to test it with bluetooth headsets.
Do you have bluetooth headset? If you do, you may try to install headset-button-enabler and headset-control from extras-devel and chceck if it works (it should start/stop music in stock media player when button is pressed - try long press, with my cheap wired headset I need to hold the button for 1-2 seconds before it's noticed by the phone)
The Following User Says Thank You to marmistrz For This Useful Post: | ||
|
2012-06-20
, 16:32
|
Posts: 87 |
Thanked: 46 times |
Joined on Nov 2010
@ lisbon, portugal
|
#18
|
|
2012-06-20
, 17:16
|
Posts: 804 |
Thanked: 1,598 times |
Joined on Feb 2010
@ Gdynia, Poland
|
#19
|
Ok. Firts of all I have Nokia BH-111 BT headset.
all buttons work fine and control the device (media player - play/pause /next / prev) and phone (accept call & redial)
Doing some tests with dbus-monitor up:
Nokia-N900:~# dbus-monitor --system
signal sender=org.freedesktop.DBus -> dest=:1.529 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.529"
signal sender=:1.12 -> dest=(null destination) serial=3995 path=/org/freedesktop/Hal/devices/computer_logicaldev_input_1; interface=org.freedesktop.Hal.Device; member=Condition
string "ButtonPressed"
string "play-cd"
signal sender=:1.48 -> dest=(null destination) serial=751 path=/com/nokia/tklock/signal; interface=com.nokia.tklock.signal; member=mm_key_press
uint32 208
uint32 269025044
signal sender=:1.12 -> dest=(null destination) serial=4032 path=/org/freedesktop/Hal/devices/computer_logicaldev_input_1; interface=org.freedesktop.Hal.Device; member=Condition
string "ButtonPressed"
string "next-song"
signal sender=:1.48 -> dest=(null destination) serial=760 path=/com/nokia/tklock/signal; interface=com.nokia.tklock.signal; member=mm_key_press
uint32 171
uint32 269025047
signal sender=:1.12 -> dest=(null destination) serial=4033 path=/org/freedesktop/Hal/devices/computer_logicaldev_input_1; interface=org.freedesktop.Hal.Device; member=Condition
string "ButtonPressed"
string "previous-song"
signal sender=:1.48 -> dest=(null destination) serial=761 path=/com/nokia/tklock/signal; interface=com.nokia.tklock.signal; member=mm_key_press
uint32 173
uint32 269025046
signal sender=:1.18 -> dest=(null destination) serial=6451 path=/com/nokia/csd/call; interface=com.nokia.csd.Call; member=CreateRequested
string "xxxTELNUMBER010"
uint32 0
signal sender=:1.18 -> dest=(null destination) serial=6452 path=/com/nokia/csd/call; interface=com.nokia.csd.Call; member=ServerStatus
boolean true
boolean false
signal sender=:1.18 -> dest=(null destination) serial=6453 path=/com/nokia/csd/call; interface=com.nokia.csd.Call; member=Created
object path "/com/nokia/csd/call/1"
string "xxxTELNUMBER010"
As you can see, dbus catches button press for headset play button, next and prev buttons.
Unfortunantly, it seems that it's not catching the "redial" or "answer/reject" button or they just dont generate dbus events...
signal sender=:1.12 -> dest=(null destination) serial=3995 path=/org/freedesktop/Hal/devices/computer_logicaldev_input_1; interface=org.freedesktop.Hal.Device; member=Condition string "ButtonPressed" string "play-cd"
|
2012-06-22
, 13:25
|
Posts: 87 |
Thanked: 46 times |
Joined on Nov 2010
@ lisbon, portugal
|
#20
|