nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs

BLE_L2CAP_CH_STATUS_CODE_NO_RESOURCES event is coming when when remote device sends l2cap connection request

I am using Nordic Serialisation library, with a nrf52480 chip as connectivity chip and a m4 arm core custom board as Application chip. I am able to establish gap connection from Remote device. But when remote device send request to connect to l2cap channel (with PSM value 129, just for experimentation purpose, I set this value), I am getting BLE Event BLE_L2CAP_CH_STATUS_CODE_NO_RESOURCES from connecticity chip. There is no L2cap request event or anything. .I am directly getting this event. I mean, 

BLE_L2CAP_EVT_CH_SETUP_REFUSED event with status as BLE_L2CAP_CH_STATUS_CODE_NO_RESOURCES.
I have set the l2cap connection configuration as below:
	ble_cfg_t ble_cfg;
	ble_cfg.conn_cfg.conn_cfg_tag = APP_BLE_CONN_CFG_TAG; /* = 1 */
	ble_cfg.conn_cfg.params.l2cap_conn_cfg.ch_count = 1;	
	ble_cfg.conn_cfg.params.l2cap_conn_cfg.rx_mps = 67;
	ble_cfg.conn_cfg.params.l2cap_conn_cfg.tx_mps = 67;
	ble_cfg.conn_cfg.params.l2cap_conn_cfg.rx_queue_size = 4;
	ble_cfg.conn_cfg.params.l2cap_conn_cfg.tx_queue_size = 4;
	err_code = sd_ble_cfg_set(BLE_CONN_CFG_L2CAP, &ble_cfg, NULL);
Parents
  • Hi,

    I am not sure what the problem is here, I assume  you only have one link established.

    If you haven't already I suggest to take a look at the nRF5 SDK example that use L2CAP:
    \examples\ble_peripheral\experimental\ble_app_ots
    \examples\ble_central\experimental\ble_app_ots_c

    You may for instance use one of those examples as peer during testing also. 

    Also double check there are no error does returned by for instance sd_ble_cfg_set() or other softevice api calls.

    If you still have problems, then an on-air sniffer log could be useful. For instance check out nRF sniffer for BLE.

    Best regards,
    Kenneth

  • Also double check there are no error does returned by for instance sd_ble_cfg_set() or other softevice api calls.

    Yeah. Every sd api is returning success only. (As I am using serialization library, in the application chip every sd api call was printed.) 

    If you haven't already I suggest to take a look at the nRF5 SDK example that use L2CAP:

    Okay. Will check and update. 

    Meanwhile, could you please let me know in what all possible scenarios sd will return the above error. As the sd source code is not available, I am not able to figure out what all are the possible scenarios for this event to generate

Reply
  • Also double check there are no error does returned by for instance sd_ble_cfg_set() or other softevice api calls.

    Yeah. Every sd api is returning success only. (As I am using serialization library, in the application chip every sd api call was printed.) 

    If you haven't already I suggest to take a look at the nRF5 SDK example that use L2CAP:

    Okay. Will check and update. 

    Meanwhile, could you please let me know in what all possible scenarios sd will return the above error. As the sd source code is not available, I am not able to figure out what all are the possible scenarios for this event to generate

Children
No Data
Related