Hi,
I wanted to know what is the recommended way of data transfer through ble if there are multiple sensors. Is Creating one service with multiple characteristics a good way or creating multiple services with one characteristic each the best option.
Hi,
I wanted to know what is the recommended way of data transfer through ble if there are multiple sensors. Is Creating one service with multiple characteristics a good way or creating multiple services with one characteristic each the best option.
Hi Jan
Are you saying that Service Discovery time is shorter when all Characteristics are grouped in the one service, maintaining the same total number of Characteristics ?
Can you explain or direct me to somewhere which the math/sense behind this ?
Thanks !
Hi,
Most likely that would be because of the number of roundtrips required for the Service Discovery procedure.
In short, you discover one Service at a time, and each additional Service means an additional back-and-forth to discover that Service.
You also get one additional back-and-forth looking for Characteristics, for each additional Service. This is because the procedure is to fetch one Characteristic at a time until you get an "attribute not found" response indicating there are no more Characteristics on that Service.
Regards,
Terje