Hi,
I have for some time now looked into the GATT protocol to use this in a Bluetooth Low Energy application.
I have come to the point where I am able to set up a service with multiple characteristics.
My question now is:
I want to be able to read/write an IP address over BLE, also I would like to be able to read a table of values over the BLE.
How do I set this up? this far I have only set up characteristics with one value, but need to be able to read the struct as shown below:
struct mytable {
uint32_t IPaddress;
uint8_t xdata[100];
}
I am thinking like this:
Service
____Characteristic for IP address
_______Declaration
_______value
_______User description
____characteristic for xdata
_______Declaration
_______Value
_______ User Description
Do I have to split the IPaddress in two 16 bit values to keep under 20-bit limit? Or can I send 32bit at once?
How can I read the whole table (or parts of it based on a counter). How do I refer the parts of the table I want to read to the GATT protocol, pointer and counter? How would this look like when I am setting up the value part of the characteristic?
Many thanks in advance.
I have for some time now looked into the GATT protocol to use this in a Bluetooth Low Energy application.
I have come to the point where I am able to set up a service with multiple characteristics.
My question now is:
I want to be able to read/write an IP address over BLE, also I would like to be able to read a table of values over the BLE.
How do I set this up? this far I have only set up characteristics with one value, but need to be able to read the struct as shown below:
struct mytable {
uint32_t IPaddress;
uint8_t xdata[100];
}
I am thinking like this:
Service
____Characteristic for IP address
_______Declaration
_______value
_______User description
____characteristic for xdata
_______Declaration
_______Value
_______ User Description
Do I have to split the IPaddress in two 16 bit values to keep under 20-bit limit? Or can I send 32bit at once?
How can I read the whole table (or parts of it based on a counter). How do I refer the parts of the table I want to read to the GATT protocol, pointer and counter? How would this look like when I am setting up the value part of the characteristic?
Many thanks in advance.