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

Is there an example of a service with many characteristics ?

Hi,

I need to have a custom service which allows configuration of multiple parameters (perhaps 50 or more - which control registers in external peripherals)

I've looked at the examples and existing services to see if there is anything similar, but all I can find is code where each characteristic has its own, rather large, setup function.

Is there an example of having an array of characteristics? (They don't even need to be named, they could just be numbered)

BTW. I had initially thought that I would just duplicate the UART service and put it on a private UUID, but I think the maximum data size for a single write or read from a service would not be large enough to hold 50 or more bytes if config data, and having the ability to read or write individual characteristics is more flexible.

Thanks.

Parents
  • Thanks Bjørn

    I will investigate whether traditional bonding will work in our particular circumstance, as each BLE device could be accessed by possibly hundreds of iOS devices, (in a large commercial setting), if requested by the server which controls the App.

    But, I suspect that the nRF51822QFAA we are using would run out of RAM storing all the keys needed for bonding to many iOS devices, and I'm also not sure how paring would be handled, as the iOS mainly runs in the background.

    I think I may have to implement a system where the iOS App reads a characteristic which contains a large random number, and the writes to another characteristic with the encrypted version of that number. The BLE device checks that the encrypted version of the last number read is correct, and then allows further communication (paramater SETs and GETs) from the currently connected device.

Reply
  • Thanks Bjørn

    I will investigate whether traditional bonding will work in our particular circumstance, as each BLE device could be accessed by possibly hundreds of iOS devices, (in a large commercial setting), if requested by the server which controls the App.

    But, I suspect that the nRF51822QFAA we are using would run out of RAM storing all the keys needed for bonding to many iOS devices, and I'm also not sure how paring would be handled, as the iOS mainly runs in the background.

    I think I may have to implement a system where the iOS App reads a characteristic which contains a large random number, and the writes to another characteristic with the encrypted version of that number. The BLE device checks that the encrypted version of the last number read is correct, and then allows further communication (paramater SETs and GETs) from the currently connected device.

Children
No Data
Related