Replies: 1 comment 1 reply
-
This error is coming from the Bluetooth chip itself. I would try searching the web for that error message and your Bluetooth chip to see what you can find. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Base Device: Raspberry Pi 4 Model B
bleak version: 0.13.0
Python version: 3.9.2
Operating System: Raspbian GNU/Linux 11
BlueZ version: 5.55
I am doing a university work where it is necessary through a Raspberry Pi to access information that is reported by a blueetooth sensor that has an IMU unit (with accelerometer, gyroscope and magnetometer).
Before starting to build code in python on the Raspberry Pi, I installed an Android application called nRF Connect that allows you to access information from blueetooth devices.
After successfully connecting to the Bluetooth device, I was able to access a number of bluetooth characteristics, as can be seen from the figure below:
The instructions I have on this sensor is that in order to access the values indicated by the gyroscope, accelerometer and magnetometer, we need to send the 0x01 byte array via UUID 0xFF35. So in the nRF Connect application I wrote 0x01 to the characteristic 0xFF35:
After sending this byte 0x01 to UUID 0xFF35, the characteristic with UUID 0xFF38 immediately starts sending the required information. This value is constantly changing as it refers to the three sensors that are installed in the IMU unit. As can be seen by the red box in the figure below:
Next, I tried replicating the same procedures to access the values of characteristic 0xFF38, using python code that uses functions from the Bleak project. That is, I wrote byte 0x01 at characteristic 0xFF35 and tried to read from characteristic 0xFF38:
The python code that I composed is as follows:
When I run this program on the Raspeberry Pi, I get the following result:
Considering the last image, I can't access the values read by characteristic 0xFF38, as I could through the nRF Connect application, since I get the error indicated in the image.
On the other hand, I tried running the program "service_explorer.py" (https://github.com/hbldh/bleak/blob/develop/examples/service_explorer.py) and it shows all the services and characteristics of the BLE sensor described.
However, the characteristic 0xff38, shows the same error, as shown in the message below:
-With this in mind, what could be the main cause of not having access to the information sent through characteristic 0xFF38?
Thank you for your attention.
Beta Was this translation helpful? Give feedback.
All reactions