* How do I get headset button events without .btscorc?
@ 2009-01-01 0:44 Dave Schile
0 siblings, 0 replies; 4+ messages in thread
From: Dave Schile @ 2009-01-01 0:44 UTC (permalink / raw)
To: linux-bluetooth
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
me?
Thanks,
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* How do I get headset button events without .btscorc?
2009-01-01 16:26 ` Steffen Pankratz
@ 2009-01-01 18:40 ` Dave Schile
0 siblings, 0 replies; 4+ messages in thread
From: Dave Schile @ 2009-01-01 18:40 UTC (permalink / raw)
To: linux-bluetooth
Hello.
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.
<pre>
def handler(sender=None):
os.system ('/usr/bin/twinkle --cmd answerbye') # <- that's the part
specific to twinkle
import dbus, os, gobject
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
bus.add_signal_receiver(handler, signal_name="AnswerRequested")
loop = gobject.MainLoop()
loop.run()
</pre>
Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
* How do I get headset button events without .btscorc?
@ 2009-01-01 19:30 Dave Schile
2009-01-02 4:48 ` Dave Schile
0 siblings, 1 reply; 4+ messages in thread
From: Dave Schile @ 2009-01-01 19:30 UTC (permalink / raw)
To: linux-bluetooth
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.
<pre>
def handler(sender=None):
os.system ('/usr/bin/twinkle --cmd answerbye') # <- that's the part
specific to twinkle
import dbus, os, gobject
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
bus.add_signal_receiver(handler, signal_name="AnswerRequested")
loop = gobject.MainLoop()
loop.run()
</pre>
Dave
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
me?
Thanks,
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How do I get headset button events without .btscorc?
2009-01-01 19:30 How do I get headset button events without .btscorc? Dave Schile
@ 2009-01-02 4:48 ` Dave Schile
0 siblings, 0 replies; 4+ messages in thread
From: Dave Schile @ 2009-01-02 4:48 UTC (permalink / raw)
To: Dave Schile; +Cc: linux-bluetooth
> 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.
>
> <pre>
>
> def handler(sender=None):
> os.system ('/usr/bin/twinkle --cmd answerbye') # <- that's the
> part
> specific to twinkle
> import dbus, os, gobject
> from dbus.mainloop.glib import DBusGMainLoop
> DBusGMainLoop(set_as_default=True)
> bus = dbus.SystemBus()
> bus.add_signal_receiver(handler, signal_name="AnswerRequested")
> loop = gobject.MainLoop()
> loop.run()
>
> </pre>
>
> Dave
>
> 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
> me?
>
> Thanks,
> David
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
hello,
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?
Thank you,
Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-02 4:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-01 19:30 How do I get headset button events without .btscorc? Dave Schile
2009-01-02 4:48 ` Dave Schile
-- strict thread matches above, loose matches on Subject: below --
2009-01-01 0:44 Dave Schile
2008-12-30 20:15 hci_usb problem after rmmod/modprobe Steffen Pankratz
2008-12-30 20:22 ` Marcel Holtmann
2008-12-31 9:43 ` Steffen Pankratz
2009-01-01 8:59 ` Marcel Holtmann
2009-01-01 16:26 ` Steffen Pankratz
2009-01-01 18:40 ` How do I get headset button events without .btscorc? Dave Schile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox