Best approach to send large chunks of bytes using BlueNRG-2 on STEVAL-STWINKT1
Hello all!
I have a STEVAL-STWINKT1 board and I have created my custom services and characteristics to be able to send to a Raspberry Pi an uint8_t array of 240 bytes.
From the RPi side, I am using bluepy to connect to my board and receive the notifications from it.
However, I would like to send this array as if it was 10 times larger, hence 2400 byets long, and accumulate it on the RPi side untill all 10 iterations have been finished.
What's the best approch to do so?
From the STWINKT1 side, I have created a for loop where I call:
aci_gatt_update_char_value(HWServW2STHandle, MY_hwHandle, 0, sizeof(my_buff) ,my_buff);
HAL_Delay(2);
Whereas, on the RPi side I have a while loop where I append to a list the incoming bytearray from the characteristic.
But after 4-5 iterations, the connection is discontinued and I am not able to accumulate all 10 iterations.
What would be the best approach to create a "stream" sending large amount of bytes to the RPi?
