{"id":13645650,"url":"https://github.com/openthread/wpantund","last_synced_at":"2025-03-30T02:09:08.709Z","repository":{"id":42425071,"uuid":"60717054","full_name":"openthread/wpantund","owner":"openthread","description":"Wireless Network Interface Daemon for Low-Power Wireless SoCs","archived":false,"fork":false,"pushed_at":"2024-03-21T03:33:19.000Z","size":4272,"stargazers_count":177,"open_issues_count":32,"forks_count":110,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-03-22T02:54:50.695Z","etag":null,"topics":["daemon","dbus","ipv6","native-ipv6-interface","ncp","openthread","spinel"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openthread.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-08T17:32:11.000Z","updated_at":"2025-03-13T19:18:04.000Z","dependencies_parsed_at":"2024-08-02T01:38:28.890Z","dependency_job_id":null,"html_url":"https://github.com/openthread/wpantund","commit_stats":{"total_commits":476,"total_committers":51,"mean_commits":9.333333333333334,"dds":0.7100840336134453,"last_synced_commit":"e2fd726982d626817b1db56c4361c1c5cb7d6201"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthread%2Fwpantund","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthread%2Fwpantund/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthread%2Fwpantund/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openthread%2Fwpantund/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openthread","download_url":"https://codeload.github.com/openthread/wpantund/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246266244,"owners_count":20749754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["daemon","dbus","ipv6","native-ipv6-interface","ncp","openthread","spinel"],"created_at":"2024-08-02T01:02:39.079Z","updated_at":"2025-03-30T02:09:08.691Z","avatar_url":"https://github.com/openthread.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"wpantund, Userspace WPAN Network Daemon\n=======================================\n\n`wpantund` is a user-space network interface driver/daemon that\nprovides a native IPv6 network interface to a low-power wireless\n**Network Co-Processor** (or *NCP*). It was written and developed by\nNest Labs to make supporting [Thread](http://threadgroup.org)\nconnectivity on Unix-like operating systems more straightforward.\n\n`wpantund` is designed to marshall all access to the NCP, ensuring\nthat it always remains in a consistent and well-defined state.\n\nThis is not an official Google product.\n\n## Feature and Architecture Summary ##\n\n`wpantund` provides:\n\n *  ... a native IPv6 interface to an NCP.\n *  ... a command line interface (`wpanctl`) for managing and\n    configuring the NCP.\n *  ... a DBus API for managing and configuring the NCP.\n *  ... a way to reliably manage the power state of the NCP.\n *  ... a uniform mechanism for handling NCP firmware updates.\n\nThe architecture and design of `wpantund` has been motivated by the\nfollowing design goals (in no specific order):\n\n *  Portability across Unix-like operating systems (currently supports\n    Linux. BSD support should be fairly trivial to add)\n *  Require few runtime dependencies (DBus, with boost needed when\n    building)\n *  Single-threaded architecture, with heavy use of asynchronous I/O\n *  Power efficiency (0% CPU usage when idle)\n *  Allow management interface to be used by multiple independent\n    applications simultaneously\n *  Allow multiple instances of `wpantund` to gracefully co-exist on a\n    single machine\n *  Modular, plugin-based architecture (all details for communicating\n    with a specific NCP stack are implemented as plugins)\n\nNote that Windows is not currently supported, but patches are welcome.\n\nThe following NCP plugins are provided:\n\n*   `src/ncp-spinel`: Supports NCPs that communicate using the [Spinel NCP\n    Protocol][1], used by NCPs running [OpenThread][2]\n*   `src/ncp-dummy`: A dummy NCP plug-in implementation meant to be the\n    starting point for implementing new NCP plug-ins\n\n[1]: https://github.com/openthread/openthread/tree/master/doc\n[2]: https://github.com/openthread/openthread/\n\n## License ##\n\n`wpantund` is open-source software released under the [Apache License,\nVersion 2.0][3]. See the file [`LICENSE`][4] for more information.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the [License][4] for the specific language governing permissions and\nlimitations under the License.\n\n[3]: http://www.apache.org/licenses/LICENSE-2.0\n[4]: ./LICENSE\n\n## Conceptual Overview ##\n\n`wpantund` is conceptually similar in purpose to the point-to-point\ndaemon (`pppd`, commonly used on Unix platforms to provide network\nconnectivity via a dial-up modems) except that instead of communicating\nwith a dial-up modem, `wpantund` is communicating with an NCP.\n\n`wpantund` communicates with the NCP via an abstraction of a\nasynchronous stream socket, which could be any of the following:\n\n *  A real serial port (UART) connected to the NCP (preferably with\n    hardware flow control)\n *  The stdin and stdout from a subprocess (for supporting SPI\n    interfaces using a translator program or debugging virtual\n    stacks)\n *  A TCP socket (for debugging, not recommended for production)\n\nUnlike a dial-up modem, NCPs often have a rich management interface\nfor performing operations, such as forming a network, joining a\nnetwork, scanning for nearby networks, etc. To perform these operations,\n`wpantund` includes a command line utility called `wpanctl`.\nApplications that need to directly configure the network interface can\nalso communicate directly with `wpantund` using its DBus API.\n\nTo expose a native IPv6 network interface to the host operating\nsystem, `wpantund` uses the `tun` driver on Linux. On Linux, the\ndefault name for the interface is `wpan0`.\n\n## Usage Overview ##\n\nThe behavior of `wpantund` is determined by its configuration\nparameters, which may be specified in a configuration file (typically\n`/etc/wpantund.conf`) or at the command line. A typical configuration\nfile might look like that shown below. For a more thorough explanation\nof available configuration parameters, see the [included example][5].\n\n    # Try to name the network interface `wpan0`.\n    # If not possible, a different name will be used.\n    Config:TUN:InterfaceName      \"wpan0\"\n\n    # The pathname of the socket used to communicate\n    # with the NCP.\n    Config:NCP:SocketPath         \"/dev/ttyUSB0\"\n\n    # The name of the driver plugin to use. The chosen\n    # plugin must support the NCP you are trying to use.\n    Config:NCP:DriverName         \"spinel\"\n\n    # Drop root privileges after opening all sockets\n    Config:Daemon:PrivDropToUser  \"nobody\"\n\n    # Use a CCA Threshold of -70db\n    NCP:CCAThreshold              \"-70\"\n\nWhen up and running, you can use `wpanctl` to check the status of the\ninterface and perform various management operations. For example, to\ncheck the general status of an interface:\n\n    $ sudo wpanctl status\n    wpan0 =\u003e [\n        \"NCP:State\" =\u003e \"offline\"\n        \"Daemon:Enabled\" =\u003e true\n        \"NCP:Version\" =\u003e \"OPENTHREAD/g1651a47; May 23 2016 17:23:24\"\n        \"Daemon:Version\" =\u003e \"0.07.00 (May 23 2016 12:58:54)\"\n        \"Config:NCP:DriverName\" =\u003e \"spinel\"\n        \"NCP:HardwareAddress\" =\u003e [F1D92A82C8D8FE43]\n    ]\n\nHere we see that the NCP is in the `offline` state along with a few\nadditional bits of information such as the version of the NCP and its\nhardware address. From here we can easily form a new network:\n\n    $ sudo wpanctl form \"wpantund-testnet\"\n    Forming WPAN \"wpantund-testnet\" as node type router\n    Successfully formed!\n    $\n\nNow if we check the status, we will see more information:\n\n    $ sudo wpanctl status\n    wpan0 =\u003e [\n        \"NCP:State\" =\u003e \"associated\"\n        \"Daemon:Enabled\" =\u003e true\n        \"NCP:Version\" =\u003e \"OPENTHREAD/g1651a47; May 23 2016 17:23:24\"\n        \"Daemon:Version\" =\u003e \"0.07.00 (May 23 2016 12:58:54)\"\n        \"Config:NCP:DriverName\" =\u003e \"spinel\"\n        \"NCP:HardwareAddress\" =\u003e [F1D92A82C8D8FE43]\n        \"NCP:Channel\" =\u003e 23\n        \"Network:NodeType\" =\u003e \"leader\"\n        \"Network:Name\" =\u003e \"wpantund-testnet\"\n        \"Network:XPANID\" =\u003e 0x09717AEF221F66FB\n        \"Network:PANID\" =\u003e 0xBFCD\n        \"IPv6:LinkLocalAddress\" =\u003e \"fe80::f3d9:2a82:c8d8:fe43\"\n        \"IPv6:MeshLocalAddress\" =\u003e \"fd09:717a:ef22::9a5d:5d1e:5527:5fc8\"\n        \"IPv6:MeshLocalPrefix\" =\u003e \"fd09:717a:ef22::/64\"\n    ]\n    $ ifconfig wpan0\n    wpan0: flags=8051\u003cUP,POINTOPOINT,RUNNING,MULTICAST\u003e mtu 1280\n        inet6 fe80::f3d9:2a82:c8d8:fe43%wpan0 prefixlen 10 scopeid 0x15\n        inet6 fd09:717a:ef22::9a5d:5d1e:5527:5fc8 prefixlen 64\n\nIf compiled with `libreadline` or `libedit`, `wpanctl` supports an\nconvenient interactive console. All commands support online help: type\n`help` to get a list of supported commands, or add `-h` to a command to get\nhelp with that specific command.\n\nFor simulation example Codelab please see: \u003chttps://openthread.io/guides#try_openthread\u003e\n\n[5]: ./src/wpantund/wpantund.conf\n\n## Support ##\n\nSubmit bugs and feature requests to [issue tracker][6]. We use the\nfollowing mailing lists for discussion and announcements:\n\n *  [wpantund-announce](https://groups.google.com/forum/#!forum/wpantund-announce)\n    \\- Official Anouncements About `wpantund`\n *  [wpantund-users](https://groups.google.com/forum/#!forum/wpantund-users)\n    \\- `wpantund` User Discussion Group\n *  [wpantund-devel](https://groups.google.com/forum/#!forum/wpantund-devel)\n    \\- `wpantund` Developer Discussion Group\n\n[6]: https://github.com/openthread/wpantund/issues\n\n## Authors and Contributors ##\n\nThe following people have significantly contributed to the design\nand development of `wpantund`:\n\n *  Robert Quattlebaum\n *  Marcin Szczodrak\n *  Vaas Krishnamurthy\n *  Arjuna Siva\n *  Abtin Keshavarzian\n\nIf you would like to contribute to this project, please read\n[CONTRIBUTING.md](CONTRIBUTING.md) first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenthread%2Fwpantund","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenthread%2Fwpantund","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenthread%2Fwpantund/lists"}