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

Only some of the connected thingy are output

https://github.com/NordicPlayground/nrf52-ble-multi-link-multi-role

I use this code. 

The connection to thingy was successful. max connection is 10.

The discovery of environmental services has been successful.

but only the environmental values of some devices are output.

for example connect  10 device but print only 7 device 

How can I print the environment values of all devices?

  • Hi 

    If you pull the latest update I increased the max connections to 16 for the nRF52840 project. 

    Have you modified the code to access the environmental values?
    Out of the box the multi link demo only accesses the UI service in the Thingys. 

    Best regards
    Torbjørn

  • I modified the code to access the environmental values and motion value

    but if one thingy access one value such as temperature, that don't access other values.

    It is possible for thingy to access a lot of values?
    and It is possible for multi thingy to access a lot of values?

  • Hi

    The Thingy's should update values automatically as soon as you enable notifications for the corresponding characteristic (set the CCCD). 

    You can enable notifications on multiple characteristics in one thingy, and it should be possible to enable notifications on multiple characteristics in multiple thingy's as well. 

    If this is not working it might be down to the method you use for enabling notifications across the different thingy's.

    Best regards
    Torbjørn

  • case THINGY_TMS_UUID_EULER_CHAR :
    evt.params.peer_db.euler_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.euler_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("evt euler handle = %d",p_ble_thingy_tms_c->conn_handle, evt.params.peer_db.euler_handle);
    break;

    case THINGY_TMS_UUID_CONFIG_CHAR :
    evt.params.peer_db.config_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.config_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("%d >> evt config handle = %d", p_ble_thingy_tms_c->conn_handle,evt.params.peer_db.config_handle);
    break;

    case THINGY_TMS_UUID_GRAVITY_CHAR :
    evt.params.peer_db.gravity_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.gravity_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("%d >> evt gravity handle = %d", p_ble_thingy_tms_c->conn_handle, evt.params.peer_db.gravity_handle);



    case THINGY_TMS_UUID_ROT_MAT_CHAR :
    evt.params.peer_db.rot_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.rot_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("%d >> evt rot handle = %d", p_ble_thingy_tms_c->conn_handle,evt.params.peer_db.rot_handle);
    break;


    case THINGY_TMS_UUID_HEADING_CHAR :
    evt.params.peer_db.heading_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.heading_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("%d >> evt heading handle = %d", p_ble_thingy_tms_c->conn_handle, evt.params.peer_db.heading_handle);
    break;


    case THINGY_TMS_UUID_ORIENTATION_CHAR:
    evt.params.peer_db.orientation_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.orientation_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("%d >> evt orientation handle = %d",p_ble_thingy_tms_c->conn_handle, evt.params.peer_db.orientation_handle);
    break;



    case THINGY_TMS_UUID_QUATERNION_CHAR :
    evt.params.peer_db.quat_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.quat_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("%d >> evt quaternion handle = %d", p_ble_thingy_tms_c->conn_handle, evt.params.peer_db.quat_handle);
    break;

    */


    case THINGY_TMS_UUID_PEDOMETER_CHAR:
    evt.params.peer_db.pedo_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.pedo_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("%d >> evt pedo handle = %d", p_ble_thingy_tms_c->conn_handle,evt.params.peer_db.pedo_handle);
    break;


    case THINGY_TMS_UUID_RAW_CHAR :
    evt.params.peer_db.raw_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.raw_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("%d >> evt raw handle = %d",p_ble_thingy_tms_c->conn_handle, evt.params.peer_db.raw_handle);
    break;


    case THINGY_TMS_UUID_TAP_CHAR:
    evt.params.peer_db.tap_cccd_handle = p_char->cccd_handle;
    evt.params.peer_db.tap_handle = p_char->characteristic.handle_value;
    NRF_LOG_INFO("%d >> evt tap handle = %d", p_ble_thingy_tms_c->conn_handle,evt.params.peer_db.tap_handle);
    break;

    this is my code 

  • Hi 

    It seems you are setting up the handles correctly, but you also need functions to enable notifications. 

    As luck should have it I recently implemented the TMS client for a different project, and I am attaching the files here so you can use it for reference:
    ble_thingy_tms_c.zip

    Please note all the functions at the bottom of the .c file called something like ble_thingy_tms_c_xxx_notif_enable(..)

    You need to call this function for each characteristic from which you want to receive notifications. 

    Best regards
    Torbjørn

Related