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

server.py example: corebluetooth missing argument: 'max_write_without_response_size' #92

Closed
Kai0711er opened this issue Oct 3, 2022 · 6 comments · Fixed by #95
Closed
Assignees
Labels
backend: CoreBluetooth Problem specific to CoreBluetooth bug Something isn't working

Comments

@Kai0711er
Copy link

The problem
I am getting the following error when running the server.py example:

File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/bless/backends/corebluetooth/server.py", line 191, in add_new_characteristic
    await characteristic.init(service)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/bless/backends/corebluetooth/characteristic.py", line 78, in init
    super(BlessGATTCharacteristic, self).__init__(obj=cb_characteristic)
TypeError: __init__() missing 1 required positional argument: 'max_write_without_response_size'

Reproduction
Run the example code of server.py on macOS

Expected behavior
The example should run without errors...

Screenshots
None

Desktop (please complete the following information):

  • OS: macOS 12.6

Additional context
None

Thanks for the work on bless and let me know if I can provide any more information to resolve this issue

@gegnew
Copy link

gegnew commented Oct 13, 2022

☝️

@kevincar kevincar self-assigned this Nov 9, 2022
@kevincar kevincar added bug Something isn't working backend: CoreBluetooth Problem specific to CoreBluetooth labels Nov 9, 2022
@runman19
Copy link

Is there any workaround for this bug? E.g. by using previous versions of bless?

@kevincar
Copy link
Owner

kevincar commented Nov 18, 2022

This is fixed in development. I should be merging this into the next version soon. If you need it to work now. You can install the current development version and it should work.

pip install git+https://github.com/kevincar/bless@develop

@runman19
Copy link

Just as a feedback: This development version seems to be working fine. I am still having some issues with the bidirectional data transfer, but this does not seem to be related to the bluetooth interface.

@kevincar
Copy link
Owner

@runman19 Is the bidirectional data transfer related to this issue or something else?

@GewoonGijs
Copy link

@kevincar, isn't a similar correction necessary for the other backends? It seems I got the same error on a RPi using de bluezdbus backend. Sorry, but I am don't understand the code well enough to make the correction myself.

@WouterJD, maybe you cn reflect on this as well.

@kevincar kevincar closed this as completed Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: CoreBluetooth Problem specific to CoreBluetooth bug Something isn't working
Projects
None yet
5 participants