Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add socket backend (for FreeBSD) #26

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

valpackett
Copy link

This backend uses system bluetooth sockets (raw HCI for advertisements, L2CAP for ATT) and is designed for FreeBSD. (note: LE L2CAP outgoing packets currently require a little fix in the kernel)

Might work on other systems depending on how the sockaddrs and the filter sockopt look. (directly using the HCI set filter message would be more portable than the sockopt..)

No unit tests yet, I've only manually tested with miflora.

@coveralls
Copy link

coveralls commented Jul 17, 2020

Pull Request Test Coverage Report for Build 129

  • 42 of 127 (33.07%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-23.5%) to 73.775%

Changes Missing Coverage Covered Lines Changed/Added Lines %
btlewrap/socket.py 40 125 32.0%
Totals Coverage Status
Change from base Build 128: -23.5%
Covered Lines: 256
Relevant Lines: 347

💛 - Coveralls

@ChristianKuehnel
Copy link
Owner

@myfreeweb thx for the contribution 👍 I never looked into FreeBSD.

Happy to merge it, when we've sorted out a bunch of smaller things:

  1. Can you please fix the flake8 and pylint findings (see linked build results).
  2. Please also update the Readme on how to use it. E.g. pointing to the kernel patch.
  3. Does it make sense to add a bunch of unit tests?
  4. Optional: It would be interesting to know if this also works for Linux. Could you take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants