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

ble_uart example disconnect after 40 seconds while connected to raspberry-pie

Hi,

i have a problem when using the ble_uart connected to Raspberry-pie withe Bluez.

after 40 seconds the connection is lost.

tried to use several examples, but most of them has the same problem (with different disconnection times).

when used  ble_hrs example the connection is stable.

how can i fix this problem.

Thanks.

Parents
  • Hi Ben, 

    Which version of the SDK you are using? Do you use nRF52840DK?

    Could you provide the sniffer log and print the disconnect reason?

    In ble_evt_handler, you could do something like this:

            case BLE_GAP_EVT_DISCONNECTED:
            
                NRF_LOG_INFO("Disconnected reason: %d.",p_ble_evt->evt.gap_evt.params.disconnected.reason);

    -Amanda H.

  • Hi,

    i am using SDK version 15.3 with Sorfdevice S140 V6.1.1

    the sniffer result:

    114

    0.063 Slave LE 1M LE LL 0 150 0 1 FALSE 158 Empty PDU
    115 0.064 Master LE 1M LE LL 0 48440 1 1 FALSE 159 Empty PDU
    116 0.065 Slave LE 1M LE LL 0 150 1 0 FALSE 159 Empty PDU
    117 0.065 Master LE 1M LE LL 0 48440 0 0 FALSE 160 Empty PDU
    118 0.066 Slave LE 1M LE LL 0 150 0 1 FALSE 160 Empty PDU
    119 0.067 Master LE 1M LE LL 0 48439 1 1 FALSE 161 Empty PDU
    120 0.068 Slave LE 1M LE LL 0 150 1 0 FALSE 161 Empty PDU
    121 0.069 9e:7b:ef:d1:15:e0 LE 1M LE LL 35 49216 0 ADV_IND
    122 0.071 9e:7b:ef:d1:15:e0 LE 1M LE LL 35 360 0 ADV_IND
    123 0.072 9e:7b:ef:d1:15:e0 LE 1M LE LL 35 360 0 ADV_IND

    i get Disconnect reason 0x8 and 0x22

    Thanks.

Reply
  • Hi,

    i am using SDK version 15.3 with Sorfdevice S140 V6.1.1

    the sniffer result:

    114

    0.063 Slave LE 1M LE LL 0 150 0 1 FALSE 158 Empty PDU
    115 0.064 Master LE 1M LE LL 0 48440 1 1 FALSE 159 Empty PDU
    116 0.065 Slave LE 1M LE LL 0 150 1 0 FALSE 159 Empty PDU
    117 0.065 Master LE 1M LE LL 0 48440 0 0 FALSE 160 Empty PDU
    118 0.066 Slave LE 1M LE LL 0 150 0 1 FALSE 160 Empty PDU
    119 0.067 Master LE 1M LE LL 0 48439 1 1 FALSE 161 Empty PDU
    120 0.068 Slave LE 1M LE LL 0 150 1 0 FALSE 161 Empty PDU
    121 0.069 9e:7b:ef:d1:15:e0 LE 1M LE LL 35 49216 0 ADV_IND
    122 0.071 9e:7b:ef:d1:15:e0 LE 1M LE LL 35 360 0 ADV_IND
    123 0.072 9e:7b:ef:d1:15:e0 LE 1M LE LL 35 360 0 ADV_IND

    i get Disconnect reason 0x8 and 0x22

    Thanks.

Children
Related