This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Central can´t find primary services on Ti SensorTag

Hello.

I use the BLE multilink central example to connect to 2 sensors. I changed the example in that way that i successfully connect and read data from a Wahoo Cadence Sensor (CSC profile). In addition to that i want to connect to a Ti SensorTag to read out the Gyro and Accelerometer.

I can successfully connect to the Ti SensorTag with the checking the UUID for the motion sensor (0xAA80) in the same way i can connect to the Wahoo searching for the CSC UUID (0x1816).

However if i want to perform a primary service discovery (ble_db_discovery_start) the result is zero, so i can´t find any service. What could be the reasons for that? The SensorTag works fine with Smartphone applications and so on.

Parents
  • I finally solved it.

    First of all it was wrong that the notification and the configuration characteristic writes were not successful. The method i changed my code to read back the value was confusing me because the way i did the sensor was disconnected between setting the characteristics and reading the values back. For the period characteristic it didn´t matter because it´s stored permanently but the values of the config and the notification enable are getting discarded with the disconnection. i was too stupid.

    So i concentrated back on the hvx events and why they are not occuring. This solution was easy. Before the config doesn´t enable at least on of the axis of gyro-, accelero- or magnetometer no data will be sent. The Userguide of the SensorTag 2 has a lack of information there. It just mentions that if axis are disabled the values will be zero but the length will always remain 18 bytes. Nowhere is said that if notifications are enabled but no axis are configured also no notification will come.

    So what i learned on connecting the SensorTag 2 is:

    • The base UUID of a proprietary sensor has to be coded in reverse byte order
    • Proprietary UUID´s have to be registered in the softdevice
    • The sensorTag won´t send data is notifications are enabled and no axis is configured

    Thanks for all your patience and help Petter!

Reply
  • I finally solved it.

    First of all it was wrong that the notification and the configuration characteristic writes were not successful. The method i changed my code to read back the value was confusing me because the way i did the sensor was disconnected between setting the characteristics and reading the values back. For the period characteristic it didn´t matter because it´s stored permanently but the values of the config and the notification enable are getting discarded with the disconnection. i was too stupid.

    So i concentrated back on the hvx events and why they are not occuring. This solution was easy. Before the config doesn´t enable at least on of the axis of gyro-, accelero- or magnetometer no data will be sent. The Userguide of the SensorTag 2 has a lack of information there. It just mentions that if axis are disabled the values will be zero but the length will always remain 18 bytes. Nowhere is said that if notifications are enabled but no axis are configured also no notification will come.

    So what i learned on connecting the SensorTag 2 is:

    • The base UUID of a proprietary sensor has to be coded in reverse byte order
    • Proprietary UUID´s have to be registered in the softdevice
    • The sensorTag won´t send data is notifications are enabled and no axis is configured

    Thanks for all your patience and help Petter!

Children
Related