Questions about testing the coap_client and coap_server demo while using openthread network

Hello,

        I Use the nRF52840DK and nRF21540DK to test the coap_client and coap_server demo ,SDK is ncs-2.2.0 ,IDE is VS Code .

        1. I want to extend the communication distance, so I use the nRF21540DK ,when compile the program ,the board which I selected is nrf21540dk_nrf52840 ,when finished compile ,I check the .config file in build/zephyr folder. and the config item was all add ,so I think my operation is OK.

# CONFIG_MPSL_FEM_ONLY is not set
CONFIG_MPSL_FEM_ANY_SUPPORT=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SUPPORT=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SPI_SUPPORT=y
CONFIG_MPSL_FEM_NCS_SUPPORTED_FEM_USED=y
CONFIG_MPSL_FEM_API_AVAILABLE=y
CONFIG_MPSL_FEM=y
CONFIG_MPSL_FEM_NRF21540_GPIO=y
# CONFIG_MPSL_FEM_NRF21540_GPIO_SPI is not set
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=10
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=20
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB=10
CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB=13
# CONFIG_MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL is not set
# CONFIG_MPSL_FEM_POWER_MODEL is not set
CONFIG_MPSL_FEM_DEVICE_CONFIG_254=y
# CONFIG_MPSL_FEM_LOG_LEVEL_OFF is not set
# CONFIG_MPSL_FEM_LOG_LEVEL_ERR is not set
# CONFIG_MPSL_FEM_LOG_LEVEL_WRN is not set
# CONFIG_MPSL_FEM_LOG_LEVEL_INF is not set
CONFIG_MPSL_FEM_LOG_LEVEL_DBG=y
CONFIG_MPSL_FEM_LOG_LEVEL=4
CONFIG_MPSL_THREAD_COOP_PRIO=0
CONFIG_MPSL_WORK_STACK_SIZE=1024
CONFIG_MPSL_TIMESLOT_SESSION_COUNT=0
# CONFIG_MPSL_ASSERT_HANDLER is not set
# CONFIG_MPSL_LOG_LEVEL_OFF is not set
# CONFIG_MPSL_LOG_LEVEL_ERR is not set
# CONFIG_MPSL_LOG_LEVEL_WRN is not set
# CONFIG_MPSL_LOG_LEVEL_INF is not set
CONFIG_MPSL_LOG_LEVEL_DBG=y
CONFIG_MPSL_LOG_LEVEL=4

        To see the difference in transmission power ,I Use the nrf802154_sniffer and Wireshark to capture the packets of nRF52840DK and nRF21540DK ,I found the RSS display on Wireshark no difference ,the captured RSS are all -18dbm. 

        I tried to modify the tx power in conf as below ,but the captured RSS as the same .

CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20

        My question is that why captured RSS is the same ?

        I found thers is no log in nRF21540 module , What should I do to verify that nRF21540 really works ?

        2、When I captured the CoAP packets ,I found unique send Only send packet once ,but mesh multicast send will send packet four times , Wireshark show that three times are Retransmission ,in the four times transmission ,some transmission's RSS is -18dbm ,and some is -65dbm .as below .

        My question is that the feature of four transmissions while multicast ,Does this feature belong to the coap protocol or the thread protocol or developed in user application ?

        Why the RSS of four transmission is not the same ?

        

        Best Regards,

        Hyman

Parents
  • hyman said:
    I have seen the the retransmit messages while using UDP multicast .I want to know how to disable the characteristic of retransmission while using UDP multicast .

    See this answer.

    hyman said:

    When I test coap_client and coap_server demo ,I use nRF21540DK(select nRF21540DK_nRF52840 ) and nRF52840DK((select nRF52840DK_nRF52840 ) ),I want to evaluate nRF21540 ,but I can't see any log about nRF21540. I put the two DK very close to sniffer board (<5cm),I see the RSS is the same ,when I modify the conf of  nRF21540DK(select nRF21540DK_nRF52840 )  CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB from 10 to 20 ,I found the RSS also the same .so I don't think it works properly.

            Colud you help me how to let the nRF21540DK work properly?

    There have been some issues with this before, which is why I asked you to try with nRF Connect SDK v2.3.0. You may also try to include this fix if you do not want to upgrade the version.

Reply
  • hyman said:
    I have seen the the retransmit messages while using UDP multicast .I want to know how to disable the characteristic of retransmission while using UDP multicast .

    See this answer.

    hyman said:

    When I test coap_client and coap_server demo ,I use nRF21540DK(select nRF21540DK_nRF52840 ) and nRF52840DK((select nRF52840DK_nRF52840 ) ),I want to evaluate nRF21540 ,but I can't see any log about nRF21540. I put the two DK very close to sniffer board (<5cm),I see the RSS is the same ,when I modify the conf of  nRF21540DK(select nRF21540DK_nRF52840 )  CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB from 10 to 20 ,I found the RSS also the same .so I don't think it works properly.

            Colud you help me how to let the nRF21540DK work properly?

    There have been some issues with this before, which is why I asked you to try with nRF Connect SDK v2.3.0. You may also try to include this fix if you do not want to upgrade the version.

Children
  • Hi,

            I have download the NCS SDK v2.3.0 ,but I found the modification on github was not commit to the SDK v2.3.0 ,then I include the patch Manually . The test result is also incorrect .The RSSI is very weak ,nRF21540DK not work properly .

            Colud you help me how to let the nRF21540DK work properly?

            Thanks,

            Best Regards,

            Hyman

  • The config CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB will only set the TX GAIN of the FEM, but the system level TX output power is set to 0 dBm by default, which will cause the nRF52xxx chip's TX output power to be lowered to match the system output power. To increase the system level output power, you need to set this for the protocol that you are using (e.g. BLE or OpenThread). For OpenThread, you can use set CONFIG_OPENTHREAD_DEFAULT_TX_POWER to the desired output power (range=[-40, 20]). I tested this with the OpenThread CLI example in nRF Connect SDK v2.3.0 and it gives the correct output power with the nRF21540 DK. The CLI sample also allows you to change the  TX output power dynamically using "ot txpower" command, which makes it easy to test different settings. If you run the CLI example on two boards in the same network, send a ping to the second board after changing txpower, the run "ot neighbor table" command on the second board to see last RSSI.

  • Hi,Jorgen,

            Thanks for your reply.

            I followed the method you said, but I didn't get the same results as you did. My test procedure are as follows:

            1.I used NCS2.2.0 before, now I get the NCS2.3.0 from FAE ,and test with NCS2.3.0.

            2.I don't I include the patch you metioned seveyal days ago .and use ncs2.3.0 directly to test .

            3.I create a CLI project ,add "CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20" in file of prj.conf,and then compile with the board "nrf21540dk_nrf52840", then download to two nrf21540dk boards.

            4.When test ,the test board put on the desk very close.

            5.I config the open thread network through ot command ,and then operate as you described. I got the follow result.

            The questions as below 

            1.The RSSI is the same when txpower is -40dbm and -20dbm.

            2.The RSSI is the same and didn't change when txpower is bigger than 0dbm.

     

            The test result is not same with what you said ,Could you help me to find out the problem .

            For compara testing, I alse use two nRF52840DK to test the program ,I compile the CLI using board "nrf52840dk_nrf52840" ,and then download to two nRF52840DK boards.the two test board put on the desk very close.

            

            I use the same test method ,the result as below:

            I found the RSSI @0dbm in nrf52840dk as the same with the nrf21540DK.

            So, I guess that the nrf21540DK run not correct .

            This problem has been troubling us for a long time ,and our project was delay for lot of time .

            Colud you help me how to let the nRF21540DK work properly?

            Could you please share your hex file to me ,and I test with your hex file .

            Best Regards,

            Hyman

  • Hi,Jorgen,

            Have you received my feedback .Could you please solve my problem as soon as possible .

            Thanks very much .

  • Hi,

            Is there anyone who can answer my question? Is nRF21540 available in the newer SDK?

            I've been waiting for days. If it doesn't work correct in the newer SDK ,please let me know .

            Thank you very much .

Related