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

Exception when use Coded PHY for connecting AND advertising with ble_app_att_mtu_throughput sample

HelloI have to evaluate if we can start development with long range (coded phy). I like to see how fare away two devices can be placed to find them (long distance advertising) and then to connect and transfer data on that longer distance.

Modified ble_app_att_mtu_throughput sample to have advertising (!) and connection with Coded PHY....no success. There is an hard fault exception when sd_ble_gap_scan_start() is called.Is there a description what has to be modified on that example to use it with Coded PHY only?
---
Setup: Two PCA10056 develoment board; nRF5_SDK_15.0.0; softdevice s140_nrf52_6.0.0 (contained with SDK_15.0.0); Segger Embedded Studio
See attached file for modification in main() of sample ble_app_att_mtu_throughput

a) Mod in m_test_params
    // +++ MOD LUKE CODED PHY ONLY +++
    //.phys.tx_phys             = BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_CODED,
    .phys.tx_phys             = BLE_GAP_PHY_CODED,
    //.phys.rx_phys             = BLE_GAP_PHY_2MBPS | BLE_GAP_PHY_1MBPS | BLE_GAP_PHY_CODED,
    .phys.rx_phys             = BLE_GAP_PHY_CODED,b) Mod in m_scan_param
    // +++ MOD LUKE CODED PHY ONLY +++
    //.scan_phys     = BLE_GAP_PHY_1MBPS,
    .extended      = 1, // Luke:. ?? needed for scan_phys = BLE_GAP_PHY_CODED
    .scan_phys     = BLE_GAP_PHY_CODED,c) Mod in adv_params
        // +++ MOD LUKE CODED PHY ONLY +++
        //.primary_phy   = BLE_GAP_PHY_1MBPS, // Must be changed to connect in long range. (BLE_GAP_PHY_CODED)
        .primary_phy   = BLE_GAP_PHY_CODED,
        //.secondary_phy = BLE_GAP_PHY_1MBPS,
        .secondary_phy = BLE_GAP_PHY_CODED,Thanks,
Lukas

Parents Reply Children
  • Hello

    you are right. I have to resize the scan_buffer:

    // static uint8_t m_scan_buffer_data[BLE_GAP_SCAN_BUFFER_MIN]; /**< buffer where advertising reports will be stored by the SoftDevice. */
    static uint8_t m_scan_buffer_data[BLE_GAP_SCAN_BUFFER_EXTENDED_MAX]; // NEW: BLE5 extended Advertising ... min. 255 up to 1650 Byte

    In general: I was not trained in debugging with segger embedded studio (used keil v5 in prev. projects) and i also forgot to enable "PRIMASK".

    Many thanks,
    Lukas

Related