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

Does the nRF52840DK[PCA10056] support IPSP service serialization (e.g. sd_ble_l2cap_ch_setup) connected with pc-ble-driver?

I tried to port the example "ble_app_ipsp_initiator" to pc-ble-driver and run on Linux. The peer device is another PCA10056 device running ble_app_ipsp_acceptor. The problem is that sd_ble_l2cap_ch_setup() always returns "NRF_ERROR_RESOURCES".

However, it works fine if I just take and run ble_app_ipsp_initiator example standalone without pc-ble-driver. As far as my know, pc-ble-driver will apply some patches and build a special firmware (softdevice?) in the hex folder.

Do I need to include additional patches related to L2CAP to make it work?

I followed the instructions of pc-ble-driver and built the s140 softdevice (connectivity_1.0.0_1m_with_s140_6.1.1.hex). In addition, I added a file "ble_l2cap_impl.cpp" for l2cap serialization as below.

Here is the parameter when calling sd_ble_l2cap_ch_setup(). It applies the settings as same as ble_ipsp.c.

From the document, NRF_ERROR_RESOURCES may be caused by the value of ch_count. Therefor, I also attached the setting as well.

Results:
Here are the raw logs captured in ble_common.cpp. When running the code, everything is fine except for the return status of sd_ble_l2cap_ch_setup().

Thanks