Notices


Reply
Thread Tools
OVK's Avatar
Posts: 559 | Thanked: 1,017 times | Joined on May 2008 @ Finland
#41
Originally Posted by Bec View Post
Honestly, no. What was working in symbian programs like "MagicKey" was probably the dependency on a dbus-like feature in symbian.

Simply expecting an input in dbus doesn't work without a special application, like in our case the phone application.

But the most authorized person on this matter, is obviously qwerty12 (see first post) so you should ask him.
Did you check the headphoned app that I linked? It is for Maemo 5 and already sends one command (pause) to Mediaplayer.
 
andrei1089's Avatar
Posts: 81 | Thanked: 109 times | Joined on Apr 2009 @ Brasov/Cluj, Romania
#42
Originally Posted by OVK View Post
Did you check the headphoned app that I linked? It is for Maemo 5 and already sends one command (pause) to Mediaplayer.
The problem is not to send a pause message to Mediaplayer, but to catch the signal emitted when the button on the headset is pressed.
 
OVK's Avatar
Posts: 559 | Thanked: 1,017 times | Joined on May 2008 @ Finland
#43
Originally Posted by andrei1089 View Post
The problem is not to send a pause message to Mediaplayer, but to catch the signal emitted when the button on the headset is pressed.
Yes. I was just thinking that because headphoned is already listening to the headphone state it could probably also be used (after some modifications) also to see if some signals are emitted from headphones.

If I am correct the phone app is listening (or the incoming/outgoing call awakes something that is listening) to the signals from the AV connector (it has to be, otherwise the call ending button would not work). I think it should be possible to make also other apps to sense the button presses. I thought that headphoned would have been a logical place to start the investigations/additions.

I asked thp, the author of the headphoned, in other thread if I have understood his app correctly.
 
OVK's Avatar
Posts: 559 | Thanked: 1,017 times | Joined on May 2008 @ Finland
#44
OK, I thought this a bit more and I think that I probably should clarify my thinking so that there is no misunderstandings.

As I see this, there are two things that are needed:
1. Button presses need to sensed by N900
2. Presses need to be translated to commands for Mediaplayer

For the requirement number 1:
As we now from dbus-monitor, in the normal state N900 does not sense the button presses from the headset. However, the call can be ended by the button press of the default headset. Now: what is awake and listening to the AV plug in this state? What awakes it (phone app or just incoming/outgoing call) How do we awake it without turning on the Phone app?

For the requirement number 2:
The headphoned also sends commands to Mediaplayer. I think that it would be relatively easy to expand the functionality to also send other commands. First we just need to find out what kind of signals different headsets send to N900. If I am correct, this could be probably found out with dbus-monitor when we first find out how to make the N900 aware of the button presses.

Does this make any sense to you more experienced users? Is there something that simply just cannot be done for some reason (technical limitation, I am suggesting wrong methods...).

After all, I am not a programmer, just a typical end user.
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#45
At least on Maemo 5 the headset button was exposed as a hal input device at /org/freedesktop/Hal/devices/platform_retu_headset_logicaldev_input

Check out the Panucci source for how it's used there (search for headset_button):

http://nikosapi.org/git/panucci/tree...usinterface.py
http://nikosapi.org/git/panucci/tree...cci/panucci.py

Edit: After reading the whole thread, it seems like this is not working anymore on the N900..

Last edited by thp; 2010-01-19 at 17:37.
 

The Following 2 Users Say Thank You to thp For This Useful Post:
Posts: 296 | Thanked: 47 times | Joined on Oct 2009
#46
I haven't read the whole thread....but is it possible to write a driver for the remote included with the N95 ?
 
Bec's Avatar
Posts: 876 | Thanked: 396 times | Joined on Dec 2009
#47
We would like to address any headset model. Unfortunately receiving the signal from the headset is quite complicated.

Vote for this (see the link in my signature) to give this request more priority for developing.
__________________
 
Posts: 2 | Thanked: 4 times | Joined on Oct 2009
#48
Judging by Bec's dumps and having a quick look at the original code, it looks like the HID device for the headset changed from platform_retu_headset_logicaldev_input on pre N900 to computer_logicaldev_input_1 , which would stop the original code working.

Running something like this python script hacked from the code in kagu[1] would confirm this change, and what to listen for in an updated version of headset-control, or some new app: http://gist.github.com/289070

I also don't see any button messages in the dbus-monitor dump, however I'm not sure how dbus works - maybe items like this which are 'watched' won't show there?

Note this is just a theory, and untested - I don't have access to a N900 or know anything about dbus, just interested in buying one and concerned about getting the button to work with the media player!

([1] http://kagumedia.com/projects/kagu/b.../kagu/maemo.py)
 

The Following 3 Users Say Thank You to lstoll For This Useful Post:
andrei1089's Avatar
Posts: 81 | Thanked: 109 times | Joined on Apr 2009 @ Brasov/Cluj, Romania
#49
Originally Posted by lstoll View Post
Judging by Bec's dumps and having a quick look at the original code, it looks like the HID device for the headset changed from platform_retu_headset_logicaldev_input on pre N900 to computer_logicaldev_input_1 , which would stop the original code working.

Running something like this python script hacked from the code in kagu[1] would confirm this change, and what to listen for in an updated version of headset-control, or some new app: http://gist.github.com/289070

I also don't see any button messages in the dbus-monitor dump, however I'm not sure how dbus works - maybe items like this which are 'watched' won't show there?

Note this is just a theory, and untested - I don't have access to a N900 or know anything about dbus, just interested in buying one and concerned about getting the button to work with the media player!

([1] http://kagumedia.com/projects/kagu/b.../kagu/maemo.py)
I've tried something similar with your code but didn't work. In fact it worked only during a phone call, so the phone application somehow activates the button.
 

The Following 2 Users Say Thank You to andrei1089 For This Useful Post:
Posts: 2 | Thanked: 4 times | Joined on Oct 2009
#50
Originally Posted by andrei1089 View Post
I've tried something similar with your code but didn't work. In fact it worked only during a phone call, so the phone application somehow activates the button.
Interesting, so you received the click messages on dbus when the phone app was running? Did you have to be in a call for them to show up, or was just the app running sufficient?

Also, can anyone confirm if the button works to end skype and gtalk calls as well?

Trying to work out which part of the comm stack this is all happening..

Oh and lastly, what package does the phone ui app belong to? I've poked around in the repository an managed to find the translations, but not the binary itself.

Maybe I should just go down and buy one, will make this much easier.
 

The Following User Says Thank You to lstoll For This Useful Post:
Reply

Tags
ad-54/hs-45, headset button


 
Forum Jump


All times are GMT. The time now is 05:55.