-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken controller regexp scheme in the bluetoothctl parser (#599)
This commit fixes the controller parser scheme in order to take care and extract some extra attributes, the manufacturer and version. The order of the attributes appearing in the regexp scheme must follow the order they appear in the `bluetoothctl show` outputs. A new test has been added to test outputs with these extra attrs. Co-authored-by: Kelly Brazil <kellyjonbrazil@gmail.com>
- Loading branch information
1 parent
78150de
commit c5e0642
Showing
3 changed files
with
103 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
tests/fixtures/generic/bluetoothctl_controller_with_manufacturer.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Controller 48:A4:72:3C:96:63 (public) | ||
Manufacturer: 0x0002 (2) | ||
Version: 0x08 (8) | ||
Name: ubuntu | ||
Alias: ubuntu | ||
Class: 0x007c0104 (8126724) | ||
Powered: yes | ||
Discoverable: yes | ||
DiscoverableTimeout: 0x000000b4 (180) | ||
Pairable: yes | ||
UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb) | ||
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb) | ||
UUID: OBEX Object Push (00001105-0000-1000-8000-00805f9b34fb) | ||
UUID: Message Access Server (00001132-0000-1000-8000-00805f9b34fb) | ||
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) | ||
UUID: IrMC Sync (00001104-0000-1000-8000-00805f9b34fb) | ||
UUID: Vendor specific (00005005-0000-1000-8000-0002ee000001) | ||
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb) | ||
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb) | ||
UUID: Phonebook Access Server (0000112f-0000-1000-8000-00805f9b34fb) | ||
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb) | ||
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb) | ||
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb) | ||
UUID: Handsfree Audio Gateway (0000111f-0000-1000-8000-00805f9b34fb) | ||
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb) | ||
UUID: OBEX File Transfer (00001106-0000-1000-8000-00805f9b34fb) | ||
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb) | ||
Modalias: usb:v1D6Bp0246d0548 | ||
Discovering: yes | ||
Roles: central | ||
Roles: peripheral | ||
Advertising Features: | ||
ActiveInstances: 0x00 (0) | ||
SupportedInstances: 0x05 (5) | ||
SupportedIncludes: tx-power | ||
SupportedIncludes: appearance | ||
SupportedIncludes: local-name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters