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

Dual peripheral feature?

I see from the release notes of s132 4.0.0-2.alpha that it adds:

Support for 20 links in total with freely selectable role (Central/Peripheral) for each link.

I want to try this feature, but I can’t find any example for this in SDK 12.2.0 or SDK 13.0.0-1.alpha.

Anyone know if such an example exists?

Parents
  • Actually S132 4.0.0-2.alpha is not compatible with SDK 12.2.0 or SDK 13.0.0-1.alpha, but I made a minimalistic example that demonstrates the dual peripheral feature.

    I used ble_app_uart as a starting point, but I modified it so that two centrals can connect. Then if one client writes into the UART RX characteristic, the data will be notified to the other client, and vice versa.

    I added some logging to make it easy to see the reason, if anything is not working, for example that you haven’t connected two centrals, that you haven’t set the CCCDs to be able to receive notifications, and so on. So I recommend using a terminal on the PC.

    Please add a comment if you have trouble getting it to work.

    The example is not an official release, and is only tested with Keil and PCA10040, and this testing was very superficial.

  • Petter, if you would be able to look into this it would be much appreciated! What I've found so far is that the dual peripheral example does not handle the ATT MTU requests (compared to the ble_app_uart example). I've modified your example a little bit, and here's the modified project. In order to run this example, unzip the v13.0.0 SDK (nRF5_SDK_13.0.0_04a0bfd.zip), create a folder called "test" under examples/, then put the "multi_uart" project in this "test" folder. I have also captured the RTT messages between the "ble_app_uart"/"ble_app_uart_c" and "multi_uart"/"ble_app_uart_c" in a file called "multi_uart_debug.txt". The current issue on the "multi_uart" is "sd_ble_gattc_exchange_mtu_request() returned unexpected value 0x7". Suggestions?

Reply
  • Petter, if you would be able to look into this it would be much appreciated! What I've found so far is that the dual peripheral example does not handle the ATT MTU requests (compared to the ble_app_uart example). I've modified your example a little bit, and here's the modified project. In order to run this example, unzip the v13.0.0 SDK (nRF5_SDK_13.0.0_04a0bfd.zip), create a folder called "test" under examples/, then put the "multi_uart" project in this "test" folder. I have also captured the RTT messages between the "ble_app_uart"/"ble_app_uart_c" and "multi_uart"/"ble_app_uart_c" in a file called "multi_uart_debug.txt". The current issue on the "multi_uart" is "sd_ble_gattc_exchange_mtu_request() returned unexpected value 0x7". Suggestions?

Children
No Data
Related