public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dave Schile" <dave@schile.com>
To: linux-bluetooth@vger.kernel.org
Subject: How do I get headset button events without .btscorc?
Date: Thu, 1 Jan 2009 12:30:00 -0700 (MST)	[thread overview]
Message-ID: <60678.209.216.239.242.1230838200.squirrel@webmail.ipns.com> (raw)

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



             reply	other threads:[~2009-01-01 19:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-01 19:30 Dave Schile [this message]
2009-01-02  4:48 ` How do I get headset button events without .btscorc? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60678.209.216.239.242.1230838200.squirrel@webmail.ipns.com \
    --to=dave@schile.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox