iOS BLE disconnect repeatedly wuth connection has timed out unexpectedly

Hey,
since iOS version 18.6.2 the BLE connect to our BLE peripherial with nrf52840 getting disconnect events.
Also the range between them is very bad.
The connection parameter are set with these values

CONFIG_BT_PERIPHERAL_PREF_MIN_INT=12
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=12
CONFIG_BT_PERIPHERAL_PREF_LATENCY=3
CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=200

These are conform the apple connection parameter quidelines

developer.apple.com/.../_index.html

Can anybody help?

Parents
  • Hi Hinnerk,

    We cannot see the connection in the trace. Please filter for the connection. You can refer to this lesson lesson for guidance

    What RSSI do you observe with other devices (two DKs, another phone)?
    What is the TX Power?

  • Hey Benjamin,
    thanks again for your reply. So the trace was filtered for the nrf52840 device with mac address d0:bf:29:46:08:ed
    The iPhone I not sure, because it used a random address.
    So RSSI with a iPhone or Google Pixel 6 tested are that 

    range 1-3 meters = RSSI -30 up to -50
    range 3-6 meters = RSSI -50 up to -75
    range 6-15 meters = RSSI -75 up to -90 
    > 15 meters are disconnect

    TX power is set to max with

    CONFIG_BT_CTLR_TX_PWR_ANTENNA=127

    I'm also try out this config

    CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_CTLR_ADVANCED_FEATURES=y
    CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
    CONFIG_BT_CTLR_TX_PWR_PLUS_8=y


    and set the TX power for the connection event handler to +8dBm

        uint16_t conn_handle;
        bt_hci_get_conn_handle(conn, &conn_handle);
        set_tx_power(BT_HCI_VS_LL_HANDLE_TYPE_CONN,
                     conn_handle,
                     8);

    static void set_tx_power(uint8_t handle_type, uint16_t handle, int8_t tx_pwr_lvl)
    {
        struct bt_hci_cp_vs_write_tx_power_level *cp;
        struct bt_hci_rp_vs_write_tx_power_level *rp;
        struct net_buf *buf, *rsp = NULL;
        int err;
    
        buf = bt_hci_cmd_create(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,
                                sizeof(*cp));
        if (!buf)
        {
            printk("Unable to allocate command buffer\n");
            return;
        }
    
        cp = net_buf_add(buf, sizeof(*cp));
        cp->handle = sys_cpu_to_le16(handle);
        cp->handle_type = handle_type;
        cp->tx_power_level = tx_pwr_lvl;
    
        err = bt_hci_cmd_send_sync(BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL,
                                   buf, &rsp);
        if (err)
        {
            uint8_t reason = rsp ? ((struct bt_hci_rp_vs_write_tx_power_level *)
                                        rsp->data)
                                       ->status
                                 : 0;
            LOG_WRN("Set Tx power err: %d reason 0x%02x\n", err, reason);
            return;
        }
    
        rp = (void *)rsp->data;
        LOG_INF("Actual Tx Power: %d\n", rp->selected_tx_power);
    
        net_buf_unref(rsp);
    }

  • Hi Hinnerk,
    Thanks you for the new details.

    For the trace, you need to filter for the connection. The sniffer capture the connection request to learn the parameters to hop in sync with the devices. Please see the exercise for a step-by-step guide on how to do it. We will need this trace to help you with your problem.

    Regards,
    Benjamin

Reply Children
No Data
Related