aboutsummaryrefslogtreecommitdiff
path: root/system/tools/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Add broadcast support on ISO dump toolAlice Kuo2022-10-041-47/+297
| | | | | | | | | | Support Broadcast stream audio data dump from hci log Bug: 229346816 Test: python3 ./dump_le_audio.py BTSNOOP.cfa -v --header Change-Id: Ia8e535daa8033adef37d57fc1da0c50752b81dd1 Merged-In: Ia8e535daa8033adef37d57fc1da0c50752b81dd1 (cherry picked from commit 9c3630f66be14e536a469826757e117fd58da8e3)
* Re-format the dump le audio.pyAlice Kuo2022-05-161-5/+3
| | | | | | | | Bug: 232731251 Test: ./dump_le_audio.py BTSNOOP.cfa -v --header Change-Id: I381652d69d6e09cf1e11747116708c87ba988898 Merged-In: I381652d69d6e09cf1e11747116708c87ba988898 (cherry picked from commit ae550d88dca936fe293adb494a0fc2d494546ae1)
* Only parse ATT_READ_BY_TYPE_RSP for the charactertistic typeAlice Kuo2022-05-161-0/+4
| | | | | | | | | | | | We parse ATT_READ_BY_TYPE_RSP packet to know the ASE control point UUID, so ignore the other packet and avoid the tool crash as the packer length shorted than expected Bug: 232731251 Test: ./dump_le_audio.py BTSNOOP.cfa -v --header Change-Id: I314e8b7ff0e205a42f1f125c48b96a966191bed7 Merged-In: I314e8b7ff0e205a42f1f125c48b96a966191bed7 (cherry picked from commit 114d80364fb2d7f5347ebafa52967297ea98c45b)
* Update btsnooz to use python3Chris Manton2022-04-021-26/+54
| | | | | | | | | | | And also provide solution when parsing fails Bug: 176292237 Test: gd/cert/run Tag: #refactor BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines Change-Id: I75cd4445cb98d5291eb2769f6797dd8e5ab31685
* Fix crash as using ISO dump tool with python3Alice Kuo2022-03-091-2/+2
| | | | | | Bug: 204320094 Test: extract iso data from le audio media log Change-Id: Ie46f32b1613ed5f4b7bf79a84c53e195ef352a29
* Merge "Change pre-upload hook check order for non python upload"William Escande2022-01-271-4/+4
|\
| * Change pre-upload hook check order for non python uploadWilliam Escande2022-01-191-4/+4
| | | | | | | | | | | | | | | | | | | | It's currently not possible to run the pre-upload hook without having to source the build/envsetup.sh. With this change it will be allowed as long as there is no python files modified. Test: Upload this change (it's a python file) Change-Id: I0a27c777b0a0aa58d48e42650063f62cba0a4027
* | Minor improvement about the tool document and the error msgAlice Kuo2022-01-221-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | The patch includes 1. Add the document for the ase_handle assignment feature 2. Print "The iso data is empty" as the iso sdu data length is zero, it could be useful to debug the audio issue Bug: 204320094 Bug: 150670922 Test: dump ISO data with btsnoop contains the iso sdu data empty issue Change-Id: Ic0857d0e21a568ecd52c98a15f5820a8161d7a14
* | Support ase attribute handle assignment as dump ISO dataAlice Kuo2022-01-191-0/+13
|/ | | | | | | | | | | | | | Some hci log file didn't contain the pairing process, the tool could not get the correct codec paramter by parsing the packet automatically due to the ASE control point attribute handle missing. Add the feature to make it eaiser. The user can assign the ASE attibute handle used for parsing. The tool could based on it to get the correct codec parameter and generate the header for the decoder Bug: 200748923 Bug: 150670922 Test: dump ISO data with ase handle assign on the log without pairing process Change-Id: I67024709c37314a0f16e471368cfd9872c35f79b
* Improve the document for the dump le audio toolAlice Kuo2021-10-071-3/+7
| | | | | | | Bug: 150670922 Bug: 200748923 Test: run dump_le_audio -h Change-Id: I7c6e3c16360f755b1ef1d196bee31d169981d42f
* Add the header in the front of the dump data for LC3.TS v1.0.3 formatAlice Kuo2021-10-061-9/+50
| | | | | | | | | | | | | | The commit contains the following change, 1. Add the headeer for the LC3.TS - LC3 Conformance Interoperability Test Software Release V1.0.3 2. Correct the document 3. Fix the minor naming error Bug: 150670922 Bug: 200748923 Test: Parse the btsnoop with LE audio streo media case, use the TS to decoded the dump data to wav files, use the player to confirm the audio Change-Id: I70a47fc58ad506513abd191f9055650c109695b3
* Add the python tool to dump le audio data from btsnoopAlice Kuo2021-09-221-0/+481
| | | | | | | | | | | | | | | | | | Usage: ./dump_leaudio.py BTSNOOP.fille [-v] -v to enable the verbose log The supported specficiation: ASCS_1.0 PACS_1.0 BAP_1.0 The format: Generates a audio dump file where each frame consists of a two-byte frame length information and the coded frame Bug: 200748923 Bug: 150670922 Test: verify with single & multiple media/ringtone/conversaion btsnoop Change-Id: I7a973864276a61270051dff07c44e2366335a558
* Fix the delta_time_ms types mismtach in btsnooz.pyAlice Kuo2021-02-231-4/+4
| | | | | | | | | | The delta_time_ms field in btif_debug_btsnoop.h is 32 bits. The offset count for 64 bits, and cause the decoder error. Change the offset back for 32 bits. Bug: 175283029 Test: ./btsnooz.py bugreport-WXYZ.txt Change-Id: I28324c4ff33ab817dbad5c813616a8e8c994ff2a
* Add ISO type support on btsnooz.py scriptAlice Kuo2021-01-181-1/+5
| | | | | | | | | | | Support to decode the ISO packet from the compressed btsnoop in bugreport. Bug: 150670922 Bug: 177616528 Test: btsnooz.py bugreport-*.txt which contain ISO traffic. Tag: #feature Change-Id: I070ec3023ed2ef65c3d1fce90dcfe2b9d695a89f
* Fix v2 format decoding in btsnooz.pyNeil Mayhew2021-01-131-4/+5
| | | | | | | | | | | | The delta_time_ms field now seems to be 64 bits instead of 32. Without this change, dumps fail to decode and the script exits with a TypeError because type_to_hci encounters an unknown packet type. Bug: 175283029 Test: ./btsnooz.py bugreport-WXYZ.txt Tag: #refactor Sponsor: optedoblivion@ Change-Id: Ib893ee63abacf5335a4cbabb1dbdfc1702da77e6
* Inclusive Language UpdatesMartin Brabham2020-10-201-1/+1
| | | | | | | | | | | | | | | | | slave -> peripheral SLAVE -> PERIPHERAL Slave -> Peripheral BYPASS_INCLUSIVE_LANGUAGE_REASON=required_to_explain_the_update Bug: 170342881 Tag: #refactor Test: cert/run --host Test: atest --host bluetooth_test_common Test: atest --host bluetooth_test_gd Test: atest net_test_btif Change-Id: I4a3cccc0c1d182f172a21a6c70d569e5a89a5916 Merged-In: I4a3cccc0c1d182f172a21a6c70d569e5a89a5916
* Inclusive Language UpdatesMartin Brabham2020-10-141-1/+1
| | | | | | | | | | | | | | | | | master -> central MASTER -> CENTRAL Master -> Central BYPASS_INCLUSIVE_LANGUAGE_REASON=required to explain the update Bug: 170342881 Tag: #refactor Test: cert/run --host Test: atest --host bluetooth_test_common Test: atest --host bluetooth_test_gd Test: atest net_test_btif Change-Id: I861ca756f04c06547ee9cb580029404308c678f2 Merged-In: I861ca756f04c06547ee9cb580029404308c678f2
* Format python files with extended line length now allowedZach Johnson2020-05-185-145/+64
| | | | | | | Bug: 156858180 Test: cert/run --host Tag: #gd-refactor Change-Id: I45ab86f366316246f14b24dd83f66684badf22e0
* Exclude deleted Python files from YAPF checkerJack He2020-04-241-1/+3
| | | | | Test: upload a commit with deleted Python file Change-Id: I9cbf427eeafec992d1a8ecc0030ec5effcf9f3de
* Python: format all Python files in system/bt using YAPFJack He2019-12-114-543/+602
| | | | | | | | python3 yapf -p -i $(git ls-tree --name-only -r aosp/master | grep "\.py") Bug: 146016811 Test: run Python tests Change-Id: Ic5fe6a21151d1abc8eb013f8c8070ba8238a5249
* Add Python style checker to system/btJack He2019-12-111-0/+89
| | | | | | | | | * Based on Google style and ensure 4 spaces are used for indentation * http://google.github.io/styleguide/pyguide.html Bug: 146016811 Test: upload CLs Change-Id: I27b9232d59e9e9bd59ca1414ef6f9db85c41a808
* Add tool for live btsnoop logging with Frontline BT sniffer (FTS)Vishwanath KM2019-10-241-0/+297
| | | | | | | | * This script supports Bluetooth Virtual Sniffing via Live Import feature of Frontline Bluetooth Sniffer(FTS). * It uses APIs from LiveImportAPI.dll in FTS path to communicate with FTS sniffer and inject HCI packets for live HCI sniffing
* Hearing Aid Dump Audio Tool: Add dump debug buffer featureweichinweng2019-05-171-26/+127
| | | | | | | | | | | Add dump HearingAid debug buffer feature to let the HearingAid debug information dump to debug file and make it readable. Bug: 130781854 Test: ./dump_hearingaid_audio.py -d true btsnoop_hci.log ./dump_hearingaid_audio.py -sd true btsnoop_hci.log Change-Id: I150fd897e6f197d5b853554734926ad613de4e6b
* Hearing Aid Dump Audio Tool: Add No Start Cmd featureweichinweng2019-03-111-0/+21
| | | | | | | | | | When the HCI Snoop logs wraparound, the Hearing Aid Audio Control Command "Start" is lost. For the case, we can enable No Start Cmd feature to set a fake "Start" to extract audio data. Bug: 127745964 Test: ./dump_hearingaid_audio.py -c1 1 -c2 3 -ns true btsnoop_hci.log Change-Id: Id7f67da0d5476faf38352ab57339fed8e358bac6
* Hearing Aid: Add python script to dump audio data to fileweichinweng2019-01-291-0/+510
| | | | | | | | | Bug: 121005659 Test: ./dump_hearingaid_audio.py btsnoop_hci.log ./dump_hearingaid_audio.py -f folder btsnoop_hci.log ./dump_hearingaid_audio.py -f folder -c1 1 -c2 3 btsnoop_hci.log ./dump_hearingaid_audio.py -f folder -a 121 btsnoop_hci.log Change-Id: I304531ecb5c5bd6cfc264130176d26acc60a64c2
* Metrics: Add python script to dump metrics into ASCII formatJack He2018-07-171-0/+140
| | | | | | Test: make, ./dump_metrics_ascii.py proto/bluetooth/metrics/bluetooth.proto Change-Id: Ie671fa2c2ceb9f93ed62495b592a2cf9d69ff41b
* scripts: modify change_types.sh to skip matching "<data type>_"Ruchi Kandoi2017-01-041-1/+1
| | | | | | | | | Script erroronously modifies UINT8_TO_BE_STREAM() to uint8_t_TO_BE_STREAM(). Modidy the script to prevent that. Test: Manual; Run the script on system/nfc Change-Id: I9e130b8eb79e400282233fad7da206b4bb1301af Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* Use standard types, consistent ifdef style everywhereMarie Janssen2016-08-051-2/+10
| | | | | | | | | | | | | | | Remove the typedefs in stack/include/bt_types.h Use standard types everywhere. Use standard style for #if statements: - #if (VAR_NAME == TRUE) - #if (VAR_NAME1 == TRUE && VAR_NAME2 == TRUE) Use __func__ instead of __FUNCTION__ Fix some debug statements to use __func__ Update script to be less disruptive to aligned assignment blocks. Change-Id: I8f8f068e6c26ce74fd3b3707e1e31fd0b919cdd0
* Fix btsnooz.py multi-line base64 decodingAndre Eisenbach2016-04-041-4/+13
| | | | Change-Id: Ie915c52d8a7eada10f68999c40a2b50b35f640e2
* Btsnooz doesn't find snooplog sometimesAjay Panicker2016-03-011-1/+1
| | | | | | | | | In the bugreport in b/27274486 comment #11, the line indicating the beginning of BTSNOOP LOGS was slightly indented thus causing btsnooz to not find the beginning of the log. Bug: 27419027 Change-Id: I3b88e6a3f6f2d6c4d3cbbadb0a93cbd7965f56c8
* Add tool to extract and view snooz logs from a bugreportAjay Panicker2016-02-232-1/+76
| | | | Change-Id: I3893d094a1b1dd7853016d1f539f8998cdc84833
* Assume input from /dev/stdin if no argument provided to btsnooz.py.Sharvil Nanavati2016-02-011-10/+8
| | | | Change-Id: I54bd137e67eb1fc959663189bcdaac4690c2c645
* Move btsnooz.py script from Android Wear to the BT stack project.Sharvil Nanavati2016-01-211-0/+159
| | | | Change-Id: I8368820b5ed9325d2c3b82885b9fe934c6bc87ca
* Add script to change data types to native C typesAndre Eisenbach2016-01-071-0/+77
Please see source code for usage information and application. Bug: 22948224 Change-Id: Ia2dbd618ddcdf13abf3c63d4649147f400e00cfe