Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jkrhb/wot-coap-dns-sd
A Basic WoT CoAP Server supporting DNS-SD
https://github.com/jkrhb/wot-coap-dns-sd
Last synced: 6 days ago
JSON representation
A Basic WoT CoAP Server supporting DNS-SD
- Host: GitHub
- URL: https://github.com/jkrhb/wot-coap-dns-sd
- Owner: JKRhb
- License: mit
- Created: 2023-02-20T22:39:44.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-02T18:14:38.000Z (2 months ago)
- Last Synced: 2024-11-25T03:41:44.578Z (about 1 month ago)
- Language: Rust
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Basic WoT CoAP Server supporting DNS-SD
This Repository contains a simple Rust project that provides additional test
results for the
[WoT Discovery specification](https://www.w3.org/TR/wot-discovery).
It demonstrates how to utilize DNS-SD (using Multicast DNS) for discovering
CoAP servers ([RFC 7252](https://www.rfc-editor.org/rfc/rfc7252)) that host
[Web of Things Thing Descriptions](https://www.w3.org/TR/wot-thing-description11/)
(WoT TDs).## Setup
First you need to make sure that you have
[Rust installed](https://www.rust-lang.org/tools/install).
Then, after cloning the repository, simply type```sh
cargo run
```into a terminal of your choice (once you have changed your working directory
to your local copy of the repository).
This will start both a CoAP server and an mDNS daemon, the latter of which
will enable local DNS-Based service discovery (DNS-SD).## Usage
Once the CoAP server and the mDNS service daemon are running, you can perform
DNS-based service discovery locally to discover the server's TD that is hosted
under `/.well-known/wot`.
Using multicast DNS, you can find the server by browsing for the service
instance using the type `_wot._udp`, which will return the instance name
`wot_coap_dns_sd`.
Looking up the instance name will yield the `td` path mentioned above, a
`scheme` parameter set to `coap`, and a `type` set to `Thing` in the TXT
records, as specified in [section 6.3 of the WoT Discovery specification](https://www.w3.org/TR/wot-discovery/#introduction-dns-sd-sec).Using this information, you can send a CoAP GET request to the assembled URL
and obtain the (very basic) Thing Description hosted by the CoAP server.Once you are finished with running the application, you can simply use `Ctrl+C`
to exit it.## License
```
SPDX-License-Identifier: MIT
```