2012-12-03 23:42:28

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH BlueZ] test: Add a HFP HF endpoint to simple-endpoint

---
test/simple-endpoint | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/test/simple-endpoint b/test/simple-endpoint
index 20c8159..79e38c7 100755
--- a/test/simple-endpoint
+++ b/test/simple-endpoint
@@ -11,6 +11,7 @@ import gobject
A2DP_SOURCE_UUID = "0000110A-0000-1000-8000-00805F9B34FB"
A2DP_SINK_UUID = "0000110B-0000-1000-8000-00805F9B34FB"
HFP_AG_UUID = "0000111F-0000-1000-8000-00805F9B34FB"
+HFP_HF_UUID = "0000111E-0000-1000-8000-00805F9B34FB"
HSP_AG_UUID = "00001112-0000-1000-8000-00805F9B34FB"

SBC_CODEC = dbus.Byte(0x00)
@@ -38,6 +39,8 @@ MP3_CONFIGURATION = dbus.Array([dbus.Byte(0x21), dbus.Byte(0x02), dbus.Byte(0x00
PCM_CODEC = dbus.Byte(0x00)
PCM_CONFIGURATION = dbus.Array([], signature="ay")

+CVSD_CODEC = dbus.Byte(0x01)
+
class Rejected(dbus.DBusException):
_dbus_error_name = "org.bluez.Error.Rejected"

@@ -120,6 +123,11 @@ if __name__ == '__main__':
"Codec" : PCM_CODEC,
"Capabilities" : PCM_CONFIGURATION })
endpoint.default_configuration(dbus.Array([]))
+ if sys.argv[2] == "hfphf":
+ properties = dbus.Dictionary({ "UUID" : HFP_HF_UUID,
+ "Codec" : CVSD_CODEC,
+ "Capabilities" : PCM_CONFIGURATION })
+ endpoint.default_configuration(dbus.Array([]))

print(properties)

--
1.8.0.1



2012-12-04 05:56:50

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH BlueZ] test: Add a HFP HF endpoint to simple-endpoint

Hi Vinicius,

On Mon, Dec 03, 2012, Vinicius Costa Gomes wrote:
> ---
> test/simple-endpoint | 8 ++++++++
> 1 file changed, 8 insertions(+)

Applied. Thanks.

Johan