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

Re-investigate on zeroconf / mDNS #40

Open
kripton opened this issue Jan 11, 2022 · 2 comments
Open

Re-investigate on zeroconf / mDNS #40

kripton opened this issue Jan 11, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@kripton
Copy link
Member

kripton commented Jan 11, 2022

Currently, the device chooses one IP address based on the chip ID in the flash memory (if no IP has been stored in the config) and provides another IP in the same subnet to the host machine via DHCP.
This might be easier using AutoIP/APIPA provided by the lwIP stack: https://www.nongnu.org/lwip/2_0_x/group__autoip.html. We just need to make sure that all host OSes we want to support don't treat network connections as non-functional if their DHCP requests go unanswered.
Zeroconf is the name of the technology / processes ifself. Apple Bonjour and Avahi are two widely-known implementations.

Also, usbsun should at least advertise some kind of hostname and the services it provides via mDNS (also already supported by lwIP).

@kripton kripton added the enhancement New feature or request label Jan 11, 2022
@kripton kripton mentioned this issue Jan 11, 2022
@peternewman
Copy link
Member

I didn't realise the mDNS bit and the standalone IP bit were both part of the same standard!

I think Zeroconf has pretty wide OS support now, although Windows may flag the network as no Internet access.

@kripton
Copy link
Member Author

kripton commented Jan 12, 2022

Well, it's not necessarily. Sorry if I made that impression. Standalone IPv4 is in https://datatracker.ietf.org/doc/html/rfc3927, mDNS is in https://datatracker.ietf.org/doc/html/rfc6762 and https://datatracker.ietf.org/doc/html/rfc7558

The lwIP usually assumes you are using their AutoIP-feature when you activate their mDNS-feature but at least according to their docs, it's not a must:
MDNS with IPv4 requires LWIP_IGMP = 1, and preferably LWIP_AUTOIP = 1. (https://www.nongnu.org/lwip/2_0_x/group__mdns.html). IGMP is already in use for E1.31 multicast to work.

So while I'm still not sure about AutoIP, mDNS makes sense in any case.

And about Windows flagging the network as "No Internet access": That shouldn't be a problem since this is just the truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants