BLE long range

Hi, I want use BLE long range in nrf52840, nrf connect SDK v2.4.0. Is there any example of ble long range?

Thanks.

Parents Reply
  • Hi thang47,

    If you read the documentation of the samples, you can see that in the Testing section, the expected log is:

    Connected: xx.xx.xx.xx.xx.xx (random), tx_phy 4, rx_phy 4

    You can then find in the source code that the log line is produced in the connected() callback:

    		phy_info = info.le.phy;
    		printk("Connected: %s, tx_phy %u, rx_phy %u\n",
    				addr, phy_info->tx_phy, phy_info->rx_phy);

    If you the trace the declaration of the tx_phy, you can find how the value is defined:

    struct bt_conn_le_phy_info {
    	uint8_t tx_phy; /** Connection transmit PHY */
    	uint8_t rx_phy; /** Connection receive PHY */
    };
    
    /** Connection PHY options */
    enum {
    	/** Convenience value when no options are specified. */
    	BT_CONN_LE_PHY_OPT_NONE = 0,
    
    	/** LE Coded using S=2 coding preferred when transmitting. */
    	BT_CONN_LE_PHY_OPT_CODED_S2  = BIT(0),
    
    	/** LE Coded using S=8 coding preferred when transmitting. */
    	BT_CONN_LE_PHY_OPT_CODED_S8  = BIT(1),
    };

    From that, the PHY is Coded S8, so a speed of 125kbs.

Children
Related