This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use upstream zephyrproject-rtos/zephyr instead of nrf-zephyr fork

Hi I need the upstream Zephyr project for direction finding functionality and bug fixes. Those are not present in nrf-zephyr fork.

How do I get that to work? Just replacing nrf-zephyr with upstream zephyr does not build (Target "partition_manager" not found etc...).

I have searched around both nRFConnect and Zephyr documentation for how to set up the environment but cannot find something that works.

I found this https://devzone.nordicsemi.com/f/nordic-q-a/77257/relationship-sdk-zephyr-and-zephyhrproject-zephyr/319141#319141 where you suggest cherry-picking, but that's not going to work as it's so many commits spread out and I don't see that solution scale.

I can see lot's of development in Zephyr project main branch from nordic developers, what is their environment and how can I set up the same environment? 

Thank you alot,

Jakob

Parents
  • Hi Jakob,

    I'll try to help you, but I wanted to start from asking some questions.

    1. Are the bugs you have mentioned related with direction finding?

    2. Did you find any bugs in DF code?

    3. Are you interested in DF connectionless mode?

    4. What is current version of NCS-SKD you are using currently?

    BR,

    Piotr

  • Hi, thanks for taking the time.

    1. Yes related to DF. Bugs and missing features are the main reason I want to develop and use upstream master.

    2. Yes two:
    Setting max_cte_count to 0 in bt_df_per_adv_sync_cte_rx_param does not work as it will cause this if  https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c#L671 to never execute. According to documentation setting max_cte_count to 0 means sample continiously 
    And the second one is that 1US slots did not work as DF_AOA_RX_1US_SUPPORT(X) was incorrectly implemented (however I saw that is fixed on master)
    Those are not a problem and I fixed them locally easily.
    However there are features on master branch I'd like to use, such as sending AUX_SYNC_IND. For example the 
    bt_df_adv_cte_tx_param -> cte_count is not working on 1.7.0, I'm expecting it to send cte_count times AUX_SYNC_IND in each periodic adv. event. And looking in master code this seems to be implemented now.
    Also I have some random crashes that I have not digged to deep into, but wanted to see if they where gone using latest code.
    3. Connectionless using periodic advertisements yes.
    4. I'm using master branch of https://github.com/nrfconnect/sdk-zephyr (west init -m https://github.com/nrfconnect/sdk-nrf --mr master) and before that SDK 1.7.0.
    Other things I found while migrating from baremetal DF (most are due to BT SIG HCI interface definition that I don't like, but it is what it is) is that you are limiting the antenna switching pattern to be dependant on the number of pins, I don't see spec. setting this limit, I think it's valid that you have patterns that don't only contain unique antennas. Let's say you have 10 antennas (4 gpios), then you cannot do a switch pattern auch as antennas 1,2,3,4,5,1,2,3,4,5,6,7,8,9,10,6,7,8,9,10 but instead need to make use of wraparound of switch pattern so you get (1,2,3,4,5,6,7,8,9,10) x 2. Because max ant_len is set by how many antennas theoretically you can have with 4 gpios. Sure you can re-organise IQs etc, but still. It's trivial to make that change myself, but I'd like to do as little modifications to Zephyr as I can to simplify when upgrading SDK version.
    Thank you,
    Jakob
Reply
  • Hi, thanks for taking the time.

    1. Yes related to DF. Bugs and missing features are the main reason I want to develop and use upstream master.

    2. Yes two:
    Setting max_cte_count to 0 in bt_df_per_adv_sync_cte_rx_param does not work as it will cause this if  https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c#L671 to never execute. According to documentation setting max_cte_count to 0 means sample continiously 
    And the second one is that 1US slots did not work as DF_AOA_RX_1US_SUPPORT(X) was incorrectly implemented (however I saw that is fixed on master)
    Those are not a problem and I fixed them locally easily.
    However there are features on master branch I'd like to use, such as sending AUX_SYNC_IND. For example the 
    bt_df_adv_cte_tx_param -> cte_count is not working on 1.7.0, I'm expecting it to send cte_count times AUX_SYNC_IND in each periodic adv. event. And looking in master code this seems to be implemented now.
    Also I have some random crashes that I have not digged to deep into, but wanted to see if they where gone using latest code.
    3. Connectionless using periodic advertisements yes.
    4. I'm using master branch of https://github.com/nrfconnect/sdk-zephyr (west init -m https://github.com/nrfconnect/sdk-nrf --mr master) and before that SDK 1.7.0.
    Other things I found while migrating from baremetal DF (most are due to BT SIG HCI interface definition that I don't like, but it is what it is) is that you are limiting the antenna switching pattern to be dependant on the number of pins, I don't see spec. setting this limit, I think it's valid that you have patterns that don't only contain unique antennas. Let's say you have 10 antennas (4 gpios), then you cannot do a switch pattern auch as antennas 1,2,3,4,5,1,2,3,4,5,6,7,8,9,10,6,7,8,9,10 but instead need to make use of wraparound of switch pattern so you get (1,2,3,4,5,6,7,8,9,10) x 2. Because max ant_len is set by how many antennas theoretically you can have with 4 gpios. Sure you can re-organise IQs etc, but still. It's trivial to make that change myself, but I'd like to do as little modifications to Zephyr as I can to simplify when upgrading SDK version.
    Thank you,
    Jakob
Children
Related