ble app uart

Hi:

I use nrf52832 to connect to the sensor module through uart. When the sensor device is turned off, I can repeat the pairing and unpairing of the Ble module through the nRF Connect app. But after the Ble module pairing is completed and the sensor is turned on, when I cancel the Ble pairing and want to re-pair, I cannot scan the Ble device and cannot pair. How can I solve it

  • Hi Karl:

    This picture is the message that appeared in the nRF Connect Log when I unpaired

    The pictures are the screen that appears on nRF Connect when I want to re-pair again, and the message that appears in the log

    In the example of ble app uart, the code I modified is as follows:

    #define BLE_GATT_ATT_MTU_DEFAULT          247     //23

    #define MIN_CONN_INTERVAL MSEC_TO_UNITS(20, UNIT_1_25_MS)      //20
    #define MAX_CONN_INTERVAL MSEC_TO_UNITS(30, UNIT_1_25_MS)     //70

  • Oh, my apologies - I meant to say that I would like to see the peripheral's side log.
    The UART example by default logs using the RTT backend, which you can see either in the debug terminal in Segger Embedded Studios, or in the standalone RTT Viewer application by SEGGER.
    Please instead show me this log for the scenario in which this behavior occurs.

    nicky_liu said:
    In the example of ble app uart, the code I modified is as follows:

    Thank you for specifying.

    Best regards,
    Karl

  • Do you want to confirm the operation of the sensor device?
    When the Ble is unpaired, the sensor will continue to send data to the BLE module through uart

  • No, I would like to see the loggers output from the nRF52832 that is connected to your sensor device.
    Are you using Segger Embedded studios to do your programming?
    If so, start a debugging session and click to view the debug terminal before you start the program - there should be a message reading "Debug logging for UART over RTT started." at the very start of the program, for instance.

    Best regards,
    Karl

  • Hi Karl:

      I restarted an unmodified uart_app_ble project and used bebug Treminal. The information I received when I want to re-pair the device is as follows

    <info> app_timer: RTC: initialized.
    <info> app: Debug logging for UART over RTT started.
    <info> app: Connected                                 
    <info> app: Data len is set to 0xB6(182)
    <info> app: Disconnected
    <info> app: Connected                       <========When I want to re-pair
    <info> app: Data len is set to 0xB6(182)
    <error> app: Fatal error

Related