kevincar / bless

Cross-platform Bluetooth Low Energy Server Python Library
MIT License
97 stars 29 forks source link

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

Closed Kai0711er closed 1 year ago

Kai0711er commented 2 years ago

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):

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 commented 1 year ago

:point_up:

runman19 commented 1 year ago

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

kevincar commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

GewoonGijs commented 1 year ago

@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.