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

S120 how to modify a value in an s110

Im trying to have the s120 modify the value like I would in Do a Read all records operation in the Glucose example. I cannot figure out what function would enable me to do this. Basically my goal is to have the s120 send a number for example "10" to the s110 and then the s110 nordic will do something. I am having trouble finding an example that will enable me to do this with the s120. Any direction would be appreciated. Thanks

Edit: So I've been messing with the example code for the heart rate example. I notice there are write conditions for the battery service. In the S110 I converted that variable to read/write. On the master control panel I can now set the value to what I want. On the S120 battery service I notice there is a write condition that gets called. Ive tried modifying this function using the write condition but I cannot get it to modify the value. How would I modify the s120 code to modify the battery value on the s110 device?

  • FormerMember
    0 FormerMember

    There are two ways (or possibly more) to get the battery level from S110 to S120:

    • Notification: The S110 uses notification to update the battery level
    • Read: The S120 device reads the battery level value from the S110 device.
  • I was looking for a way to have the s120 change the battery level on the s110 device. Currently I have modified the battery service from the ble_app_hrs to be a writable value. When I connect with the nordic master control I can change the battery level on the s110. I would like to achieve this using the s120 device to change the battery level on the s110. I have found the definition for a case BLE_GATTC_EVT_WRITE_RSP in ble_bas_c in the S120 ble_app_hrs_c. I have been trying to write the code to modify the value in the s110. Any help or example code would be greatly appreciated I added some extra code to the original question

Related