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

Hi JM,

I missed something when issue ./script/bootstrap

WEB_GUI=1 NFRA_IF_NAME=wlan0 ./script/bootstrap

Should add NFRA_IF_NAME=***

Sorry,

Best Regards

Frank

Hi @Community member​ 

I made some significant progress as I can see these outputs in my /var/log/messages:

Dec  2 16:09:41 stm32mp1 user.info otbr-agent[1032]: [INFO]-UTILS---: Running 0.3.0-ad6822257f-dirty
Dec  2 16:09:41 stm32mp1 user.info otbr-agent[1032]: [INFO]-UTILS---: Thread version: 1.1.1
Dec  2 16:09:41 stm32mp1  user.info otbr-agent[1032]: [INFO]-UTILS---: Thread interface: wpan0
Dec  2 16:09:41 stm32mp1 user.info otbr-agent[1032]: [INFO]-UTILS---: Backbone interface: wlan0
Dec  2 16:09:41 stm32mp1  user.info otbr-agent[1032]: [INFO]-UTILS---: Radio URL: spinel+hdlc+uart:///dev/ttyUSB0
Dec  2 16:09:41 stm32mp1  user.info otbr-agent[1032]: [INFO]-UTILS---: Radio URL: trel://eth0
Dec  2 16:09:43 stm32mp1 user.crit otbr-agent[1032]: 49d.17:07:12.290 [C] Platform------: BSD TCP function() at radio_spinel_impl.hpp:2236: RadioSpinelNoResponse

To achieve this result, I introduced a bbappend recipe:

FILESEXTRAPATHS:prepend := "${THISDIR}/ot-br-posix:"
SRC_URI += "\
           file://manage-ot-thread-version-1.1.patch \
           "
 
# openthread/repo/src/cli/cli.cpp:1786:18: fatal error: variable 'i' set but not used [-Wunused-but-set-variable]
#    for (uint8_t i = 0;; i++)
CXXFLAGS:append:libc-musl:toolchain-clang = " -Wno-error=unused-but-set-variable"
 
EXTRA_OECMAKE += "\
                  -DOT_THREAD_VERSION=1.1 \
                  -DOTBR_INFRA_IF_NAME=wlan0 \
                  -DOTBR_BACKBONE_ROUTER=OFF \
                  -DOTBR_DUA_ROUTING=OFF \
                  -DOT_DUA=OFF \
                  -DOT_MLR=OFF \
                 "
 
RDEPENDS:${PN} += "ipset"

The patch mentionned in the recipe changes the file third_party/openthread/CMakeLists.txt to its exact copy of the file at sha1 110eb2507caa2fbc9b10935d37f78f6280de1086 in the ot-br-posix git repo. I attached it below.

Best regards,

--JM

Hi JM,

Thanks for your solution, I will try.

Best Regards

Frank