Hi,
how is it possible to send instead of 2 Byte Data 4Bytes? I already located where the section in the code is an I also found out, that with simple modifiying the code it should work, but I always get the "Error Code Number 13" on the Screen of my BLE Device, when I try to send 4 Byte Data. I think the problem is that in some part of the BLE Stack I have to modify a 1 into a 2. Because just changing the value of the lengt (= uint8 len) doesn't fix the problem but causes it!
Maybe someone can help me!? Where do I have to make the changes in the Software Code so that I can simple send 4 Bytes or more of Data.
Thanks, Michael
uint8 status;
// Do a read or write as long as no other read or write is in progress
if ( simpleBLEDoWrite )
{
// Do a write
attWriteReq_t req;
req.handle = simpleBLECharHdl;
req.len = 2;
req.value[0] = LO_UINT16(ADWERT);
req.value[1] = HI_UINT16(ADWERT);
req.sig = 0;
req.cmd = 0;
status = GATT_WriteCharValue( simpleBLEConnHandle, &req, simpleBLETaskId );
}
else
{
// Do a read
attReadReq_t req;
req.handle = simpleBLECharHdl;
status = GATT_ReadCharValue( simpleBLEConnHandle, &req, simpleBLETaskId );
}
if ( status == SUCCESS )
{
simpleBLEProcedureInProgress = TRUE;
simpleBLEDoWrite = !simpleBLEDoWrite;
}
}
}