scapy icon indicating copy to clipboard operation
scapy copied to clipboard

bluetooth: Add version and company identifiers to local version commands

Open antoniovazquezblanco opened this issue 9 months ago • 5 comments

Checklist:

  • [x] If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • [x] I squashed commits belonging together
  • [x] I added unit tests or explained why they are not relevant
  • [x] I executed the regression tests (using cd test && ./run_tests or tox)
  • [x] If the PR is still not finished, please create a Draft Pull Request

Just adds more information to the HCI_Cmd_Complete_Read_Local_Version_Information packet :)

antoniovazquezblanco avatar Apr 08 '25 18:04 antoniovazquezblanco

Codecov Report

:x: Patch coverage is 40.00000% with 21 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 80.89%. Comparing base (0a36696) to head (16dd438). :warning: Report is 28 commits behind head on master.

Files with missing lines Patch % Lines
scapy/tools/generate_bluetooth.py 0.00% 21 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4716      +/-   ##
==========================================
- Coverage   81.03%   80.89%   -0.14%     
==========================================
  Files         365      368       +3     
  Lines       89067    90175    +1108     
==========================================
+ Hits        72171    72945     +774     
- Misses      16896    17230     +334     
Files with missing lines Coverage Δ
scapy/contrib/ibeacon.py 100.00% <ø> (ø)
scapy/data.py 90.95% <100.00%> (+0.12%) :arrow_up:
scapy/layers/bluetooth.py 90.52% <100.00%> (+0.01%) :arrow_up:
scapy/libs/bluetoothids.py 100.00% <100.00%> (ø)
scapy/tools/generate_bluetooth.py 0.00% <0.00%> (ø)

... and 39 files with indirect coverage changes

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Apr 08 '25 18:04 codecov[bot]

It would probably be good to add a comment pointing to https://bitbucket.org/bluetooth-SIG/public/src/main/assigned_numbers/company_identifiers/company_identifiers.yaml where the company identifiers come from, so they can be more easily updated in the future (since they change very frequently).

XenoKovah avatar Apr 09 '25 16:04 XenoKovah

Hi, sorry for the delay. I think that this should be moved to someplace else as it makes bluetooth.py a bit unreadable.

Ideally it would be stored similarly to conf.manufdb (50k entries), which is stored as a base85 compressed & cached blob. Although, considering there are only 3k entries here, I guess that storing the dict in data.py would be acceptable. In all cases, for a dict this big, I would avoid putting it in layers/.

How does that sound?

gpotter2 avatar Apr 21 '25 21:04 gpotter2

Sorry for the delay. Went the easy route and moved the dict to data. :)

antoniovazquezblanco avatar May 05 '25 21:05 antoniovazquezblanco

Thanks @gpotter2 for the improvement!

antoniovazquezblanco avatar May 29 '25 20:05 antoniovazquezblanco

Thanks @gpotter2 for the improvement!

Anything I can do to help merge this?

antoniovazquezblanco avatar Aug 13 '25 19:08 antoniovazquezblanco

Thanks. I kept pushing doing this.

gpotter2 avatar Sep 01 '25 15:09 gpotter2

Sorry I missed it earlier. Anything else, just ping :D

antoniovazquezblanco avatar Sep 01 '25 16:09 antoniovazquezblanco

Thanks again for the PR & sorry for the delay.

gpotter2 avatar Sep 03 '25 16:09 gpotter2