2021-02-25 09:35 AM
Hello,
Is there any reason which could explain I cannot connect to the sensor using GATT interface on Windows ?
The sensor often return, file not found, aborted or it is not able at all to connect to the sensor.
Application of ST in IOS works. Custom application with accelerometer has been pushed.
The only difference I have if I compare with another sensor which is working, it is the passcode.
Regards,
2021-02-26 03:18 AM
Hi @ACout.1 ,
Are you trying the ST BLE sensor app, right?
If so, there may be some issues with Windows OS since the application is available only for Android and iOS...
To run the application on Windows, I would suggest you to use Android studio and refer to the source code available at this link on the Github repository.
You should also check your hardware, if your device is equipped by BLE (Bluetooth low energy) module, and not standard bluetooth.
But ok, it's not an easy-to-implement suggestion...
-Eleon
2021-02-26 07:40 AM
Indeed the ST BLE sensor app works on my IOS smartphone.
All of my others sensors are using LE bluetooth, so it should not be the issue. One is using 4.1, and another 5.0.
Is there something which could interfer with discovery process ?
2021-02-26 08:17 AM
Hi @ACout.1 ,
I'm afraid this app is not available for Windows OS... From the app page on st.com the available versions are the following ones:
-Eleon
2021-03-01 08:04 AM
Hello
I have setup a Linux workstation in order to move forward.
I am now able to scann and connect to the device, gyro, mqgneto features notifications works but accelerometer still not.
Based on your documentation, I tried to push the feature gain: dm00550659-getting-started-with-the-bluest-protocol-and-sdk-stmicroelectronics.pdf
But I get an error,
Traceback (most recent call last):
File "add.py", line 4, in <module>
mask_to_features_dic[0x00800000] = feature_accelerometer.FeatureAccelerometer
NameError: name 'feature_accelerometer' is not defined
I use the a copy of your GIT repository (Python), the feature file exists under the folder /features/feature_accelerometer.py
Is there something wrong ?
Do you document which describe how merge multiple features in 1 GATT characteristic ? I would merge Gyroscope; Magnetometer, Accelerometer in the same charactistic.
2021-03-01 09:12 AM
Hi @ACout.1 ,
regarding your python error, it seems that the file is not seen by the main, hence it is not included in your project.
try to check if /features/ is in the list of folders with included files, in the project options.
The fact that you are able to detect the gyro and mag characteristics, but not the acc one, is very strange, because they are the same from a connection point of view. can you try to download an app that enables every sensor from the ST BLE Sensor App and try again?
if you want to merge more features into one, you should rework the firmware too, but you should start from one of the example MCU & MPU Embedded Software that are on the board page ( https://www.st.com/en/evaluation-tools/steval-mksbox1v1.html#tools-software )
I hope this is helpful =)
Niccolò
2021-03-01 10:59 AM
Hello
Yes folders are there
Traceback (most recent call last):
File "add.py", line 4, in <module>
mask_to_features_dic[0x00800000] = feature_accelerometer.FeatureAccelerometer
NameError: name 'feature_accelerometer' is not defined
xxxxxxx@-xxxxxxxxxxxxx:/usr/local/lib/python3.8/dist-packages/blue_st_sdk/features$ ls
add.py feature_audio_scene_classification.py feature_proximity_gesture.py field.py
audio feature_gyroscope.py feature_proximity.py __init__.py
device_timestamp_feature.py feature_humidity.py feature_stepper_motor.py __pycache__
feature_accelerometer.py feature_magnetometer.py feature_switch.py standard_characteristics
feature_activity_recognition.py feature_pressure.py feature_temperature.py
arnaud@arnaud-HP-Laptop-14s-fq0xxx:/usr/local/lib/python3.8/dist-packages/blue_st_sdk/features$
I will check for your alternative firmeware. I can download it and use your "ST BLE Sensor" app or ST32CubeProgrammer" ?
It is strange, because the IOS ST application "ST BLE Sensor" is able to read accelerometer data, but not from python in Linux.
2021-03-02 02:45 AM
Hi @ACout.1 ,
ok, so the files are all in that folder.
the next thing I can think of is that there is some spelling error in the import sentence.
yes, the other firmware can be downloaded with both CubeProgrammer and the ST BLE Sensor app.
anyway, regarding your last concern, it is strange indeed. do you see any other characteristic feature like the ones of gyro and mag that you don't recognize? maybe it was changed and the documentation is not updated yet.
2021-03-02 10:47 AM
I uploaded a new custom app by using low energy accelerometer rather than IMU acceleromter, and I am able to get notification from Python.
Very strange because in the both case the service is available and discoverable as per documented.
Anyway, I will test other FW because I definitly need to get the third metrics within the same service.
2021-03-03 01:38 AM
Hi @ACout.1 ,
that's good to hear, even if I'm not sure why it is happening.
Anyway, if you want to fuse all data in one service characteristic, you should now be able to modify them.
Let me know when you manage to complete your project!