Active Topics

 



Notices


Reply
Thread Tools
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#11
Originally Posted by biketool View Post
Great, plenty of us really appreciate the work!
No problem I wanted to do that yesterday but I had planned hildon-desktop blacklisting tests (related to Meecolay development, for marmistrz) earlier and they took me more time than I thought - I will try to code something today, the C language example should be ready, I don't know if I will manage to finish the Python one today, but who knows
 

The Following 2 Users Say Thank You to misiak For This Useful Post:
Posts: 1,424 | Thanked: 2,622 times | Joined on Jan 2011 @ Touring
#12
Will this example will only work for the wired headset, or do you also know the output from a bluetooth headset answer button?
 
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#13
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 3 Users Say Thank You to misiak For This Useful Post:
Posts: 482 | Thanked: 550 times | Joined on Oct 2010
#14
Originally Posted by misiak View Post
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)
I have a bluetooth headset I could test this with.
 

The Following 3 Users Say Thank You to skykooler For This Useful Post:
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#15
Originally Posted by skykooler View Post
I have a bluetooth headset I could test this with.
Thank you. Could you do:
Code:
sudo gainroot
apt-get install headset-button-enabler headset-control
(if you are using FAM and have extras-devel configured in FAM, you can replace "apt-get" with "fapt-get") and check if it starts/stops music?
 

The Following User Says Thank You to misiak For This Useful Post:
Posts: 1,424 | Thanked: 2,622 times | Joined on Jan 2011 @ Touring
#16
Misiak,
Still waiting for my replacement N900
If I remember right headset-button-enabler headset-control did NOT control mediaplayer with the bluetooth even a one button in-ear unit, definately not with a BH-214.
I have to assume it is a very similar thing and the discovery or use would probably enable patching Skype to answer via BT aswell
 
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#17
Originally Posted by misiak View Post
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)
You can try cython, it's a C binding for Python iirc. I came across it while browsing extras-*
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following User Says Thank You to marmistrz For This Useful Post:
Posts: 87 | Thanked: 46 times | Joined on Nov 2010 @ lisbon, portugal
#18
steped up on this thread...



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...
__________________
-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
trlopes Active N900 User.

"when I feel the need to work ... I sit waiting for it to go away!!!"
 

The Following 3 Users Say Thank You to trlopes1974 For This Useful Post:
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#19
Originally Posted by trlopes1974 View Post
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...
Man, this log is golden. On my wired one-button headset I get lines similar to
Code:
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"
but the second string (after "ButtonPressed") is always "phone". What hapens if you press button which is used for answering a call (not prev/next/play)? Or it's the same button for playing and for calling?

Edit: if no "ButtonPressed" signal is emited then, could you try installing "headset-button-enabler", reboot device and check if it is emitted then?

Last edited by misiak; 2012-06-20 at 17:20.
 

The Following 2 Users Say Thank You to misiak For This Useful Post:
Posts: 87 | Thanked: 46 times | Joined on Nov 2010 @ lisbon, portugal
#20
Nokia-N900:~# dpkg -l | grep -i headset
ii headset-button-enabler 0.5 Enable wired headset button to be used outside of phone calls
ii headset-control 0.4 Daemon allowing control of Media Player with the wired headset button
ii maemo-statusmenu-headset 0.18+0m5 Headset status menu plugin

In my previous post:...
Unfortunantly, it seems that it's not catching the "redial" or "answer/reject" button or they just dont generate dbus events...
In this case the "phone" button
Yet, it works. if I press twice the "phone" button, n900 redials the last number. Yet no dbus-event is generated....
__________________
-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
trlopes Active N900 User.

"when I feel the need to work ... I sit waiting for it to go away!!!"
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:00.