summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2022-05-20RootCanal: No resolved address for random staticMyles Watson
Bug: 232987004 Test: cert/run Tag: #gd-refactor Change-Id: Icf4fe88a181e497bdc6994e5e3973e25f4166916 (cherry picked from commit 27fd22c14c108eed3bb8977d684d701f98f5b4df) Merged-In: Icf4fe88a181e497bdc6994e5e3973e25f4166916
2022-05-20RootCanal: Use the resolved address typeMyles Watson
Bug: 230123996 Test: gd/cert Change-Id: I3f609fe5f248e214ec7fb2ae75f6dc1e886d3059 (cherry picked from commit 065d24d44b48f3808f1f40a8b8f41c6d9c1ff5e9) Merged-In: I3f609fe5f248e214ec7fb2ae75f6dc1e886d3059
2022-05-20RootCanal: Implement RPA advertisingMyles Watson
Bug: 230123996 Test: cert/run Change-Id: Ide5b514b0052f6991cc6ae28c0126dc8010ff67d (cherry picked from commit 9a9ff6ff094ff58f03af21b882555aa0369b3847) Merged-In: Ide5b514b0052f6991cc6ae28c0126dc8010ff67d
2022-05-20RootCanal: Check connections when setting featuresMyles Watson
Bug: 228326164 Test: cert/run Tag: #feature Change-Id: Ibe0a988077266c1e60ee24bd5b7c6f77cc5b9173 (cherry picked from commit 0b05e8a2e8089b17e75659540da989798ac3c0f9) Merged-In: Ibe0a988077266c1e60ee24bd5b7c6f77cc5b9173
2022-05-04RootCanal: Send scan_response_ when scannedMyles Watson
Bug: 231364385 Test: cert/run Tag: #gd-refactor Change-Id: I69c5b07bbdd4cf70d500fd5146ea02741065ee6b (cherry picked from commit 85ce98197c501f726dedd4e3c9158be904aa0c5a)
2022-04-20gd: Fix typo in ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUEHenri Chataing
Test: build libbluetooth Change-Id: I1e5a5a5ad4174f7ba603045dc19dab436cf4554d
2022-04-20Root-Canal: Fix event type sent for LE Connection completionHenri Chataing
Previoulsy Root-Canal always notified LE connection completion with the event LE_Connection_Complete. However the specification indicate that LE_Enhanced_Connection_Complete should be used in preference if the event is unmsked by the host. This patch modifies the behaviour of HandleLeConnect to: - Send LE_Enhanced_Connection_Complete or LE_Connection_Complete events only if unmasked by the host. - Send LE_Enhanced_Connection in preference to LE_Connection_Complete when unmasked. Test: PTS VCS test against Eiffel Change-Id: Ibc90196e1ed716643e82c2c630e4c9a5354bc3ae
2022-04-20Root-Canal: Add PDL definition of LL feature bitsHenri Chataing
The LE local supported features mask was previously defined as an hexadecimal value, making it complex to read and edit. Define an enum with LL feature bit values, and initialize the le_supported_features_ field in DeviceProperties using an explicit feature list. Bug: 228326164 Test: VCS PTS tests against Eiffel Change-Id: I2bbc1b6ac4f6f825437ad889ba910192e6a2d7d8
2022-04-19Merge "PDL: Change the scoping of packet and group declarations"Treehugger Robot
2022-04-18Merge "RootCanal: Remove usage of a cc_object for devices"Myles Watson
2022-04-18Naming conformant to BT spec 5.3 Connect=>Filter AcceptChris Manton
Bug: 229047843 Tag: #refactor Test: gd/cert/run BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines Change-Id: Ic3c297438b73af95cc6e8ff1d2c35302a9e897ce
2022-04-14Merge changes I5ccf498c,Ifcd68ba5David Duarte
* changes: PDL: Remove Located and Named trait PDL: Remove unnecessary `extern crate`
2022-04-13PDL: Remove Located and Named traitDavid Duarte
The traits were not used for dynamic dispatch nor for generic code. The `Named` trait was also directly implemented on stdlib types (via FieldPath). As the trait was not giving any advantages over a direct impl, remove them and put methods directly on the ast nodes. Test: compiles Change-Id: I5ccf498cf985ea4206c2fb42bed5e0d7eb3c5b92
2022-04-13PDL: Remove unnecessary `extern crate`David Duarte
Test: compiles Change-Id: Ifcd68ba5864183e89f902ebed62ae18bd3dd3738
2022-04-13PDL: Add OWNERSDavid Duarte
Test: None Change-Id: Ie4056c0fbcf1ae4a68bc51c96f016aa801b2f166
2022-04-11PDL: Change the scoping of packet and group declarationsHenri Chataing
Packet, struct, and group previously lived in different scopes, which allowed packets and structs to have the same name. This impacts the rust code generation as packets and structs are disambiguated by adding appropriate suffixes, which is undesirable. Packets and groups are now declared in the same namespace as structs and other typedef declarations. An error is raised if a packet is declared with the same name as another struct or group declaration. Test: pdl_inline_tests, validate hci_packets.pdl file Bug: 228327522 Change-Id: I8055bed118e04de7297e240ac075ca529b5a8f8a
2022-04-11RootCanal: Remove usage of a cc_object for devicesDavid Duarte
The single object is triggering CFI as this file doesn't contains LTO that are required for Control Flow Integrity to work Bug: 228517914 Test: Run RootCanal and see that we have devices registering Change-Id: I9289efc6e786c4ac830f65d6cc23da2c6492f350
2022-04-08PDL: Unify the declaration scope for Packet and Struct declarationsHenri Chataing
Packet and Struct currently live in different scopes, which allows packet and struct to have the same name. This impacts the rust code generation as packets and structs are disambiguated by adding appropriate suffixes, which is undesirable. This change renames the few name conflicts in hci_packets.pdl that prevent an immediate enforcement of this new rule. Bug: 228327522 Test: Tested libbluetooth, root-canal target compilation Change-Id: I88bbd394b56dbf6ac24ead4dcdeddcd467f71426
2022-04-06Merge "RootCanal: Handle args in DeviceBoutique instead of the Device"David Duarte
2022-04-05Merge "pdl: fix computation of `SourceLocation` line numbers"Martin Geisler
2022-04-05Merge "pdl: use docstrings instead of attribute arguments"Martin Geisler
2022-04-04Merge "RootCanal: Split HciSocketDevice into HciDevice + HciSocketTransport"David Duarte
2022-04-04pdl: use docstrings instead of attribute argumentsMartin Geisler
Editors typically have better support for editing text in docstrings than in attributes. Test: pdl --help Change-Id: I3b1062a188feb6d34d727442390bf1859270bf77
2022-04-04pdl: fix computation of `SourceLocation` line numbersMartin Geisler
Before, we would always exit the loop at the first iteration since the `line_starts` passed in start with a zero offset. We should actually search through the line starts to find the last line which starts before the given offset. This also adds new unit tests to cover this. Test: atest pdl_inline_tests Change-Id: I171803822c3cb58deec167a2bc063cbd8f99110f
2022-03-31[LSC] Add LOCAL_LICENSE_KINDS to packages/modules/BluetoothBob Badour
Added SPDX-license-identifier-Apache-2.0 to: tools/pdl/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Change-Id: I99415333310de5e04e3a07adc877a8d4e454ed84
2022-03-29Merge "PDL: Import pdl-parser sources"Henri Chataing
2022-03-28PDL: Import pdl-parser sourcesHenri Chataing
The PDL parser re-implementation currently parses input PDL source files, runs linter checks on the parsed AST, and serializes the AST to JSON. Test: m pdl + run against test/*.pdl Change-Id: If86e0265582e1ee21f14c1341c9069d43b17f97a
2022-03-28RootCanal: Handle args in DeviceBoutique instead of the DeviceDavid Duarte
Test: Run root-canal and add a sniffer Change-Id: I51a1ecabf77ed54fc9e3f8d1aabe2bd10493a2d2
2022-03-28Correct the data path direction setting in HCI_LE_Remove_ISO_data_pathAlice Kuo
The data path direction is bit field in LE Remove ISO Data Path command. Bit 0: remove input data path Bit 1: remove output data path Bug: 226438214 Test: make build Change-Id: I5ee340fc36c119fecd614115f779b9cb1bb5be38
2022-03-23RootCanal: Split HciSocketDevice into HciDevice + HciSocketTransportDavid Duarte
This is done by introducing a new HciTransport pure virtual class used by HciDevice and implemented by HciSocketTransport This make it possible to create other transport than the HciSocketTransport All the hci related code is also moved into a new model/hci folder Test: gd/cert/run Change-Id: I7f5259aa87c51d58fc4c7c7c666e62060491f30f
2022-03-22RootCanal: Change all delays to kNoDelayMsDavid Duarte
Test: Pass the AVDTP PTS-bot tests with Eiffel Change-Id: I939bbd84329f3289d24c7cc20fb006ecdbd48b67
2022-03-18Merge changes Ia516a414,I8b2a7f18David Duarte
* changes: RootCanal: Decouple TestModel from {LinkLayer,Hci}SocketDevice RootCanal: Fix device registration
2022-03-17RootCanal: Decouple TestModel from {LinkLayer,Hci}SocketDeviceDavid Duarte
Instead of constructing the {LinkLayer,Hci}SocketDevice inside the test model take it as a parameter and expose it to the TestModel caller to be able to give subclasses to the testmodel This also remove the hard dependency of socket for the TestModel Test: gd/cert/run Change-Id: Ia516a41463174baf186e0c3c4fe4da04393756cc
2022-03-17RootCanal: Fix device registrationDavid Duarte
Test: m root-canal Change-Id: I8b2a7f18c84c699678a2936d139038c8cf483682
2022-03-15Merge "RootCanal: Use 1 for completed packets"Treehugger Robot
2022-03-10RootCanal: Use 1 for completed packetsMyles Watson
kNumCommandPackets is just for flow control. Bug: 223907866 Test: cert/run Tag: #gd-refactor Change-Id: Ie323bfca7ae1ecf89c5c6503d7a34bf3f6167391
2022-03-10Merge changes I624cd740,I68dabd23Treehugger Robot
* changes: RootCanal: Reinitialise connection state on HCI_Reset RootCanal: Remove unused members in LinkLayerController
2022-03-10Merge "Root-Canal: Explicitly set initial advertising parameters"Treehugger Robot
2022-03-10RootCanal: Reinitialise connection state on HCI_ResetDavid Duarte
Bug: 223779974 Test: m root-canal Change-Id: I624cd7408d0a1aa78bd5ee47a1614d84c1eaf06a
2022-03-10RootCanal: Remove unused members in LinkLayerControllerDavid Duarte
Test: m root-canal Change-Id: I68dabd23c5a1337f5ca23cfc0f6cacc25c0d9d7b
2022-03-09RootCanal: Send LeReadRemoteFeatures on LE linkMyles Watson
Bug: 223660948 Test: cert/run Tag: #gd-refactor Change-Id: Ibde188d6ceceaa42314487fa3ef53c8900cc9de7
2022-03-09Root-Canal: Explicitly set initial advertising parametersHenri Chataing
The Core specification does not require that LE Set Advertising Parameters be called before LE Set Advertising Enable; instead default values are specified for all advertising parameters. This change lets hosts enable advertising using the default parameters. Test: PTS test GATT/SR/GAD/BV-01-C against Eiffel stack Change-Id: I5d429d40eddb7ceff3d33a7d864db48a8f2ed3e9
2022-03-08RootCanal: Move into tools/David Duarte
Rename the namespace from test_vendor_lib to rootcanal Test: None Change-Id: I9cf72eef6c6100888faa0e6344ebd4c5b7ec716e
2022-03-07Create a new tools/ folderDavid Duarte
This folder will host Bluetooth tools The OWNERS file is copied from system/ Test: None Change-Id: I29f3fc32794692ad2e62cc0e31a4339a4a2b1ea4