Comments (4)
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')
.
from able.
This happens because write
method is declared with a characteristic
argument.
Changing def write(self, characteristic)
to def write(self)
should help.
from able.
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
11921 11941 I python : on_press: app.write()
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/app/main.py", line 194, in write
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 18, in wrapper
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 63, in enque
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 36, in wrapped
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 77, in execute_next
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/queue.py", line 90, in execute_task
11921 11941 I python : File "/home/juan/git/able/write/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/kivy_ble_write/able/dispatcher.py", line 127, in write_characteristic
11921 11941 I python : File "jnius/jnius_export_class.pxi", line 760, in jnius.jnius.JavaMethod.call
11921 11941 I python : File "jnius/jnius_conversion.pxi", line 128, in jnius.jnius.populate_args
11921 11941 I python : jnius.jnius.JavaException: Expecting a python list/tuple, got 'TEST'
11921 11941 I python : Python for android ended.
Thanks for your time
from able.
It works with the write_characteristic(characteristic, b'TEST') I will test later the newest version
:) thanks a lot for your time
from able.
Related Issues (20)
- After upgrading to new recipe, scanning doesn't work. HOT 3
- Unable to send string data HOT 6
- How to receive characteristics more than 20 bytes? HOT 5
- Error on last release HOT 3
- Android Phone as a Peripheral HOT 3
- Change ScanSettings? HOT 1
- Add a way to perform advertise operations
- Using able with a python-for-android service HOT 5
- Sorry in advance; Small correction HOT 1
- How to install? HOT 7
- able takes 14 secs to put services/characteristics in dictionary HOT 5
- Receiving data through notifications HOT 1
- Buildozer Failed Building Alert Example HOT 3
- Clarify re-connection routine
- multiple connection HOT 2
- Installing on Linux? HOT 1
- CRASH at buildozer permission HOT 1
- Error while building able_recipe wheel in buildozer HOT 6
- Didn't find class "org.able.BLE" HOT 4
- Can not start scan HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from able.