Fix memory leak in patch for libcoap (#53)

* fix memory leak in libcoap patch

* set dst of pdu
2 files changed
tree: be9f12dc3ff35f7f06de51fd1d70a8328d05e115
  1. .travis/
  2. doc/
  3. include/
  4. script/
  5. src/
  6. tests/
  7. third_party/
  8. tools/
  9. .default-version
  10. .travis.yml
  11. .uncrustify.cfg
  12. AUTHORS
  13. bootstrap
  14. CODE_OF_CONDUCT.md
  15. configure.ac
  16. CONTRIBUTING.md
  17. LICENSE
  18. Makefile.am
  19. NOTICE
  20. README.md
  21. STYLE_GUIDE.md
README.md

OpenThread Border Router

Per the Thread 1.1.1 Specification, a Border Router connects a 802.15.4 network to networks at different layers, such as WiFi or Ethernet. A Thread network requires a Border Router to connect to other networks.

A Thread Border Router minimally supports the following functions:

  • End-to-end IP connectivity via routing between Thread devices and other external IP networks
  • External Thread Commissioning (for example, a mobile phone) to authenticate and join a Thread device to a Thread network

OpenThread's implementation of a Border Router is called OpenThread Border Router (OTBR). OTBR includes a number of features, including:

  • Web UI for configuration and management
  • Thread Border Agent to support an External Commissioner
  • NAT64 for connecting to IPv4 networks
  • Thread interface driver using wpantund

Note: This is an early MVP release of OpenThread Border Router that will be improved over time. See the Roadmap page to view major fixes in progress, or the Issues page to report bugs and request enhancements.

Pull requests are encouraged and welcome. See the CONTRIBUTING.md file for more information.

Border Agent

The Border Agent binds to both Thread and WAN (WiFi, Ethernet) interfaces, to support an External Thread Commissioner in authenticating and joining Thread devices."

OTBR Architecture

It also provides support for the NCP design, where Thread functions are offloaded to an NCP and OTBR runs on the host side. In this design, the Border Agent communicates with the NCP via wpantund and Spinel. A Border Agent Proxy provides an interface between Spinel and OpenThread's CoAP client and server components on the NCP. For communication with an external Commissioner, the Border Agent uses standard UDP sockets.

OTBR NCP Architecture

The Border Agent utilizes the following third-party components:

  • libcoap — An open source C-implementation of CoAP implementation
  • mbed TLS — Supports DTLS communication with an external Commissioner

Border Router Services

OTBR also provides the following services:

  • mDNS Publisher — allows an External Commissioner to discover an OTBR and its associated Thread network
  • PSKc Generator — for generation of PSKc keys
  • Web Service — web UI for management of a Thread network
  • WPAN Controller — DBus operations for control of the WPAN interface

Third-party components for Border Router Services include Simple Web Server and Material Design Lite for the framework of the web UI.

Get started

We follow philosophy of Scripts to Rule Them All. Validated platforms include:

Build and Install

# Install dependencies
./script/bootstrap

# Build and install border router and wpantund
./script/setup

Configure

Edit /etc/wpantund.conf according to the comments. Basically only path to NCP‘s serial port is required. Plug in the NCP mode OpenThread device and check the corresponding device file of it. Here’s an example when the device's serial port is /dev/ttyUSB0.

Config:NCP:SocketPath "/dev/ttyUSB0"

Start services

All border router services will be automatically started on next boot. Or you can start immediately by:

./script/server

Now you can access border router's Web UI through browsers and explore its features.

Need help?

Interact

There are numerous avenues for OTBR support:

OpenThread

To learn more about OpenThread, see the OpenThread repository.

Want to contribute?

We would love for you to contribute to OpenThread Border Router and help make it even better than it is today! See the CONTRIBUTING.md file for more information.

Versioning

OpenThread Border Router follows the Semantic Versioning guidelines for release cycle transparency and to maintain backwards compatibility. OpenThread's versioning is independent of the Thread protocol specification version but will clearly indicate which version of the specification it currently supports.

License

OpenThread Border Router is released under the BSD 3-Clause license. See the LICENSE file for more information.

Please only use the OpenThread name and marks when accurately referencing this software distribution. Do not use the marks in a way that suggests you are endorsed by or otherwise affiliated with Nest, Google, or The Thread Group.