From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4657DD73.4030501@internode.on.net> Date: Sat, 26 May 2007 17:10:43 +1000 From: Marcus Brown MIME-Version: 1.0 To: BlueZ development Content-Type: multipart/mixed; boundary="------------010207080100060307020302" Subject: [Bluez-devel] ring_and_wait_for_button patch for headsetd Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net This is a multi-part message in MIME format. --------------010207080100060307020302 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------010207080100060307020302 Content-Type: application/x-gzip; name="ring_and_wait_for_button.patch.gz" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="ring_and_wait_for_button.patch.gz" H4sICGPWV0YAA3JpbmdfYW5kX3dhaXRfZm9yX2J1dHRvbi5wYXRjaAC1WWlz20YS/Uz+il6m 4iJN8NRhHZHXCkVZqtCkSpST3UpcKBA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xJNhjIczzE3yH3P5IgrQMarvYk2JM+DGYesEwNzYKZpLXLdopHjaUhKZoAQ5 ZNOy+yylp2rGj50UdzPF1mPYuvkdBRfhxZ7mscjN589Ox1TexjYl/mENfALluswCumMZRE5h JsKR8/dA1rtlXUL1xwq8hRHOCQVyM20Lnh8TPE4GcRRSYw5Ska2dIUe6u6CYYIr1PEAw00nv yrnD94SnC98s6xQRvC6cSyO4A1caOz3UwbkixLhAOnwnH/Koc2tciL484B7Ta5R6TOIRRqgC vTFkvK6hv6ajb5QdNBGjLQ2JVByRbgMRkG30xGWJo3mAe+BlnZHUKAuBqtmmz/dm8iydPU3t et2x9vmZ9JHK/+twSh2jbpAANsGryWh08fkK/gT6hPW+8WBYcH0nwXCdz1ny607/ix4r0Lt0 ZDYzRr1ujtFYXG5fakRalZUdufXXBrSgZ+GeDd11tffMriT5ZT1BmDyzHWkTNw72vqLO9eRA +Zli+AqRLpmO6pWD3yn5JOZYnAof6o5cNrLM+kZTJoFBmICHeHqeV6h+mPwsEimGYzYmCsnj eN1MHvSwYiw+CLISRyNyIrEd0dPEE13yqCZadDHmYTjUAaDFKhsHy+uftbvwNgXF5djKhQY3 o5eFii7Pb+NduFf7J3lk0/PEkydTKRc2z6qUcNmjMyWI9mAWZ38nm4dDJSPNgXxDZuO4rkQX +cG2THR97M2EX3580LxfPznNH/CsHyE8++SMeUMyr/SE673qlw1/yx8Y/G1/2fDpl4j9Vq/f 6h9Af+dor3+0c/A//LLhb/3Lxt6uepCTPXlEplkSQVlqFA4qz4ldOcWnT88Irp9nZiXhGeGN h1rPSRaKzHNyE2z722mcSsyf5Vr2L/HU43AGGwAA --------------010207080100060307020302 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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/ --------------010207080100060307020302 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --------------010207080100060307020302--