I have searched all over the place and can't figure out how to do this. I
have a bluetooth headset connected to twinkle softphone. There are
commands available to send to twinkle, but with the new bluez drivers
(without btsco) I don't know how to get the button event. Can anyone help
> I screwed up the posting of this and made it part of a totally unrelated
> thread. So, Im posting it agin so that people might see it in proper
> order. Sorry. I'm new at mailing lists.
> I figured this one out all on my own! Here is a script in python that
> uses dbus to get the bluetooth headset button press. I think it might be
> helpful to add this to the wiki.
> def handler(sender=None):
> os.system ('/usr/bin/twinkle --cmd answerbye') # <- that's the
> specific to twinkle
> import dbus, os, gobject
> from dbus.mainloop.glib import DBusGMainLoop
> bus = dbus.SystemBus()
> bus.add_signal_receiver(handler, signal_name="AnswerRequested")
> loop = gobject.MainLoop()
> Original message:
> I have searched all over the place and can't figure out how to do this. I
> have a bluetooth headset connected to twinkle softphone. There are
> commands available to send to twinkle, but with the new bluez drivers
> (without btsco) I don't know how to get the button event. Can anyone help
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
After further work on this, I find that it's not working exactly right.
The python code above gets the signal correctly, but that doesn't help
when you are trying to answer a call. Terminating a call works fine,
because you are connected, but when a call is ringing in, there is no
connection so the signal event never is called. Anyone know of a way to
make this work?