linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] ring_and_wait_for_button patch for headsetd
@ 2007-05-26  7:10 Marcus Brown
  0 siblings, 0 replies; only message in thread
From: Marcus Brown @ 2007-05-26  7:10 UTC (permalink / raw)
  To: BlueZ development

[-- Attachment #1: Type: text/plain, Size: 1450 bytes --]

Hi all,

Further to Brad's suggestion on #, I've had a go at
creating a patch for my mods to headsetd.

Please forgive the hackery, and the diff format, as I've
never played with C(*) on this level, or with diffs.
Hopefully somebody will find it of use.

The purpose of the patch is to add an extra ringing
state in the chain, and fork a ringer process. If the
headset button is pushed within the timeout (ringout)
then the connection state advances to the next level.

The idea being that I can have my headset (clip) in my
pocket, and use it for (spoken) alerts from my server.
When the server attempts to contact the headset, the
headset rings and will only send audio if the button is
pushed.

The timeout in ~/.asound needs to suit the maximum ring
time + connection delay ... I used 10000 (10 secs).

It does need cleaning up (in general), and has some
minor problems (button vs ring timing?), but works well
for me at the moment.

I wasn't able to figure out how to (properly) use dbus,
so I've used lock files in tmp. It would also be better
to use environment vars(?) to set things like ringout,
ring_enable, wait_for_button, etc ... but I guess that
will have to wait until I have need for it ;)

I'd like to be able to add vibrate support if possible,
but I'm not sure if the method I used to send RING is
also a good way to send +CVIB (or CVIB=1). Not sure if
it's my method or the headset at this stage, so advice
appreciated.


Marcus.

[-- Attachment #2: ring_and_wait_for_button.patch.gz --]
[-- Type: application/x-gzip, Size: 2352 bytes --]

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-26  7:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-26  7:10 [Bluez-devel] ring_and_wait_for_button patch for headsetd Marcus Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).