From 1939c1f2d59457c6a77b2cef483ed541939185d6 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 27 Jan 2013 05:20:57 +0100 Subject: [PATCH] unit: Add inquiry data from Nokia Reaction BH-907 headset for testing --- unit/test-eir.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/unit/test-eir.c b/unit/test-eir.c index af23cfd58..c143ac230 100644 --- a/unit/test-eir.c +++ b/unit/test-eir.c @@ -252,6 +252,48 @@ static const struct test_data gigaset_sl910_test = { .tx_power = 127, }; +static const unsigned char nokia_bh907_data[] = { + 0x16, 0x09, 0x4e, 0x6f, 0x6b, 0x69, 0x61, 0x20, + 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x42, 0x48, 0x2d, 0x39, 0x30, 0x37, 0x02, + 0x0a, 0x04, 0x0f, 0x02, 0x0d, 0x11, 0x0b, 0x11, + 0x0e, 0x11, 0x0f, 0x11, 0x1e, 0x11, 0x08, 0x11, + 0x31, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +static const struct test_data nokia_bh907_test = { + .eir_data = nokia_bh907_data, + .eir_size = sizeof(nokia_bh907_data), + .flags = -1, + .name = "Nokia Reaction BH-907", + .name_complete = TRUE, + .tx_power = 4, +}; + static const unsigned char fuelband_data[] = { 0x0f, 0x09, 0x4e, 0x69, 0x6b, 0x65, 0x2b, 0x20, 0x46, 0x75, 0x65, 0x6c, 0x42, 0x61, 0x6e, 0x64, @@ -443,6 +485,7 @@ int main(int argc, char *argv[]) g_test_add_data_func("/eir/ipadmini", &ipadmini_test, test_parsing); g_test_add_data_func("/eir/sl400h", &gigaset_sl400h_test, test_parsing); g_test_add_data_func("/eir/sl910", &gigaset_sl910_test, test_parsing); + g_test_add_data_func("/eir/bh907", &nokia_bh907_test, test_parsing); g_test_add_data_func("/eir/fuelband", &fuelband_test, test_parsing); g_test_add_data_func("/ad/bluesc", &bluesc_test, test_parsing); g_test_add_data_func("/ad/wahooscale", &wahoo_scale_test, test_parsing); -- 2.47.3