ble_app_interactive using gatt to send command

Hello,

I am using nRF52840 DK to build ble_app_interactive.

Now I have device with NUS,I can connect to device using ble_app_interactive.

I have added NUS into ble_app_interactive,and I tried using gatt to send command.

But it shows the selected service does not contain the characteristic. I am sure that I have NUS in the device,and I can use nRF connect app to see it.

I want to ask if there is any step I did wrong, thank you.

  • Hello,

    Thanks for reply.

    Now I have tried sdk 17.1.0 and tried gatt services MAC address.

    But there is still a problem exist.System reset and disconnect, no characteristics show.

    Here is the command I sent

    uart_cli:~$ connect F9:28:E7:D2:F5:5B
    connect F9:28:E7:D2:F5:5B
    <info> app: CENTRAL: Connecting...
    Connected to address: F9 28 E7 D2 F5 5B
    <info> app: CENTRAL: Connected, handle: 0.
    Current MTU: 128
    MTU changed successfully
    <info> app: Data length updated to 27 bytes.
    uart_cli:~$ gatt services F9:28:E7:D2:F5:5B
    gatt services F9:28:E7:D2:F5:5B
    <error> app: Fatal error
    <warning> app: System reset


    BLE app with command line interface example started.
    Press Tab to view all available commands.

    Thank you.

  • Hello,

    Please try again with the "Debug" configuration. This will replace the "fatal error" message with a more detailed crashlog that will point to the actual error.

  • Hello,

    Thanks for the reply.

    Now I get more message.

    It shows

    uart_cli:~$ gatt services F9:28:E7:D2:F5:5B
    gatt services F9:28:E7:D2:F5:5B
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at D:\Keil_v5_1\nRF5_SDK_17.1.0_ddde560\ examples\ble_central_and_peripheral\experimental\ble_app_interactive\ble_m.c:105 2
    PC at: 0x0003CB61
    <error> app: End of error report

    Thank you

  • Hello,

    Thanks. So the NO_MEM error is returned by the sd_ble_uuid_vs_add() call. This means you have to increase the size of the vendor specific UUIDs buffer in the Softdevice to allow the app to buffer all the UUIDs from your GATT server . The buffer size is adjusted through the NRF_SDH_BLE_VS_UUID_COUNT setting in sdk_config.h

  • Hello,

    I have modified NRF_SDH_BLE_VS_UUID_COINT setting in sdk_config.h.

    But when I modify the number to 4 or more ,it shows these message.

    <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
    <warning> nrf_sdh_ble: Change the RAM start location from 0x200079E0 to 0x200079F0.
    <warning> nrf_sdh_ble: Maximum RAM size for application is 0x38610.
    <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at D:\Keil_v5_1\nRF5_SDK_17.1.0_ddde560\examples\ble_central_and_peripheral\experimental\ble_app_interactive\ble_m.c:1713
    PC at: 0x0003DC13
    <error> app: End of error report

    Thank you

Related