This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Crash when writing > 20 bytes (from Android)

Hi,

I'm trying to write more than 20 bytes to a custom characteristic, from Android (Cordova BLE Central), but this completely crashes my App

APP_ERROR:ERROR:Fatal

I'm using SDK 12.1 App Template, plus the LED & Button example service LBS

I set the LED (Write) characteristic to have a max size of 256 like this

   attr_md.vloc       = BLE_GATTS_VLOC_STACK;
    attr_md.rd_auth    = 0;
    attr_md.wr_auth    = 0;
    attr_md.vlen       = 0;// variable length set to false (disabled)
    
    memset(&attr_char_value, 0, sizeof(attr_char_value));

    attr_char_value.p_uuid       = &ble_uuid;
    attr_char_value.p_attr_md    = &attr_md;
    attr_char_value.init_len     = sizeof(uint8_t);
    attr_char_value.init_offs    = 0;
    attr_char_value.max_len      = 256;//sizeof(uint16_t);
    attr_char_value.p_value      = NULL;

Do I need to increase some buffer size so I can send more than 20 bytes.

BTW. I am using the nRF51822QFAA (16k) and have the IRAM setting at 0x20001FE8

But perhaps I need to give the SD more RAM ??

Related