Closed juasiepo closed 4 years ago
This happens because write
method is declared with a characteristic
argument.
Changing def write(self, characteristic)
to def write(self)
should help.
Now I am getting:
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/kivy/lang/builder.py", line 64, in custom_callback
11921 11941 I python : File "/data/data/org.kivy.kivy_ble_write/files/app/bluetooth.kv", line 50, in
Thanks for your time
It seems like Pyjnius do not convert str arguments to a Java arrays. It worked before, with Python 2.
I added a workaround, so write_characteristic(characteristic, 'TEST')
should work with a new able
version. To work with a previous version, code should be changed to write_characteristic(characteristic, b'TEST')
.
It works with the write_characteristic(characteristic, b'TEST') I will test later the newest version
:) thanks a lot for your time
I have an working app that publishes a write service with UUID 0d06. This service works ok as I can send some text using the BLE scanner app for android
I am trying to send text using ble's write_characteristic. Here you are my piece of code (based on BLE functions test):
I have declared:
and
The services are detected ok:
But when I try to send the text I get the following error:
Any idea what am I doing wrong?
Thanks for your time