• Abhishek Pandit-Subedi's avatar
    Bluetooth: Add get/set device flags mgmt op · 4c54bf2b
    Abhishek Pandit-Subedi authored
    Add the get device flags and set device flags mgmt ops and the device
    flags changed event. Their behavior is described in detail in
    mgmt-api.txt in bluez.
    
    Sample btmon trace when a HID device is added (trimmed to 75 chars):
    
    @ MGMT Command: Unknown (0x0050) plen 11        {0x0001} [hci0] 18:06:14.98
            90 c5 13 cd f3 cd 02 01 00 00 00                 ...........
    @ MGMT Event: Unknown (0x002a) plen 15          {0x0004} [hci0] 18:06:14.98
            90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00     ...............
    @ MGMT Event: Unknown (0x002a) plen 15          {0x0003} [hci0] 18:06:14.98
            90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00     ...............
    @ MGMT Event: Unknown (0x002a) plen 15          {0x0002} [hci0] 18:06:14.98
            90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00     ...............
    @ MGMT Event: Command Compl.. (0x0001) plen 10  {0x0001} [hci0] 18:06:14.98
          Unknown (0x0050) plen 7
            Status: Success (0x00)
            90 c5 13 cd f3 cd 02                             .......
    @ MGMT Command: Add Device (0x0033) plen 8      {0x0001} [hci0] 18:06:14.98
            LE Address: CD:F3:CD:13:C5:90 (Static)
            Action: Auto-connect remote device (0x02)
    @ MGMT Event: Device Added (0x001a) plen 8      {0x0004} [hci0] 18:06:14.98
            LE Address: CD:F3:CD:13:C5:90 (Static)
            Action: Auto-connect remote device (0x02)
    @ MGMT Event: Device Added (0x001a) plen 8      {0x0003} [hci0] 18:06:14.98
            LE Address: CD:F3:CD:13:C5:90 (Static)
            Action: Auto-connect remote device (0x02)
    @ MGMT Event: Device Added (0x001a) plen 8      {0x0002} [hci0] 18:06:14.98
            LE Address: CD:F3:CD:13:C5:90 (Static)
            Action: Auto-connect remote device (0x02)
    @ MGMT Event: Unknown (0x002a) plen 15          {0x0004} [hci0] 18:06:14.98
            90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00     ...............
    @ MGMT Event: Unknown (0x002a) plen 15          {0x0003} [hci0] 18:06:14.98
            90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00     ...............
    @ MGMT Event: Unknown (0x002a) plen 15          {0x0002} [hci0] 18:06:14.98
            90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00     ...............
    @ MGMT Event: Unknown (0x002a) plen 15          {0x0001} [hci0] 18:06:14.98
            90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00     ...............
    Signed-off-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
    Reviewed-by: default avatarAlain Michaud <alainm@chromium.org>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    4c54bf2b
mgmt.h 24.1 KB