public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* Battery information
@ 2009-11-06 18:56 Bastien Nocera
  2009-11-06 19:58 ` Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien Nocera @ 2009-11-06 18:56 UTC (permalink / raw)
  To: BlueZ development

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

Hello,

A colleague has a Samsung WEP470 headset which triggers an error from
bluetoothd.

Attached is a minimal patch to avoid the error. Would be nice if we
could export that property through bluetoothd.

Cheers

Nov  6 10:27:57 luminos bluetoothd[4848]: link_key_notify
(sba=00:1C:26:F5:21:BB
, dba=00:0D:E6:A6:99:7B, type=0)
Nov  6 10:27:57 luminos bluetoothd[4848]: Stopping discovery
Nov  6 10:27:58 luminos bluetoothd[4848]: Stopping discovery
Nov  6 10:27:58 luminos rtkit-daemon[1606]: Sucessfully made thread 4893 of proc
ess 3010 (/usr/bin/pulseaudio) owned by '500' RT at priority 5.
Nov  6 10:27:58 luminos bluetoothd[4848]: Badly formated or unrecognized command
: AT+CBC=99
Nov  6 10:29:15 luminos bluetoothd[4848]: Software caused connection abort (103)
Nov  6 10:29:15 luminos pulseaudio[3010]: module-bluetooth-device.c: Failed to w
rite data to SCO socket: Transport endpoint is not connected
Nov  6 10:29:59 luminos bluetoothd[4848]: Disconnected from 00:0D:E6:A6:99:7B, /
org/bluez/4847/hci0/dev_00_0D_E6_A6_99_7B

[-- Attachment #2: 0001-Avoid-errors-when-audio-headset-tells-us-its-battery.patch --]
[-- Type: text/x-patch, Size: 984 bytes --]

>From 6e9f62f7251086f09d476d3fce9090e3d22acf63 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 6 Nov 2009 18:49:53 +0000
Subject: [PATCH] Avoid errors when audio headset tells us its battery charge

Like the Samsung WEP470 does.
---
 audio/headset.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/audio/headset.c b/audio/headset.c
index cf1ae61..36a84c2 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1132,6 +1132,11 @@ static int nr_and_ec(struct audio_device *device, const char *buf)
 	return 0;
 }
 
+static int battery_event(struct audio_device *device, const char *buf)
+{
+	return 0;
+}
+
 static struct event event_callbacks[] = {
 	{ "ATA", answer_call },
 	{ "ATD", dial_number },
@@ -1152,6 +1157,7 @@ static struct event event_callbacks[] = {
 	{ "AT+CCWA", call_waiting_notify },
 	{ "AT+COPS", operator_selection },
 	{ "AT+NREC", nr_and_ec },
+	{ "AT+CBC", battery_event },
 	{ 0 }
 };
 
-- 
1.6.5.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-06 20:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-06 18:56 Battery information Bastien Nocera
2009-11-06 19:58 ` Johan Hedberg
2009-11-06 20:15   ` Bastien Nocera
2009-11-06 20:54     ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox