summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2015-05-14 12:50:28 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2015-05-17 10:39:00 +0300
commitf41312b893d017f4ea2e85b9bb0a06f60ecd7516 (patch)
treefb1b05e5fd0e3e56a32679e6626fb01aafe9ffce /android
parentcf8c7401a0caa237824c2adcdfb428b304a9984e (diff)
downloadbluez-f41312b893d017f4ea2e85b9bb0a06f60ecd7516.tar.gz
emulator/bthost: Add support for setting custom ADV data
This allows to set any ADV data and not just flags.
Diffstat (limited to 'android')
-rw-r--r--android/tester-main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/android/tester-main.c b/android/tester-main.c
index 25065482f..19400fc2e 100644
--- a/android/tester-main.c
+++ b/android/tester-main.c
@@ -2719,8 +2719,17 @@ void emu_setup_powered_remote_action(void)
bthost_set_cmd_complete_cb(bthost, emu_connectable_complete, data);
if ((data->hciemu_type == HCIEMU_TYPE_LE) ||
- (data->hciemu_type == HCIEMU_TYPE_BREDRLE))
- bthost_set_adv_enable(bthost, 0x01, 0x02);
+ (data->hciemu_type == HCIEMU_TYPE_BREDRLE)) {
+ uint8_t adv[4];
+
+ adv[0] = 0x02; /* Field length */
+ adv[1] = 0x01; /* Flags */
+ adv[2] = 0x02; /* Flags value */
+ adv[3] = 0x00; /* Field terminator */
+
+ bthost_set_adv_data(bthost, adv, sizeof(adv));
+ bthost_set_adv_enable(bthost, 0x01);
+ }
if (data->hciemu_type != HCIEMU_TYPE_LE)
bthost_write_scan_enable(bthost, 0x03);