STMicroelectronics / BlueSTSDK_Python

Bluetooth Low Energy Sensors Technology Software Development Kit (Python version for Linux Gateways)
https://www.st.com/en/embedded-software/bluest-sdk.html
BSD 3-Clause "New" or "Revised" License
61 stars 19 forks source link

Device keeps disconnecting unexpectedly #32

Open mhnrahmani opened 2 years ago

mhnrahmani commented 2 years ago

Hello,

I am using a Raspberry Pi Compute Module 4 (which is BTW. basically the same as a RPi 4B) to run the basic example example_ble_1.py and connect to my SensorTile boxes. The example scans and lists my SensorTiles but when I select either of them to connect to, it immediately logs Device {my TileBox's name} disconnected unexpectedly on the screen.

Output log:

$ sudo python3 example_ble_1.py

##################
# BlueST Example #
##################

Scanning Bluetooth devices...

Discovery started.
New device discovered: Yellow .
New device discovered: White  .
Discovery stopped.

Available Bluetooth devices:
1) Yellow : [c0:50:1d:32:09:56]
2) White  : [c0:50:07:32:2c:33]

Select a device to connect to ('0' to quit): 2
Connecting to White  ...
Device White   disconnected unexpectedly.

Exiting...

More information about my setup:

davidroid commented 2 years ago

Hello @mohammad-rahmani, Which firmware are you using on the SensorTile.box?

Regards, Davide

mhnrahmani commented 2 years ago

Hello @davidroid,

Thanks for your attention.

I am using a custom app with IMU Gyroscope sensor and IMU Accelerometer sensor as inputs and Stream to Bluetooth as output without any function. I created and uploaded this custom app via the ST BLE Sensor android app.

(BTW, the example runs on my Ubuntu desktop without the unexpected disconnection problem that I mentioned in my post.)