When talking about this, one guy hacked up SDK11 based espruino running on DS-D6 tracker to support 'long writes' , the code that worked for him is here
As I understand it, long writes feature is some sort of transaction over multiple writes so you either get all data or nothing, would you be interested in that? He needed it because he tried to emulate another device (some game controller?) that supported it.
As I understand it to support long writes you need to handle request from softdevice to allocate memory as this feature is done by batching data and then returning you the result when it is done.
However the memory handling is pretty strange there (static m_buffer and also the malloc and free in BLE_EVT_USER_MEM_RELEASE) and some changes seems unrelated?
Long writes have a big disadvantage compared to a bigger MTU:
If both connected devices are BLE 4.2 or higher I'd always prefer to use a bigger MTU size. This is way faster and applies to all service/characteristics which is quite handy.
© Espruino, powered by microcosm.
Report a problem