Hi all,
i have got a problem. I try to send a char value from the simpleblecentral to the simpleBLEPeripheral.
I use the function handle_keys:
....
// Do a write
attWriteReq_t req;
req.handle = simpleBLECharHdl;
req.len = 1;
req.value[0] = simpleBLECharVal;
req.sig = 0;
req.cmd = 0;
status = GATT_WriteCharValue( simpleBLEConnHandle, &req, simpleBLETaskId );
...
I know, that the handle has to be 37 for the characteristic value 2.
If i debug the lines, the handle IS 37! But it does not work. The peripheral receives characteristic1 values only.
I tried to add the SIMPLEPROFILE_CHAR2_UUID in the simpleBLEGATTDiscoveryEvent function:
...
// Discover characteristic
simpleBLEDiscState = BLE_DISC_STATE_CHAR;
req.startHandle = simpleBLESvcStartHdl;
req.endHandle = simpleBLESvcEndHdl;
req.type.len = ATT_BT_UUID_SIZE;
req.type.uuid[0] = LO_UINT16(SIMPLEPROFILE_CHAR1_UUID);
req.type.uuid[1] = HI_UINT16(SIMPLEPROFILE_CHAR1_UUID);
req.type.uuid[2] = LO_UINT16(SIMPLEPROFILE_CHAR2_UUID);
req.type.uuid[3] = HI_UINT16(SIMPLEPROFILE_CHAR2_UUID);
GATT_ReadUsingCharUUID( simpleBLEConnHandle, &req, simpleBLETaskId );
...
Unfortunately, thats not the solution.
How can i send different char values with different characteristic values?
Did i forget something or did i overlook something simple?
Do you see something i forgot?
Do you have an idea?