Sample using nrf_802154_receive_at

Hello,

is there any example using the IEEE 802.15.4 driver?

I was able to send and receive a some packets by using nrf_802154_receive and nrf_802154_transmit_raw, and now I would like to synchronize transmission and reception by using nrf_802154_receive_at and nrf_802154_transmit_raw_at. Unfortunately these functions don't even compile because the macro NRF_802154_DELAYED_TRX_ENABLED is not defined.

Where can I find an example that shows how to use those functions?

Best regards

Parents
  • Hello,

    What driver do you refer to? Do you refer to the old legacy nRF5 SDK's IEEE 802.15.4 driver? What SDK version are you using? The nRF5 SDK or the nRF Connect SDK (NCS). 

    And what sample do you refer to?

    Hopefully, a little more context makes it easier to understand what's not working Slight smile

    Best regards,

    Edvin

  • Hi Edvin,

    Sorry for the missing information.

    I'm using NCS 2.5 with the following:

    CONFIG_NRF_802154_RADIO_DRIVER=y
    CONFIG_NRF_802154_SOURCE_HAL_NORDIC=y
    and I'm using the functions defined in nrf_802154.h
    I'm not referring to any example. My question is: where do I find any example for the functions nrf_802154_receive_at and nrf_802154_transmit_raw_at?
    Best regards,
    Giuseppe
  • Yes, CONFIG_NRF_802154_SL_OPENSOURCE is defined. I tired to set CONFIG_NRF_802154_SL_OPENSOURCE=n but since it remain defined it doesn't work. Is this an issue? Should it be

    #if CONFIG_NRF_802154_SL_OPENSOURCE

    instead of

    #ifdef CONFIG_NRF_802154_SL_OPENSOURCE

    Is there any other documentation (apart from API reference which is quite short)?

  • Ok, I need to run this by our Thread and Zigbee team. Is there a particular reason why you intend to use nrf_802154_receive_at() in particular? Perhaps you can describe the use case, and what you want to do with the application?

    Best regards,

    Edvin

  • I want to develop my own protocol on top of IEEE 802.15.4. Thread and Zigbee do not suit my needs. In order to optimize power consumption, I need to synchronize transmission and reception. I managed to do that by using nrf_802154_transmit_raw, nrf_802154_transmit_raw and nrf_802154_sleep, but I suppose that by using nrf_802154_receive_at and nrf_802154_transmit_raw_at it can be more efficient.

    Best regards,

    Giuseppe

  • I see. 

    I see that in the coap_client openthread sample, NRF_802154_DELAYED_TRX_ENABLED is set to true, and nrf_802154_transmit_raw_at() is defined. 

    To be honest, I don't know exactly what in this sample that enables this functionality. But is it possible to upload your current application, so that I can have a look, and see if I am able to enable this API?

    Best regards,

    Edvin

  • Hi Edvin,

    actually I don't have any application. I'm just playing around with the driver, doing some test and trying to understand how to use it.

    That's the reason I opened this ticket: I find the documentation quite poor and I would really appreciate any help.

    Best,

    Giuseppe

Reply Children
  • Hello Giuseppe,

    I understand. Yes. I can agree it is not the most informative documentation. In addition, I have understood that "an 802154 driver is not an 802154 driver", if that makes sense. What I am trying to say is that two arbitary 802154 drivers doesn't necessarily communicate with one another. It depends on what layers it include, such as whether or not they include the MAC layer. I believe part of the reason the documentation is a bit poor is that we don't have any raw 802154 samples, but the 802154 drivers are only used by the Openthread and Zigbee stacks. 

    I assume you already found this, but I'll add the links, just to be sure. 

    1: 802154 driver's readme.

    2: 802154 driver's API documentation.

    Best regards,

    Edvin

  • Hi Edvin,

    Yes I have already found those links. In fact I would like to use the Service Layer which, as stated here: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_802154/doc/rd_service_layer_lib.html "When using the nRF Connect SDK, the nRF 802.15.4 Radio Driver takes advantage of the service layer automatically".

    I just would like to know what is the correct way to enable the delayed functions in zephyr without altering its code. Could you please ask the OpenThread or ZigBee team how to do that?

    BR, Giuseppe

  • Hello,

    I was able to build this application using nrf_802154_transmit_raw_at() (although it doesn't do anything). 

    I found some help looking at the sample found in:

    ncs\nrf\samples\peripheral\802154_sniffer.

    hello_world_802154.zip

    See if you can use this. 

    Most of what was needed was to include these in main.c:

    #include <nrf_802154.h>
    #include <zephyr/net/ieee802154_radio.h>

    and add these lines to prj.conf:

    CONFIG_NETWORKING=y
    CONFIG_IEEE802154=y
    CONFIG_IEEE802154_RAW_MODE=y

    In addition I needed to add function callbacks for:

    net_recv_data()
    and
    ieee802154_handle_ack(),
    Which was also done by the sniffer sample.
    Best regards,
    Edvin

Related