Skip to content
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
14 changes: 2 additions & 12 deletions etc/openwrt/openthread-br/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openthread-br
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_VERSION:=1.0

include $(INCLUDE_DIR)/package.mk
Expand Down Expand Up @@ -69,8 +69,7 @@ define Package/openthread-br
+libblobmsg-json \
+libjson-c \
+libstdcpp \
+libubus \
+luci-lua-runtime
Comment thread
LorbusChris marked this conversation as resolved.
+libubus
endef

define Package/openthread-br/description
Expand All @@ -87,15 +86,6 @@ define Package/openthread-br/install

$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/config/* $(1)/etc/config

$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller/admin
$(INSTALL_BIN) $(LOCAL_SOURCE_DIR)/src/openwrt/controller/thread.lua $(1)/usr/lib/lua/luci/controller/admin

$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view
$(CP) $(LOCAL_SOURCE_DIR)/src/openwrt/view/admin_thread $(1)/usr/lib/lua/luci/view

$(INSTALL_DIR) $(1)/www/luci-static/resources
$(CP) $(LOCAL_SOURCE_DIR)/src/openwrt/handle_error.js $(1)/www/luci-static/resources
endef

$(eval $(call BuildPackage,openthread-br))
20 changes: 19 additions & 1 deletion etc/openwrt/openthread-br/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,22 @@ service otbr-agent start

### Test

Enter the OpenWRT web GUI. There will be a new item _Thread_ under _Network_. Scan or create network here.
Form a network and check the state from the command line:

```bash
ot-ctl dataset init new
ot-ctl dataset commit active
ot-ctl ifconfig up
ot-ctl thread start
ot-ctl state
```

The agent also exposes a ubus object with equivalent controls:

```bash
ubus call otbr threadstart
ubus call otbr state
ubus call otbr scan
```

A LuCI web interface is maintained in the [openwrt/luci](https://github.com/openwrt/luci) repository as `luci-app-openthread`. With it installed, a _Thread_ item appears under _Network_ in the OpenWrt web GUI.
Loading
Loading