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

Nus profile seems to cause system reset if the data length too long.

iphone5_b.psdm370_android6_b.psdlong_write_error.pngI using SDK11. I porting nus profile to my system and make a customer's UUID. I use Lightblue on iPhone 5 to connect my system. I sent a data through my customer's UUID. My system work fine when the data length is less than or equal 20 bytes. It will cause system reset if the data length is great than 20 bytes. Was the softdevice error, or I made something wrong?

Parents
  • The system is probably reset because APP_ERROR_CHECK() is called with something else than NRF_SUCCESS (0x00000000) somewhere. If you call ble_nus_string_send() with a longer length than 20 bytes it will return NRF_ERROR_INVALID_PARAM.

    The maximum ATT MTU with the S130 v2 is 23 bytes, the header is 3 bytes, so up to 20 bytes of data is allowed.

  • I am using ble_uart example. I'll get the event of BLE_EVT_USER_MEM_REQUEST at the function of on_ble_evt(ble_evt_t * p_ble_evt) if I send 22 characters at iPhone5 using LightBlue. It will cause to system reset after 30 seconds if I don't process it at the event of BLE_EVT_USER_MEM_REQUEST. It will also cause to system reset after 30 seconds if I call the function of sd_ble_user_mem_reply(p_ble_evt->evt.gap_evt.conn_handle, NULL) at the event of BLE_EVT_USER_MEM_REQUEST. I cannot protect my project against causing to system reset if I send over 20 characters at iPhone5 using LightBlue. Can anyone do me a faver? I don't need to support long writes.

Reply
  • I am using ble_uart example. I'll get the event of BLE_EVT_USER_MEM_REQUEST at the function of on_ble_evt(ble_evt_t * p_ble_evt) if I send 22 characters at iPhone5 using LightBlue. It will cause to system reset after 30 seconds if I don't process it at the event of BLE_EVT_USER_MEM_REQUEST. It will also cause to system reset after 30 seconds if I call the function of sd_ble_user_mem_reply(p_ble_evt->evt.gap_evt.conn_handle, NULL) at the event of BLE_EVT_USER_MEM_REQUEST. I cannot protect my project against causing to system reset if I send over 20 characters at iPhone5 using LightBlue. Can anyone do me a faver? I don't need to support long writes.

Children
No Data
Related