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

S132 v2 how to pass 6 packets per connection interval?

How to enable passing 6 packets per one connection interval (BLE UART Central + Peripheral example)? (7.5ms connection interval)

Parents
  • I have made an example for you. I used ble_app_uart and ble_app_uart_c from SDK11.0.0-2.alpha as starting points. It is tested with two PCA10040 boards, and I have only changed the PCA10040 projects.

    I removed the SoftDevice Handler library, since it doesn't support the latest release yet. I added functions for enabling the SoftDevice and BLE and for getting events from the SoftDevice, ble_stack_init() and SWI2_EGU2_IRQHandler(), respectively.

    Both sides have a while(clear_to_send) in main(). In this while notifications(peripheral) and write commands(central) will be sent until BLE_ERROR_NO_TX_PACKETS is returned. clear_to_send will be set to true again when the BLE_EVT_TX_COMPLETE event is received (see ble_evt_dispatch()). I haven't implemented echo functionality.

    The payload size is 20 bytes, the connection interval is 7.5 ms, and 6 packets will be sent each way in each connection interval.

    Please be aware that this is not well tested, and is given as a proof of concept.

    I recommend you to have a separate copy of SDK11.0.0-2.alpha for use with S132 2.0.0-8.alpha. You need to add the header files that come with the SoftDevice download to components\softdevice\s132\headers in the SDK.

    Here are the projects. Add "ble_app_uart_S132 2.0.0-8.alpha" to \examples\ble_peripheral and "ble_app_uart_c_S132 2.0.0-8.alpha" to \examples\ble_central in the SDK.

Reply
  • I have made an example for you. I used ble_app_uart and ble_app_uart_c from SDK11.0.0-2.alpha as starting points. It is tested with two PCA10040 boards, and I have only changed the PCA10040 projects.

    I removed the SoftDevice Handler library, since it doesn't support the latest release yet. I added functions for enabling the SoftDevice and BLE and for getting events from the SoftDevice, ble_stack_init() and SWI2_EGU2_IRQHandler(), respectively.

    Both sides have a while(clear_to_send) in main(). In this while notifications(peripheral) and write commands(central) will be sent until BLE_ERROR_NO_TX_PACKETS is returned. clear_to_send will be set to true again when the BLE_EVT_TX_COMPLETE event is received (see ble_evt_dispatch()). I haven't implemented echo functionality.

    The payload size is 20 bytes, the connection interval is 7.5 ms, and 6 packets will be sent each way in each connection interval.

    Please be aware that this is not well tested, and is given as a proof of concept.

    I recommend you to have a separate copy of SDK11.0.0-2.alpha for use with S132 2.0.0-8.alpha. You need to add the header files that come with the SoftDevice download to components\softdevice\s132\headers in the SDK.

    Here are the projects. Add "ble_app_uart_S132 2.0.0-8.alpha" to \examples\ble_peripheral and "ble_app_uart_c_S132 2.0.0-8.alpha" to \examples\ble_central in the SDK.

Children
Related