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

Cannot find nRF5340DK in Wireshark (using Sniffer for 802.15.4)

Hello,

I am trying to measure the RSSI value of the Zigbee communikation on nRF5340DK.

Right now I have programmed light_buld into one of the DK and light_switch into the other and they are working fine. 

I have followed the instruction for downloading nRF Sniffer for 502.15.4(Wireshark and Python too) but I cannot find anything on Wireshark.

To be honest, I am not very sure how this works. Is it even possible to use the sniffer on a nRF5340DK to begin with?

I also need help with getting the RSSI value. Is there any other way to get RSSI value than just by using the sniffer? If there is, how can I do that??

Best Regards 

Michey

  • Hi,

    The nRF Sniffer for 802.15.4 required either a nRF52840 DK or a nRF52840 dongle as harware, the easiest and cheapest way is to use the dongle for setting up the sniffer. The sniffer software is not supported on nRF5240DK yet.

    You can also use the Zigbee endpoint logger as a replacement of the nRF Sniffer for 802.15.4 when using the nRF5340DK. Enabling the Zigbee enpoint logger ligbrary with the Zigbee light bulb sample allows it to log on/off commands received from the Zigbee light switch, so I think it will give you what you are looking for when working with the nRF5340 DK.

    You can read how to enable the Zigbee endpoint library logger in Kconfig following the documentation here:https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/zigbee/zigbee_logger_eprxzcl.html?highlight=rssi#configuration

    Best regards,

    Marjeris

  • Hi, thank you for the reply 

    I am not sure in what way I can get the RSSI value by using Zigbee endpoint logger. Could you explain more on how I get the RSSI value? 

    And regarding the endpoint logger, I have to write this in the code:

    ZB_AF_REGISTER_DEVICE_CTX(&your_device_ctx);
    ZB_AF_SET_ENDPOINT_HANDLER(your_ep_number, zigbee_logger_eprxzcl_ep_handler);

    Should I use "&dimmable_light_ctx" as my "&your_device_ctx"?

    However, I do not know what "your_ep_number" and "zigbee_logger_eprxzcl_ep_handler" should be.

    Is "your_ep_number"  the number of endpoints that i want to have? (in my case, its just 1 right?)

    and is "zigbee_logger_eprxzcl_ep_handler" just "zigbee_logger_eprxzcl_ep_handler"

    Best Regards,

    Michey

  • Hi,

    Sorry for the late reply. When the function zigbee_logger_eprxzcl_ep_handler() is called as a callback bound to endpoint via ZB_AF_SET_ENDPOINT_HANDLER() it should produce a log line that includes the RSSI reading.

    your_ep_number is the specific endpoint for which you want to register a cluster command handler. For example for the light bulb sample the device endpoint is defined as:

    /* Device endpoint, used to receive light controlling commands. */
    #define HA_DIMMABLE_LIGHT_ENDPOINT      10
    

    In the light bulb sample the device context is already registered in main():

    	/* Register dimmer switch device context (endpoints). */
    	ZB_AF_REGISTER_DEVICE_CTX(&dimmable_light_ctx);

    Do you still have problems implementing the zigbee_logger_eprxzcl_ep_handler() function?

    Best regards,

    Marjeris

  • Hello, thank you for the reply!

    The problem I have now is that zigbee_logger_eprxzcl_ep_handler() function should have an argument which is a reference to zigbee buffer holding received zcl command to be logged. But I do not know where to find this argument. 

    if i write like this:

    ZB_AF_SET_ENDPOINT_HANDLER(HA_DIMMABLE_LIGHT_ENDPOINT, zigbee_logger_eprxzcl_ep_handler());

    i get the error :
    too few arguments to function 'zigbee_logger_eprxzcl_ep_handler'

    and if i write like this (with no paratheses):

    ZB_AF_SET_ENDPOINT_HANDLER(HA_DIMMABLE_LIGHT_ENDPOINT, zigbee_logger_eprxzcl_ep_handler);

    I get the error:
    undefined reference to 'zigbee_logger_eprxzcl_ep_handler'

    I've also written:

            ZB_AF_SET_ENDPOINT_HANDLER(HA_DIMMABLE_LIGHT_ENDPOINT, zigbee_logger_eprxzcl_ep_handler(bufid));

    in zcl_device_cb function and zboss_signal_handler and got the error:
    undefined reference to 'zigbee_logger_eprxzcl_ep_handler'

    I have followed the instruction given here

    Another questions is, will the log line be printed out in the same ways as other logs? Will I be able to see them the normal way in Termite or PuTTY?

    Best regards

    Michey 

  • Hi,

    Have you followed the steps before calling ZB_AF_SET_ENDPOINT_HANDLER(HA_DIMMABLE_LIGHT_ENDPOINT, zigbee_logger_eprxzcl_ep_handler);?

    And are you calling ZB_AF_SET_ENDPOINT_HANDLER after registering your device context with ZB_AF_REGISTER_DEVICE_CTX but before starting the Zigbee stack?

    I may need some time to try to enable the endpoint handler myself to be able to help you better. I will try to come back to you tomorrow fter trying to configure this myself. Thanks for your patience.

    Best regards,

    Marjeris

Related