PHY Coded transmission issue

Hi there!

I face issue with setting the connection using PHY Coded.

I've:

- set the #define NRF_BLE_SCAN_SCAN_PHY 4 (it's Coded one) on Central side.

- forced PHY Coded to be set on GAP Update in "ble_evt_handler" function on both Central and Peripheral side: 

case BLE_GAP_EVT_PHY_UPDATE_REQUEST:
{
ble_gap_phys_t const phys =
{
.rx_phys = BLE_GAP_PHY_CODED,
.tx_phys = BLE_GAP_PHY_CODED,
};

- extended #define NRF_BLE_SCAN_BUFFER 255 on Central side (according to some other DevZone topic)

- let everything else like in PHY 1M project.

But I see it's not PHY Coded, because range didn't extend. What else am I supposed to do?

  • Hi

    Are you sure the peripheral device you connect to is advertising on Coded PHY? Are you testing using two nRF52840 DKs or some other devices? Below I have added a modified version of the ble_app_uart and ble_app_uart_c example projects that both advertise and scan using the Coded PHY, and can connect to one another and transmit UART data over the Nordic UART service.

    Please note that the achieved range will be dependent on the environment you're conducting your tests in.

    Best regards,

    Simon

    7723.Long_range_15.2.zip

  • Thank you so much for your projects!

    I tried to modify mine (seems I forgot of a few things). I'm not gonna list all the changes I made, because after some time I got suspicious about problems other than firmware. Then I've built your projects and run them on my DKs and... they don't connect - one of them blinks LED for advertising, other for scanning. And that's it. My applications don't coonect to each other anymore too.

    Is this possible that your projects contain some error (maybe it's not newest version or somethhing)?

    Or maybe rather it's an  hardware problem - I have one DK 2.0.1, and one PDK 0.9.1. Maybe here is the issue.

  • Are both devices nRF52840 DKs/PDKs? There shouldn't be an issue with this project as far as I know. Did you open the projects in SEGGER Embedded Studios as intended?

    It can also be an issue with bonding information being stored on either device not allowing them to connect. Try running an nrfjprog --eraseall (using the nRF Command Line Tools) on both devices before flashing the projects onto them again.

    Best regards,

    Simon

  • Well, I'd erased Flash with J-FLash Lite before, and done it again with nrfutil, as you wish. But it didn't change the situation too.

    I've opened SES projects from .emProject files in 2 windows.

    Maybe there's some hardware error in PDK - no matter if DK is Central and PDK Peripheral or the opposite - the problem's the same. I don't see "Nordic UART" to be scanned on Android's nRF Connect app - I'm not sure if it should be discovered on ordinary Android smartphone anyway...

  • Hi again

    I just tested the examples I sent you for good measure, and they work as intended on two DKs, so it might indeed be an issue with the PDK. You can try flashing the .hex files from my side to make sure.

    ble_app_uart_c_pca10056_s140.hex

    3348.ble_app_uart_pca10056_s140.hex

    They should connect immediately (LED 1 on both devices staying constantly on) and you should be able to write messages on one UART terminal (like PuTTY) that will output on the other.

    Regarding your Android device, it should be able to scan for and connect to CODED PHY devices if the phone supports it. This is generally not supported in cheaper/older models, but flagship models for most brands the last 2 years or so generally support BLE Coded PHY, so if you have a rather new phone and use the DK as a peripheral I think you should be able to connect to it.

    Best regards,

    Simon

Related