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

Write Long using MCP 3.6

I have a 32 byte string to read and write using SD110. In the MCP I can read (using read long) the whole string without any problems. When I try to use write long, MCP times out after about 30 seconds with the error message "Could not update handle (0x0013) with new value"

I read the MCP version 3.5 did NOT support write long. I really hoping version 3.6 does.

If 3.6 does support write long. How do I get my app to accept the long write. I have set the extend property.reliable_wr = 1. Is there anything else I need to do to handle this?

Thanks, Clint

Parents Reply Children
  • Bjorn - I added BLE_GATTS_OP_EXEC_WRITE_REQ_NOW as a case in on_ble_evt(...). After clicking the Write Long button in MCP p_ble_evt->header.evt_id = 0x0012.

    For reference - I'm using SDK 7.1, PCA10028 eval board, SD110 7.1, MCP 3.6.0.8331

  • UPDATE: I coded up the UART to dump all BLE event ids to a terminal. When I click the Write Long button in the MCP, it is consistently generating a p_ble_evt->header.evt_id = 0x0002. The 0x0012 event comes later, which I believe is a connection parameters update.

    I’m not sure what BLE Event is 0x0002 – in the ble_gatts.h file all the BLE events are enumurations, and start with some base offset. I haven’t located any that start with base 0x0000. I added a case 0x0002: to on_ble_evt(ble_evt_t * p_ble_evt) and placed a break point at case 0x0002, so I could look at the data pointed to by p_ble_evt. No where do I see the data I’m trying to write. This makes be believe the stack needs me to respond, but because I don’t know what event 0x0002 is I can’t respond to the stack.

    What BLE event is assigned to 0x0002 – and where or how do I find my data?

    Also, if I do a Read Long after a Write Long, the data is unchanged (the write long did not write)

  • Event id 0x0002 is BLE_EVT_USER_MEM_REQUEST and needs to be handled. See the updated post.

Related