-
Notifications
You must be signed in to change notification settings - Fork 401
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
Hostname in localnetwork #37
Comments
I think that you can use the API function described in the SDK doc as: Err_t espconn_gethostbyname(struct espconn *pespconn, const char Parameters: Return: Err_t——ESPCONN_OK Example as follows. Pls refer to source code of IoT_Demo: Havving the IP address we can use it to pass it to the MQTT connect Catalin On Fri, Feb 6, 2015 at 12:42 PM, Ânderson Ignácio da Silva <
|
Using the simple hostname ("teste"?) or the fully-qualified hostname (with the real domainname, such as "teste.example.com") will result in an automatic gethostbyname() lookup, which should work without any extra code. |
bcatalin 👍 PuceBaboon: |
aignaciors, I'm not aware of any mDNS capabilities within the SDK (but then, I know almost nothing about anything in the SDK :-)) You might want to check out the Avahi daemon, though. It has the ability to "configure a unicast DNS server automatically from server data published on the LAN" and so should be able to automatically provide unicast answers to your multicast address request (I have a mixed environment here, with Macs co-existing in a mostly Un*x environment and Avahi works pretty well at handling the Mac mDNS traffic). Of course, this all depends upon what you actually have in your environment and, more importantly, what you have administration rights on. |
contiki have implemented mDNS support resolve local domain, you can look through. This project focus only mqtt protocol. |
Hello,
I've been testing my mqtt network in a local network with fixed ip, but i have a dhcp server in a apache running in this network and i would like to know if is there a way to find the broker machine just with hostname in this LAN.
tks.
define MQTT_HOST "teste.local"
The text was updated successfully, but these errors were encountered: