Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openwrt] enable OTBR_NAT64 and INFRA_IF by default and add UCI config #2011

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion etc/openwrt/openthread-br/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ CMAKE_OPTIONS+= \
-DOTBR_SRP_ADVERTISING_PROXY=ON \
-DOT_FIREWALL=ON \
-DOT_POSIX_SETTINGS_PATH=\"/etc/openthread\" \
-DOT_READLINE=OFF
-DOT_READLINE=OFF \
-DOTBR_NAT64=ON \
-DNAT64_SERVICE=\"openthread\"

TARGET_CFLAGS += -DOPENTHREAD_POSIX_CONFIG_DAEMON_SOCKET_BASENAME=\\\"/var/run/openthread-%s\\\"

Expand Down
5 changes: 4 additions & 1 deletion src/openwrt/otbr-agent.init.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ USE_PROCD=1
start_service()
{
local uci_thread_if_name=$(uci -q get otbr-agent.service.thread_if_name)
local uci_infra_if_name=$(uci -q get otbr-agent.service.infra_if_name)
local uci_uart_device=$(uci -q get otbr-agent.service.uart_device)
local uci_uart_baudrate=$(uci -q get otbr-agent.service.uart_baudrate)

procd_open_instance
procd_set_param command @CMAKE_INSTALL_FULL_SBINDIR@/otbr-agent -I $uci_thread_if_name spinel+hdlc+uart:///dev/ttyACM0
procd_set_param command @CMAKE_INSTALL_FULL_SBINDIR@/otbr-agent -I $uci_thread_if_name -B $uci_infra_if_name spinel+hdlc+uart://$uci_uart_device?uart-baudrate=$uci_uart_baudrate trel://$uci_infra_if_name
procd_close_instance
}
3 changes: 3 additions & 0 deletions src/openwrt/otbr-agent.uci-config.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
config otbr-agent 'service'
option thread_if_name "wpan0"
option infra_if_name "eth0"
option uart_device "/dev/ttyACM0"
option uart_baudrate 115200