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

MCP android long write

Hi, I'm trying to write a long byte array with the nrf master control panel on android. I'm unsure if the app is able to, but in any case I'm not getting the event: BLE_EVT_USER_MEM_REQUEST. I simply get the BLE_GATTS_EVT_WRITE with BLE_GATTS_OP_WRITE_CMD and the length of the data is cut to 20 bytes.

I can see on the app that char_ext_props.reliable_wr is enabled, furthermore I set:

  • cccd_md = BLE_GATTS_VLOC_STACK
  • attr_md = BLE_GATTS_VLOC_USER
  • max_len = 200

I'm using:

  • SDK 6.1
  • SD S110 7.0.0
  • android 5.1
  • master control panel 2.1.1

Does anyone know what i'm doing wrong?

Parents Reply
  • @bart: I'm glad that you found the solution. I think the reason for this is that on MCP we will check if the write without response is allowed in the property we will use write command. And this won't allow writing more than 20 bytes. If write without response is not allowed, we will use write request, and this will allow long write.

    You can modify your app so that it will use write request regardless the property of the characteristic allow write command.

Children
No Data
Related