NRF_802154_USE_RAW_API is always being set to 1

We want to use the non raw functions of 802154 such as "nrf_802154_transmit" however they're compiled out by the definition of NRF_802154_USE_RAW_API being set to 1.

How do we ensure this is set to 0?

Using extra CMake arguments didn't work:  Defining preprocessor options using Visual Studio Code 

I've tried variations of the below in the top level CMakeLists.txt file:

add_definitions(-DNRF_802154_USE_RAW_API=0)
add_compile_options(-DNRF_802154_USE_RAW_API=0)
add_compile_definitions(-DNRF_802154_USE_RAW_API=0)
target_compile_options(-DNRF_802154_USE_RAW_API=0)
and also adding CONFIG_IEEE802154_RAW_MODE=n in the overlay file appears to do nothing.
We're trying to get the server and client echo samples to compile having added this:
Parents Reply
  • I see. So no IP, then.

    Ok, so let us say that you want to include nrf_802154.c and nrf_802154.h to your project. Don't you agree that you would need to set NRF_802154_USE_RAW_API to 1? 

    Make sure that it is set to 1 in both files called nrf_802154.h, both in modules\hal\nordic\drivers\nrf_802154\driver\include\nrf_802154_config.h and in nrfxlib\nrf802154\driver\include\nrf_802154_config.h (I don't know which one that is used). Are you then able to use the function nrf_802154_transmit_raw() from your main() function?

    Are you able to include the nrf_802154.h file in your project?

    BR,
    Edvin

Children
  • Hi Edvin,

    I've managed to include those files. NRF_802154_USE_RAW_API is always set to 1 which has meant I've updated a couple of our legacy functions to use nrf_802154_transmit_raw rather than nrf_802154_transmit which isn't an arduous task - we were just wondering if it could be avoided which was the initial reason for this ticket. (We're actually still not sure how to do this, but it's less important now).

    I've found that on both the 52840 and 5340 the raw transmit function works. But on the 5340 I can't receive anything - it doesn't get to this function.

    void nrf_802154_received_raw(uint8_t * p_data, int8_t power, uint8_t lqi)
    {
        LOG_HEXDUMP_DBG(p_data, 27, "received from TT base");
    }

    it fails here: zephyr\drivers\ieee802154\ieee802154_nrf5.c on line 190

    I attempted to compare the difference by debugging the 5340 and 52840 at receive time, but the 52840 doesn't break in the function like the 5340 does.

    As an aside, do you use the private message functionality on this site? I haven't received a response.

    BR,

    Richard

  • Hello Richard,

    I saw your message, but I don't think it would help much to set up a call. I need to look up these things, and find people who can answer, because I myself am not familiar with the content of, or how to use, the 802154 drivers in nrfx_drivers or zephyr. Unfortunately, we don't have any in our support department that are, so we need to do it the way we currently are. I need to find the correct person to forward your questions to. 

    Richard said:
    I've found that on both the 52840 and 5340 the raw transmit function works. But on the 5340 I can't receive anything - it doesn't get to this function.

    Is it possible to send the two projects that you are using, so that I can have a look, and see if I can figure out why the callback is not triggering? If you have any confidencial information in the projects, you can strip them out, as long as I can use them to trigger (and not trigger) the callbacks.

    BR,
    Edvin

  • Hi Edvin,

    The coordinator software I'm currently using is on a different module and the firmware is definitely not available to be sent.

    I'm trying to do a simple send receive version between two nrFs that should work similarly enough to highlight the problem. I hope to send that through tomorrow.

    BR,

    Richard
    P.S. thank you for the explanation on PM

  • Hi Edvin,

    I've managed to strip down two simple projects, one uses the raw transmit function to simply send "Hello World" in a loop, and the other should be listening, but it always prints out "Packet dropped by NET stack".

    Here's a link to download

    https://www.dropbox.com/t/RkI3Qd4A59Ek7YH2

    This is the entire project with the build directories - I'm not sure what should be ignored.

    I have two nRF5340-DK devices that are V2.0.0

    I can see the packets using the nRF52840 Dongle V1.0.0 with wireshark

    I'm not sure why but this doesn't appear to receive at all using the 52840 dev kit I have - possibly stripped something out I shouldn't have, but the 5340 message remains the same and that's what I was hoping to fix.

    Thank you,

    BR,
    Richard

  • Hello,

    I've had no response on this for 12 days, but in that time 2 separate e-mails to tell me someone has been assigned.

    Any updates please?

    Richard

Related