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

feat: add support for DNS-SD via mDNS #2

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

JKRhb
Copy link
Member

@JKRhb JKRhb commented May 9, 2024

This PR adds support for discovery via mDNS to the application using espressif's own mDNS component for esp-idf.

As I am working with Xtensa-based ESP32 boards, I have only been able to test this out in my adopted version of this example and not with a RISC-V ESP32, so before merging, it might be best if you try to run it locally first :)

@lu-zero
Copy link
Contributor

lu-zero commented May 9, 2024

We have also deal with rust-lang/cc-rs#1005 ...

@lu-zero
Copy link
Contributor

lu-zero commented May 9, 2024

But it works almost as intended

2024-05-09T12:50:41.806550Z  INFO wot_discovery: ServiceFound("_wot._tcp.local.", "shtc3._wot._tcp.local.")
2024-05-09T12:50:41.806678Z  INFO wot_discovery: ServiceResolved(ServiceInfo { ty_domain: "_wot._tcp.local.", sub_domain: None, fullname: "shtc3._wot._tcp.local.", server: "shtc3-thing.local.", addresses: {192.168.9.193}, port: 80, host_ttl: 120, other_ttl: 4500, priority: 0, weight: 0, txt_properties: TxtProperties { properties: [TxtProperty {key: "scheme", val: Some("http")}, TxtProperty {key: "type", val: Some("Thing")}, TxtProperty {key: "td", val: Some("/.well-known/wot")}] }, addr_auto: false })
2024-05-09T12:50:42.670660Z  WARN list: something went wrong Reqwest(reqwest::Error { kind: Decode, source: Error("duplicate field `@type`", line: 1, column: 470) })

Looks like there is a bug somewhere in wot-td.

@JKRhb
Copy link
Member Author

JKRhb commented May 9, 2024

We have also deal with rust-lang/cc-rs#1005 ...

Oh, the problem reported there actually looks familiar to me 😅

Looks like there is a bug somewhere in wot-td.

Thank you for opening wot-rust/wot-td#2! That PR does seem to solve the issue :)

Do you think we can merge this one already or should we wait until wot-rust/wot-td#2 has landed?

@lu-zero
Copy link
Contributor

lu-zero commented May 9, 2024

It is not related so your change can land now. Then I'll update to use wot-td-0.5.0. :)

@lu-zero lu-zero merged commit b3389e1 into wot-rust:master May 9, 2024
@JKRhb JKRhb deleted the dns-sd branch May 9, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants