BLE advertising update data of ble_app_template example for 15.3 SDK is not working

hello everyone,

i am using nrf52810 with my custom board which contains mpu6050 accelerometer and Gyro-meter so now i want to achieve connectable beacon like it should be connectable as well as advertising the accelerometer and Gyro data in the nrf mobile application sine i used ble_app_template example which provide from the Nordic-team  and this is the link of it -

/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_update_5F00_advertising_5F00_data.zip.

so when i test this with 17.01 SDK  its worked and i can able to advertise the some payload data but its not worked for 15.3 SDK and also i want to update the accelerometer and gyro data continuously every second .please anybody help me to achieve this thing or share any reference code snippet which will be useful for implement.

thank you.

Parents
  • Hello,

    so when i test this with 17.01 SDK  its worked and i can able to advertise the some payload data but its not worked for 15.3 SDK

    Please detail what / how it is that is not working.
    Is it the advertising data payload update that is not working? This might be due to an API change between nRF5 SDK v17 and v15.3.0.
    Please also have a look at this blogpost that details and demonstrates how dynamic advertising data updates can be done.

    Best regards,
    Karl

  • hello Karl

    thanks for your reply ,actually i followed same blog as before and from there only i have used this example code ,with SDK 17.01 its changing the Device name to Nordic template to N/A (Nordic) and the payload is advertising but in 15.3 SDK its not change to any name and also there is no advertisement of any payload .

    sorry i didn't get API change like i need to create data update handler separately or i need to change in the available firmware so please let me know.

    first it will display the device name as Nordic_template and after that it won't change i need to refresh then it shows like below picture .this is what i am facing from last 2 days please help me to resolve this problem. 

    thank you .

  • sagarnayakm said:
    thanks for your reply

    It is no problem at all, I am happy to help!

    If I have understood your issue correctly it is that you are not seeing an update of the advertising payload when you build it with the nRF5 SDK v15.3.0, but you are seeing the update happen with nRF5 SDK v17.0.0, is this correct?
    If so, this is likely due to the API change mentioned in the blogpost.
    The example in the blogpost is made for the nRF5 SDK v17.0.2, so it will not function the same if you build it with v15.3.0.
    If you want to dynamically update advertising data with SDK v15.3.0 you will need to implement the procedure described in the first part of the blogpost. This is not demonstrated in the example.

    Could I ask why you would like to start development with nRF5 SDK v15.3.0 instead of the latest version?

    Best regards,
    Karl

  • hello ,

    when you build it with the nRF5 SDK v15.3.0, but you are seeing the update happen with nRF5 SDK v17.0.0, is this correct?

    Yes,you are correct. actually i am using 15.3 sdk since there is no any function definition for ble_app_update_data and in 17.01 sdk its available but in the blogpost they mentioned the procedure to implement and i am new to nordic so i am still working on that .if any code snippet available or any reference available please share me.

    Could I ask why you would like to start development with nRF5 SDK v15.3.0 instead of the latest version?

    Already half of the things implemented by my friend and now i am doing this since i am going with that flow only but if i am not wrong can we implement the things like connectable beacon like connectable as well as advertising the sensor data with sdk 17.01 ??. if its possible means i'll go through that only then it will be easy for me to implement .  

    even one more thing i tried to use 17.01 sdk but in that i am not able to read  the sensor data of mpu6050 that is accelerometer and gyro-meter data . 

  • Hello,

    sagarnayakm said:
    its available but in the blogpost they mentioned the procedure to implement and i am new to nordic so i am still working on that .if any code snippet available or any reference available please share me.

    Start by creating two ble_gap_adv_data_t buffers, and then alternate which of the two you provide to the update function and which you update the contents of.
    If this does not work, share the code, using the Insert -> Code option, you used in your attempt so that I may advice on what you should do.

    sagarnayakm said:
    Already half of the things implemented by my friend and now i am doing this since i am going with that flow only but if i am not wrong can we implement the things like connectable beacon like connectable as well as advertising the sensor data with sdk 17.01 ??. if its possible means i'll go through that only then it will be easy for me to implement .  

    A beacon usually refers to a device that is advertising as non-connectable. You can absolutely implement this with SDK v17.1.0 - in general I would recommend that you use the latest SDK release for development, if possible.

    Best regards,
    Karl

  • Hello,

    Start by creating two ble_gap_adv_data_t buffers, and then alternate which of the two you provide to the update function and which you update the contents of.
    If this does not work, share the code, using the Insert -> Code option, you used in your attempt so that I may advice on what you should do.

    Ok. i will use latest sdk to read the sensor data and ble_update_data and i'll let you know.

    A beacon usually refers to a device that is advertising as non-connectable. You can absolutely implement this with SDK v17.1.0 - in general I would recommend that you use the latest SDK release for development, if possible.

    No, actually i want to use as both connectable and advertise and continuously update the data. if its non-connectable means how can i implement this??.

    thank you.

Reply
  • Hello,

    Start by creating two ble_gap_adv_data_t buffers, and then alternate which of the two you provide to the update function and which you update the contents of.
    If this does not work, share the code, using the Insert -> Code option, you used in your attempt so that I may advice on what you should do.

    Ok. i will use latest sdk to read the sensor data and ble_update_data and i'll let you know.

    A beacon usually refers to a device that is advertising as non-connectable. You can absolutely implement this with SDK v17.1.0 - in general I would recommend that you use the latest SDK release for development, if possible.

    No, actually i want to use as both connectable and advertise and continuously update the data. if its non-connectable means how can i implement this??.

    thank you.

Children
  • sagarnayakm said:
    Ok. i will use latest sdk to read the sensor data and ble_update_data and i'll let you know.

    Great! Slight smile

    sagarnayakm said:
    No, actually i want to use as both connectable and advertise and continuously update the data. if its non-connectable means how can i implement this??.

    You can continue advertising after having established a connection, sure!
    Are you then looking to create additional connections, or just have a single connection while also continuing to advertise?
    In case of the latter you can do this by restarting unconnectable advertising as part of your CONNECTED event handle (because the advertising library will stop advertising when a connection is established).

    Best regards,
    Karl

  • Hello,

    You can continue advertising after having established a connection, sure!
    Are you then looking to create additional connections, or just have a single connection while also continuing to advertise?

    No, i need only one connection. thank you for your valuable information, i will implement the thing and let you know.   

  • sagarnayakm said:
    No, i need only one connection. thank you for your valuable information, i will implement the thing and let you know.

    No problem at all, I am happy to help! :)

    Great, let me know how it goes!

    Best regards,
    Karl

  • Hello,

    yeah, now i can able to read the accelerometer and gyro-meter data but here the thing is i don't want to update the data for manf_specific_update_data  as a payload and now i need to update the data as service data for this i got some code snippet and here i don't know how to update the sensor data continuously and also advertise??. One more thing is i am bit confused about this complete 16-bit  service UUID and another one  UUID which is editable. so please let me know about this and help me to implement my thing.

    please find the below attachment for more details,

    thank you.

  • yeah, now i can able to read the accelerometer and gyro-meter data but here the thing is i don't want to update the data for manf_specific_update_data  as a payload and now i need to update the data as service data for this i got some code snippet and here i don't know how to update the sensor data continuously and also advertise??. One more thing is i am bit confused about this complete 16-bit  service UUID and another one  UUID which is editable. so please let me know about this and help me to implement my thing.

    please find the below attachment for more details,

    thank you.

    Hello,

    still i am waiting for reply to implement, please let me know if any update on this query.

    thank you.

Related