• 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
    https://gist.github.com/sairon/788564c0c­756ccbe26f3f7dd0ec1c439
    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.
    EDIT:
    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:

    1. A long write is a normal write distributed over multiple connection intervals which is a waste of time if you have long connection intervals
    2. They need to be supported by a given characteristic and do not apply to the whole device

    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.

About

Avatar for fanoush @fanoush started