diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-01-04 14:43:15 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-01-05 15:06:40 -0800 |
commit | 4a00535fa3b3f8309cf38f53b92e0a4dd7333eee (patch) | |
tree | 9ac083fba14b83bdfc27be6380ce1417905da61c /emulator/vhci.h | |
parent | ac33d95d2944c089707eadbd2933442ceaeedab1 (diff) | |
download | bluez-4a00535fa3b3f8309cf38f53b92e0a4dd7333eee.tar.gz |
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 (limited to 'emulator/vhci.h')
-rw-r--r-- | emulator/vhci.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/emulator/vhci.h b/emulator/vhci.h index a601d3934..c42e8bde1 100644 --- a/emulator/vhci.h +++ b/emulator/vhci.h @@ -27,3 +27,4 @@ int vhci_set_force_suspend(struct vhci *vhci, bool enable); int vhci_set_force_wakeup(struct vhci *vhci, bool enable); int vhci_set_msft_opcode(struct vhci *vhci, uint16_t opcode); int vhci_set_aosp_capable(struct vhci *vhci, bool enable); +int vhci_set_emu_opcode(struct vhci *vhci, uint16_t opcode); |