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

ble_app_uart_c example not work

Hello!

I have:

  • nRF52840-Preview-DK (pca10056)
  • nRF5_SDK_13.0.0_04a0bfd (s140)

I load **nRF5_SDK_13.0.0_04a0bfd\examples\ble_central\ble_app_uart_c\hex\ble_app_uart_c_pca10056_s140.hex** to first board and **nRF5_SDK_13.0.0_04a0bfd\examples\ble_peripheral\ble_app_uart\hex\ble_app_uart_pca10056_s140.hex** to second board, and it work fine.

Next, I load SoftDevice via nRFgo studio to first board, compile ble_app_uart in IAR and load hex file. It work fine.

Next, I load SoftDevice via nRFgo studio to second board, compile **ble_app_uart_c** in IAR and load hex file. This does not work. I compile **ble_app_uart_c** in Keil and load hex file.  It is not work too: Board get error and reset when try ble_nus_c_tx_notif_enable(p_ble_nus_c) in ble_nus_c_evt_handler... Function  ble_nus_c_tx_notif_enable return NRF_ERROR_INVALID_STATE error, because p_ble_nus_c->handles.nus_tx_cccd_handle == BLE_GATT_HANDLE_INVALID...

Please help me!

Parents
  • Yes, that is most likely the issue. We are using IAR Workbench version 7.80.4 for testing and verification.


    device will be connect to 1 master and 8 slave device

    That is not a problem. The Softdevice have support for 20 concurrent connections, where you can freely configure each link in any combination between Peripheral and Central.

    I wanted use l2cap, but support of l2cap was removed

    I think support for Connection Oriented Channels will be added in S140 when it goes out of alpha. See this post.

    ... Is it posible to do?

    Yes, but unfortunately the ble_app_uart and ble_app_uart_c example does not support this ‘out-of-the-box’ . You will have to combine both the ble_app_uart and ble_app_uart_c examples in order to run both NUS client and server on the same device. The ble_app_att_mtu_throughput or the ble_app_hrs_rscs_relay example should give some idea how to run both server and client on the same device. Get the code working first with support for 1 master and 1 slave. Since you need 8 slave connections, you will also have to implement support for the NUS client to handle this ammunt of devices(only support 1 connection by default). I recommend to take a look at the ble_app_multilink_central example to see how it’s done there. This post could also be a starting point for that.

Reply
  • Yes, that is most likely the issue. We are using IAR Workbench version 7.80.4 for testing and verification.


    device will be connect to 1 master and 8 slave device

    That is not a problem. The Softdevice have support for 20 concurrent connections, where you can freely configure each link in any combination between Peripheral and Central.

    I wanted use l2cap, but support of l2cap was removed

    I think support for Connection Oriented Channels will be added in S140 when it goes out of alpha. See this post.

    ... Is it posible to do?

    Yes, but unfortunately the ble_app_uart and ble_app_uart_c example does not support this ‘out-of-the-box’ . You will have to combine both the ble_app_uart and ble_app_uart_c examples in order to run both NUS client and server on the same device. The ble_app_att_mtu_throughput or the ble_app_hrs_rscs_relay example should give some idea how to run both server and client on the same device. Get the code working first with support for 1 master and 1 slave. Since you need 8 slave connections, you will also have to implement support for the NUS client to handle this ammunt of devices(only support 1 connection by default). I recommend to take a look at the ble_app_multilink_central example to see how it’s done there. This post could also be a starting point for that.

Children
No Data
Related