Configure Coded PHY

Hi. I am trying to configure Coded PHY on my custom boards using nRF52840 (module ACN52840), I am using nRF Connect SDK v2.4.0. For communication, I am using NUS UART service, modified to not use physical UART, only communication with calling NUS functions. I have also tried to set Coded PHY communication for my central and peripheral codes using reference from samples Peripheral HR Coded and Central HR Coded. I did all settings in prj.conf and in code from Coded HR examples in my codes, also did get bt_conn_le_phy_info information (tx_phy 4, rx_phy 4, couldnt find what 4 mean, maybe Coded?) from both peripheral and central:

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

But I think I still didnt set Coded PHY. I was trying this codes with my boards (one central and one peripheral) outside, with direct visibility between both boards and I lost signal after approximately 70 meters. In inside it is even worse, I lost signal after approximately 8 meters, between boards was only one block wall with a thickness of 30 cm. I want to use chip nRF52840 for small network, with some inside and also outside sensors nodes using nRF52840, but range is very small.

I was also trying to set transmit power in prj.conf to use maximum +8dB, but it didnt help. Is it really everything in Peripheral HR Coded and Central HR Coded what I need to set? I have found some other structures struct bt_conn_le_tx_power and struct bt_conn_le_phy_param which might also set Coded PHY, but are not used in HR Coded examples, so I dont know. I hoped for better range coverage, outside range could be sufficient for me, but inside is not. I will provide my codes and also photo of my board with nRF52840. Thanks for any help setting Coded PHY.


/cfs-file/__key/communityserver-discussions-components-files/4/3286.main_5F00_central_5F00_coded.c
/cfs-file/__key/communityserver-discussions-components-files/4/4572.prj_5F00_central_5F00_coded.txt

/cfs-file/__key/communityserver-discussions-components-files/4/0363.main_5F00_peripheral_5F00_coded.c
/cfs-file/__key/communityserver-discussions-components-files/4/8867.prj_5F00_peripheral_5F00_coded.txt





  • I believe "tx_phy 4, rx_phy 4" is in fact Coded PHY. 

    I think there's an issue with the design of your board, there should be a keep-out area on both sides of the module, at the right edge of the motherboard. The problem here is that the antenna of the module is 'de-tuned' by the presence of metal in its 'near-space'.

    For reference you should should get ~1km range (outdoor, line-of-sight) with Coded PHY at +8dBm on a decent board. I suggest that you either get the module's Evaluation Kit from the manufacturer of the module, or get the nRF52840DK from us, as a reference. 

    Note:
    Coded PHY trades 8x longer on-air time per symbol for a higher receiver sensitivity. Where a higher sensitivity means that the receiver can resolve signals that are of lower power than regular 1mbps PHY (longer range). 

    However, that 8x longer on-air time is also 8x more likely to encounter spurious interference from other radios, especially Wi-Fi routers. That means that if you are in a typically noisy environment like an office space, the likelyhood that any given BLE packet will be successfully transmitted can be lower for Coded than 1mbps PHY. In this scenario, Coded PHY will still have longer max range than 1mbps if a given Coded PHY transmission is not interferred with. 

    The opposite is true for 2mbps PHY, where a lower receiver sensitivity is traded for shorter on-air time per symbol. In extremely noisy environments 2mbps PHY can actually have significantly higher throughput than 1mbps or Coded PHY (at a range where the throughput of 1mbps and Coded PHY are closer to zero), but with much shorter max range.

    -edit:

    If you share your schematics and layout files we can take a look and see if there are any other issues.

  • Hi and thanks for your answer. I didnt send you the other side of board, there is a cutout for antenna, see in image of my board below:

    I also did some testing with two nRF52840dongle boards which I have. I have tried the same code above with Coded PHY, got same results (Connected: xx.xx.xx.xx.xx.xx (random), tx_phy 4, rx_phy 4) and the range was the same, at least in indoor environment. Is dongle capable of long ranges, are there any restrictions regarding the antenna of dongle board? Because the results look same, and this is original Nordic board.

    I dont know what to test next, I dont have a nRF52840DK or other board from you. I am starting thinking to use external antenna, but I dont know if it will help.

    Thanks for your answer.  

  • The nRF52840 dongle does not have a good antenna due to it's tiny ground plane and is not suited for applications where range is critical. 

    I suggest you cut off the piece of board I've outlined below, use a hacksaw or dremel: 

      

    Can you share your layout files?

  • Hi, sorry for late reply. So we did cut off a piece of board as you suggested, but only the smaller portion of it, as we couldnt cut more because of wiring on board. I am sending you a photo. 

    But this cut off didnt help, I am getting the same results as before. The outside tested range with direct visibility is 63 m (according to Google Maps, set Coded PHY and 8 dBm power). The inside range is also low, same as before (approximately 8 meters, between boards only one block wall with a thickness of 30 cm). I have also tried to direct antenna acccording to radiation diagram of antenna (found here https://www.infineon.com/dgdl/Infineon-AN91445_Antenna_Design_and_RF_Layout_Guidelines-ApplicationNotes-v09_00-EN.pdf?fileId=8ac78c8c7cdc391c017d073e054f6227), it added some small distance, outside maybe 5 meters and inside almost nothing....

    I dont think that bigger cut off which you suggest would make any major difference.... We have been also testing the transmit power of our board and dongle nrf52840 with spectrum analyzer and receiving antenna, and we have found out that they both have the same transmit power. We are really confused by it, as you have also mentioned that dongle does not have as good antenna as nrf module which we are using, but the results were the same (we have been testing without cut off). Also I have found some thread here (5 years old, https://devzone.nordicsemi.com/f/nordic-q-a/48978/no-measurable-range-increase-using-long-range-bluetooth-le-coded-phy), where they have been able to get 300 m distance from two dongles using Coded PHY, I have been testing it and I could not get nowhere near this number. I dont know if I have some strange conditions for my boards, or using bad code to set Coded PHY (I am using examples provided from Nordic) or something else... Would be possible for you to confirm that dongle is able to achieve 300 m distance with Coded PHY? Thanks for any help.  

  • This might be unrelated, but you need to enable CONFIG_LOG_MODE_DEFERRED. 

    How do you determine the range? is it the range at which you get a BT disconnect event?

    What are your connection parameters? interval, slave latency, MTU size, DLE length and size, ect.

    Can you share your project as a whole?

    One potential HW issue could be a noisy USB3 port. 

Related