Central and peripheral Coded Phy running in nRF5340 and nRF52840 DKs

Hi, 

I have nRF5340 DK and nRF52840 DK and Flashed Central_hr_coded in nRF52840, Peripheral_hr_coded in nRF5340 DK. Followed the steps of Testing as showed in below link. 

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/central_hr_coded/README.html#bluetooth-central-hr-coded

In the Putty and nRF terminal of VS Code, It is not showing the device connected.

1)My question is can we run the central and peripheral_hr_coded in different DKs? Any configuration need to change to allow both DKs connected to see the data in terminal?

2)I have tried to test the Peripheral_hr_Coded sample to see the HR data in nRF Connect App. The Device Name is not visible in App even though I added  CONFIG_BT_DEVICE_NAME="CODED PHY TEST". in prj.conf file. 

3)I would like to test Coded_PHY sample program for nRF5340 DK. Any Sample Coded PHY program to test the BLE Long range and Max data transfer to check?

Any Help Appreciated.

Thanks & Regards

Yashwanth

  • Hi Yashwanth

    1. Yes, you should be able to run the HR Coded projects on two different DKs and make them connect to each other. As long as one DK is flashed with the Central Heart rate monitor and one is flashed with the Peripheral sample that should be good. You need to have two terminal windows each connected to one of the DKs and you should see logging from both devices.

    2. Then my guess is that your phone doesn't support the Coded PHY. What phone are you running the nRF Connect app on?

    3. To test the throughput I would recommend using the throughput sample. The Coded PHY should work for the nRF5340 here as well. You can also check out this Novelbits guide that describes how to get the highest possible throughput.

    Best regards,

    Simon

  • Hi Simonr,

    Thanks for your reply. 

    1. I have flashed nRF5340 with Peripheral HR Coded and nRF52840 with Central HR Coded. But when I connected DKs over Putty to see data over terminal, I can see only below (nRF5340) . 

    *** Booting Zephyr OS build v2.7.99-ncs1-1 ***
    Bluetooth initialized
    Created adv: 0x20000988
    Advertiser 0x20000988 set started
    [00:00:00.279,418] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.279,418] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
    [00:00:00.279,449] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 223.20160 Build 1719410646
    [00:00:00.281,646] <inf> bt_hci_core: Identity: MAC Address(random)
    [00:00:00.281,646] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x22b0, manufacturer 0x0059
    [00:00:00.281,677] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x22b0

    On Putty, I have set as Baud rate:115200, 8 data bits, 1 stop bit, No parity, HW flow control: None

    and no output on Putty with Central (nRF52840) on other PC. Is nRF52840 connects with nRF5340? How it can be seen?

    2) Yeah, My Phone (Samsung A31) doesn't support Coded PHY, But the device is visible in scanner of nRF Connect App. But when I set name in prj.conf as  CONFIG_BT_DEVICE_NAME="CODED PHY TEST". It is visible as N/A. Is it because My Phone doesn't support CODED PHY? Or any configuration change needed to visible the name?

    The another Mobile (POCO C31) I have supports Coded PHY and the device is not visible in Scanner.  

    3)Yeah, I have tried throughput sample on the above two different Dks (nRF5340 (As Tester) and nRF52840 (As peer)). I don't see any output as in the link. Any thing I missed to setup configuration because of two different DKs?

  • Hi

    1. This log you're showing seems to be from the incorrect COM port (probably the NET core) which won't give you much logging info on the connection. Have you tried the other COM ports as well? Please read the "Testing" section of the sample project readme files (Central and peripheral) for info of how it should look and how to set up Putty correctly.

    2. I think the reason the name isn't visible on your Samsung is because the name is advertised on the secondary channels instead of primary adv channels, so the Samsung doesn't pick up the device name, only the advertising indication on the primary channels.

    3. Do you have any more information on what's going wrong with these devices other than you not seeing any output? How are they set up with your computer?

    Best regards,

    Simon

  • Hi Simonr,

    I have gone through the settings to setup putty. Only peripheral side it is showing as above log in nRF terminal of VS Code. 

    Actually I'm new to this and  I'm trying to work on Coded PHY Sample to test the long range and High Data throughput. 

    I found this example. 

    /cfs-file/__key/communityserver-discussions-components-files/4/0508.peripheral_5F00_uart_5F00_throughput.zip

    LE PHY getting updated as per  BT_CONN_LE_PHY_PARAM_2M.

    I have changed this to BT_CONN_LE_PHY_PARAM_CODED  to enable CODED PHY and  added 

    CONFIG_BT_EXT_ADV=y in prj.conf file. But it is not showing any devices in nRF Connect Mobile App. (In My Mobile (Samsung A31) device can be visible in Scanner).
    1)May I know what are the changes need to update to work as CODED PHY?
    2)As CONFIG_BT_L2CAP_TX_MTU = 247 in prj.conf file. Can we change it to 512 as max data size to send? I changed the value of it. But again it is the default size taking as 247. How this can be enabled to get max data transfer?
    3)The data length  here is 27 bytes. Is it the packet size every time it advertises? can we increase this value?
    Regards,
    Yashwanth
  • Hi

    We have a Coded PHY sample project as well in the nRF Connect SDK in the heart rate monitor with Coded PHY samples. Note that it's strongly recommended to lower the MTU size to 27 when using the Coded PHY. Since Coded PHY sends all packets 8 times longer packets have a large chance of packet loss with more data on the air for a longer period of time. It is better for both throughput and packet error rate to split the payload into several packets of 27 bytes when using the Coded PHY. The 247 MTU sizes are only recommended with the 1MBPS and 2MBPS PHY.

    Best regards,

    Simon

Related