cancel
Showing results for 
Search instead for 
Did you mean: 

How to set THREAD_VERSION for ot-br-posix

FrankYang-P&S
Associate III

Hello,

I wants to bitbake ot-br-posix with OT_THREAD_VERSION=1.1, Modified the ot-br-posix_git.bb file, add -DOT_THREAD_VERSION=1.1 in this file. But result is ot-br-posix using Thread Version 1.2

Does somebody know how to solve this issue

Many thanks.

B.R

Frank

12 REPLIES 12
Jean-Marc B
ST Employee

Hi @Community member​ 

by looking at the file third_party/openthread/CMakeLists.txt in the GIT repository of ot-br-posix under github https://github.com/openthread/ot-br-posix, I can see that OT_THREAD_VERSION with a different value than 1.1 triggers some variables to be set. In particular (so if OT_THREAD_VERSION is NOT 1.1) :

  • OT_DUA is set to ON
  • OT_MLR is set to ON

I guess if OT_THREAD_VERSION is set to 1.1, these variables are set to OFF.

But that conflicts with the recipe ot-br-posix_git.bb which explicitly sets them to ON.

This would seem like a good idea to remove

                 -DOT_MLR=ON \

and

                 -DOT_DUA=ON \

from the recipe or enforce them to OFF.

Best regards,

--JM

FrankYang-P&S
Associate III

Hi JM

Thanks a lot, I tried with your method. It does not work. The thread version sticks at version 1.2. But on rpi3 platform, only INFRA_IF_NAME=wlan0 WEB_GUI=1 BACKBONE_ROUTER=0 OTBR_OPTIONS="-DOT_THREAD_VERSION=1.1" ./script/setup, then it works.

B.R.

Frank

Hi @Community member​ 

Too bad :(

Indeed the OT_THREAD_VERSION=1.1 is ignored as I can see it on my board in /var/log/messages:

Nov 25 14:12:32 stm32mp1 user.info otbr-agent[1386]: [INFO]-UTILS---: Thread version: 1.2.0

I need to dig into my own notes as I successfully built the ot-br-posix package some months ago but with OpenSTLinux 3.0 and a different ot-br-posix recipe:

Mar 31 08:15:46 stm32mp1 user.info otbr-agent[1060]: [INFO]-UTILS---: Thread version: 1.1.1

I agree the setup with RPi is working well but the Yocto recipe relies on a different mechanism that surely explains this discrepancy.

Best regards,

--JM

Hi @Community member​ 

I think we need some combinations of flags to properly build the OBTR package and I didn't find them.

At now, I have added these flags:

-DOT_THREAD_VERSION=1.1
-DOTBR_BACKBONE_ROUTER=OFF
-DOTBR_DUA_ROUTING=OFF
-DOT_DUA=OFF
-DOT_MLR=OFF

But I have some compilation errors because some features need OpenThread version 1.2. Currently, I don't know which flags allow the build process to bypass these errors.

Best regards,

--JM

FrankYang-P&S
Associate III

Hi JM,

Thanks for your information. I will try OpenSTLinux 3.0 and try to feature out the reason.

B.R.

Frank

Hi @Community member​ 

If you have access to a RPi3 machine, I would be curious about building the OTBR with OT_THREAD_VERSION=1.1: is RPi3 really with version 1.1 when running? Or is the version is forced silently to 1.2?

I think you can stay with DV-4.1 to search the reason why OT_THREAD_VERSION=1.1 is not taken into account. I guess this is related to interaction with the build process of third_party/openthread.

Best regards,

--JM

FrankYang-P&S
Associate III

Hi JM,

On RPI3, I just did below:

$ git clone https://github.com/openthread/ot-br-posix

$ cd ot-br-posix

$ WEB_GUI=1 ./script/bootstrap

$ INFRA_IF_NAME=wlan0 WEB_GUI=1 BACKBONE_ROUTER=0 OTBR_OPTIONS="-DOT_THREAD_VERSION=1.1" ./script/setup

If without OTBR_OPTIONS="-DOT_THREAD_VERSION=1.1", the ot-br-posix uses thread version 1.3

0693W00000WJbYfQAL.png 

Best Regards

Frank

Hi @Community member​ 

Thank you for the output.

Do you have the same output when building OTBR with OT_THREAD_VERSION=1.1 please?

Best regards,

--JM

FrankYang-P&S
Associate III

Hi JM,

When building ot-br-posix on RPI3, the build process outputs

+ local builddir=/home/pi/work/ot-br-posix/build/otbr

+ mkdir -p /home/pi/work/ot-br-posix/build/otbr

+ cd /home/pi/work/ot-br-posix/build/otbr

+ cmake -GNinja /home/pi/work/ot-br-posix -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/usr -DOTBR_DBUS=ON -DOTBR_FEATURE_FLAGS=ON -DOTBR_DNSSD_DISCOVERY_PROXY=ON -DOTBR_SRP_ADVERTISING_PROXY=ON -DOTBR_INFRA_IF_NAME=wlan0 -DOTBR_MDNS=mDNSResponder -DOTBR_VERSION= -DOT_PACKAGE_VERSION= -DOT_THREAD_VERSION=1.1 -DOTBR_WEB=ON -DOTBR_BORDER_ROUTING=ON -DOTBR_REST=ON

And the otbt-agent runs with Thread Version 1.1.1, it works with our STM32WB55 RCP

Best Regards

Frank0693W00000WJhm9QAD.png