Parent: ac33d95d2944c089707eadbd2933442ceaeedab1
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2022-01-06 01:06:40
Tree: 9ac083fba14b83bdfc27be6380ce1417905da61c
emulator: Add support for vendor commands This adds support for vendor commands reserving a single opcode (0xfc10) so it can be extended using subcommands, similar to how MSFT works. The first subcommand (0x00) enables the emulator to generate arbitrary events using the commands parameters: > tools/hcitool cmd 3f 10 00 22 24 d0 d0 d0 d0 d0 d0 ff ff < HCI Command: Vendor (0x3f|0x0010) plen 11 00 22 24 d0 d0 d0 d0 d0 d0 ff ff ."$........ Bluetooth: hci0: Malformed HCI Event: 0x22 > HCI Event: Inquiry Result with R.. (0x22) plen 9 Num responses: 36 Page scan repetition mode: Reserved (0xff) Page period mode: Reserved (0xff) Class: 0xffffd0 Major class: Uncategorized, specific device code not specified Minor class: 0x34 Limited Discoverable Mode invalid service class Clock offset: 0x6368 RSSI: 105 dBm (0x69) > HCI Event: Command Complete (0x0e) plen 4 Vendor (0x3f|0x0010) ncmd 1 Status: Success (0x00)
Diffstat
| M | Makefile.tools | | | 2 | +- |
| M | emulator/btdev.c | | | 68 | ++++++++++++++++++++++++++++++++++++++++- - - - - - - - |
| M | emulator/btdev.h | | | 1 | + |
| M | emulator/main.c | | | 1 | + |
| M | emulator/vhci.c | | | 5 | +++++ |
| M | emulator/vhci.h | | | 1 | + |
| A | monitor/emulator.h | | | 18 | ++++++++++++++++++ |
7 files changed, 87 insertions(+), 9 deletions(-)