I have a weired problem with tthe Nano 33 IoT and BLE.
I am using the <ArduinoBLE.h> library and among others I have in my setup loop following characteristic:
`setup() {
I have another idetical board acting as a peripheral.
In my clients loop at some point I have a function Peripheral_One_Characteristic.writeValue(TransferValues, 120);
TransferValue is an Array of 120 bytes. When I reduce the array size to 16 bytes and the code to Peripheral_One_Characteristic.writeValue(TransferValues, 16);
the 16 bytes are transferred to the peripheral, however, it is not working at 120 bytes.
What could be the reason?
I am trying to solve it for a long time, but I can't find the solution to it and I need a solution urgently by now
I'm sure that I don't. It's only that I have noticed often when the subject of "x bytes works but y bytes doesn't" in relation to BLE, where y > x, the discussion usually ends up involving MTU. Perhaps that gives you a useful search keyword for your research.
After researching quite a bit it turns out, that you are right.
I am thoroughly annoyed about Arduino.cc. The reference webpage and github readme claim, that 512 bytes can be send, but that is obviously not the case.There is a limitation in the utilities\att.cpp.
Within att.h and att.cpp I can see there is a function void ATTClass::setMaxMtu(uint16_t maxMtu) . I don't see, however, how to invoke it and if it is actually doing anything. How would I go about this?