* [PATCH 1/3] android/hog: Write all report characteristics for bt_hog_send
@ 2014-07-01 13:44 Grzegorz Kolodziejczyk
2014-07-01 13:44 ` [PATCH 2/3] android/pts: Update PIXIT for HOGP Grzegorz Kolodziejczyk
2014-07-01 13:44 ` [PATCH 3/3] android/pts: Update HOGP tests result Grzegorz Kolodziejczyk
0 siblings, 2 replies; 4+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-07-01 13:44 UTC (permalink / raw)
To: linux-bluetooth
This allows to write all hog report characeteristics (input, output,
feature). This is only test command designed for test purposes
e.g. PTS Write Report Characteristics.
---
android/hog.c | 39 +++++++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/android/hog.c b/android/hog.c
index 319cb2a..019cd57 100644
--- a/android/hog.c
+++ b/android/hog.c
@@ -1039,31 +1039,26 @@ int bt_hog_set_control_point(struct bt_hog *hog, bool suspend)
return 0;
}
-int bt_hog_send(struct bt_hog *hog, void *data, size_t size)
+static int write_report(struct bt_hog *hog, void *data, size_t size,
+ int report_type)
{
struct report *report;
GSList *l;
- if (!hog)
- return -EINVAL;
-
- if (!hog->attrib)
- return -ENOTCONN;
-
- l = g_slist_find_custom(hog->reports,
- GUINT_TO_POINTER(HOG_REPORT_TYPE_OUTPUT),
- report_type_cmp);
+ l = g_slist_find_custom(hog->reports, GUINT_TO_POINTER(report_type),
+ report_type_cmp);
if (!l)
return -ENOTSUP;
report = l->data;
- DBG("Sending data to handle 0x%X", report->decl->value_handle);
+ DBG("hog: Write report, handle 0x%X", report->decl->value_handle);
if (report->decl->properties & GATT_CHR_PROP_WRITE)
gatt_write_char(hog->attrib, report->decl->value_handle,
data, size, output_written_cb, hog);
- else if (report->decl->properties & GATT_CHR_PROP_WRITE_WITHOUT_RESP)
+
+ if (report->decl->properties & GATT_CHR_PROP_WRITE_WITHOUT_RESP)
gatt_write_cmd(hog->attrib, report->decl->value_handle,
data, size, NULL, NULL);
@@ -1075,3 +1070,23 @@ int bt_hog_send(struct bt_hog *hog, void *data, size_t size)
return 0;
}
+
+int bt_hog_send(struct bt_hog *hog, void *data, size_t size)
+{
+ if (!hog)
+ return -EINVAL;
+
+ if (!hog->attrib)
+ return -ENOTCONN;
+
+ if (write_report(hog, data, size, HOG_REPORT_TYPE_OUTPUT) < 0)
+ error("hog: can't write output report: %s", strerror(ENOTSUP));
+
+ if (write_report(hog, data, size, HOG_REPORT_TYPE_INPUT) < 0)
+ error("hog: can't write input report: %s", strerror(ENOTSUP));
+
+ if (write_report(hog, data, size, HOG_REPORT_TYPE_FEATURE) < 0)
+ error("hog: can't write feature report: %s", strerror(ENOTSUP));
+
+ return 0;
+}
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] android/pts: Update PIXIT for HOGP
2014-07-01 13:44 [PATCH 1/3] android/hog: Write all report characteristics for bt_hog_send Grzegorz Kolodziejczyk
@ 2014-07-01 13:44 ` Grzegorz Kolodziejczyk
2014-07-01 13:44 ` [PATCH 3/3] android/pts: Update HOGP tests result Grzegorz Kolodziejczyk
1 sibling, 0 replies; 4+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-07-01 13:44 UTC (permalink / raw)
To: linux-bluetooth
This changes write report data.
---
android/pixit-hogp.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/android/pixit-hogp.txt b/android/pixit-hogp.txt
index 4fe1e0f..20ec723 100644
--- a/android/pixit-hogp.txt
+++ b/android/pixit-hogp.txt
@@ -21,8 +21,8 @@ TSPX_pin_code 0000
TSPX_use_dynamic_pin FALSE
TSPX_delete_ltk FALSE
TSPX_security_enabled TRUE
-TSPX_input_report_data CDA6F8B3AA
-TSPX_output_report_data 001234567890EF
-TSPX_feature_report_data 872D3F45EA
+TSPX_input_report_data 0123ABA2 (*)
+TSPX_output_report_data 4567CDA2 (*)
+TSPX_feature_report_data 8901EFA2 (*)
TSPX_tester_appearance 03C0
-------------------------------------------------------------------------------
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] android/pts: Update HOGP tests result
2014-07-01 13:44 [PATCH 1/3] android/hog: Write all report characteristics for bt_hog_send Grzegorz Kolodziejczyk
2014-07-01 13:44 ` [PATCH 2/3] android/pts: Update PIXIT for HOGP Grzegorz Kolodziejczyk
@ 2014-07-01 13:44 ` Grzegorz Kolodziejczyk
1 sibling, 0 replies; 4+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-07-01 13:44 UTC (permalink / raw)
To: linux-bluetooth
Test results for write report characteristic update.
---
android/pts-hogp.txt | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/android/pts-hogp.txt b/android/pts-hogp.txt
index 39b954c..6bb21c7 100644
--- a/android/pts-hogp.txt
+++ b/android/pts-hogp.txt
@@ -54,10 +54,18 @@ TC_HGRF_BH_BV_15_I N/A
TC_HGRF_BH_BV_16_I N/A
TC_HGRF_BH_BV_17_I N/A
TC_HGRF_HH_BV_18_I N/A
-TC_HGWF_RH_BV_01_I INC
-TC_HGWF_RH_BV_02_I INC
-TC_HGWF_RH_BV_03_I INC
-TC_HGWF_RH_BV_04_I INC
+TC_HGWF_RH_BV_01_I PASS haltest: hidhost connect <addr>
+ hidhost send_data AB2301
+ hidhost disconnect <addr>
+TC_HGWF_RH_BV_02_I PASS haltest: hidhost connect <addr>
+ hidhost send_data CD6745
+ hidhost disconnect <addr>
+TC_HGWF_RH_BV_03_I PASS haltest: hidhost connect <addr>
+ hidhost send_data CD6745
+ hidhost disconnect <addr>
+TC_HGWF_RH_BV_04_I PASS haltest: hidhost connect <addr>
+ hidhost send_data EF0189
+ hidhost disconnect <addr>
TC_HGWF_RH_BV_05_I N/A
TC_HGWF_RH_BV_06_I N/A
TC_HGWF_RH_BV_07_I N/A
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] android/pts: Update HOGP tests result
2014-07-02 7:58 [PATCH 1/3] android/hog: Add bt_hog_send_report Szymon Janc
@ 2014-07-02 7:58 ` Szymon Janc
0 siblings, 0 replies; 4+ messages in thread
From: Szymon Janc @ 2014-07-02 7:58 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Grzegorz Kolodziejczyk
From: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Test results for write report characteristic update.
---
android/pts-hogp.txt | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/android/pts-hogp.txt b/android/pts-hogp.txt
index 39b954c..965ed33 100644
--- a/android/pts-hogp.txt
+++ b/android/pts-hogp.txt
@@ -54,10 +54,22 @@ TC_HGRF_BH_BV_15_I N/A
TC_HGRF_BH_BV_16_I N/A
TC_HGRF_BH_BV_17_I N/A
TC_HGRF_HH_BV_18_I N/A
-TC_HGWF_RH_BV_01_I INC
-TC_HGWF_RH_BV_02_I INC
-TC_HGWF_RH_BV_03_I INC
-TC_HGWF_RH_BV_04_I INC
+TC_HGWF_RH_BV_01_I PASS haltest: hidhost connect <addr>
+ hidhost set_report <addr> BTHH_INPUT_REPORT
+ AAB3F8A6CD
+ hidhost disconnect <addr>
+TC_HGWF_RH_BV_02_I PASS haltest: hidhost connect <addr>
+ hidhost set_report <addr> BTHH_OUTPUT_REPORT
+ EF907856341200
+ hidhost disconnect <addr>
+TC_HGWF_RH_BV_03_I PASS haltest: hidhost connect <addr>
+ hidhost set_report <addr> BTHH_OUTPUT_REPORT
+ EF907856341200
+ hidhost disconnect <addr>
+TC_HGWF_RH_BV_04_I PASS haltest: hidhost connect <addr>
+ hidhost set_report <addr> BTHH_FEATURE_REPORT
+ EA453F2D87
+ hidhost disconnect <addr>
TC_HGWF_RH_BV_05_I N/A
TC_HGWF_RH_BV_06_I N/A
TC_HGWF_RH_BV_07_I N/A
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-02 7:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-01 13:44 [PATCH 1/3] android/hog: Write all report characteristics for bt_hog_send Grzegorz Kolodziejczyk
2014-07-01 13:44 ` [PATCH 2/3] android/pts: Update PIXIT for HOGP Grzegorz Kolodziejczyk
2014-07-01 13:44 ` [PATCH 3/3] android/pts: Update HOGP tests result Grzegorz Kolodziejczyk
2014-07-02 7:58 [PATCH 1/3] android/hog: Add bt_hog_send_report Szymon Janc
2014-07-02 7:58 ` [PATCH 3/3] android/pts: Update HOGP tests result Szymon Janc
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.