简体   繁体   中英

MQTT broker connect without pre-set IP address

I am building a application to use raspberry as MQTT broker & client and receive the message from ESP32 which is another MQTT client. I need to have ESP32 to get the broker connected without pre-setting IP address manually. Does anyone know how to let raspberry share the IP address wirelessly and safely? Or could the raspberry pi get a static IP address no matter what network configuration user changed? Thank you for any help or discuss.

These two instructions gave some help: to build mDNS lookups in raspberry and mDNS client to receive string input. More logic needed to define the principle of "blind search" but considering the security reason, we preferred to transfer string host name by BLE from app side.

mDNS client in ESP32 to receive string input How is the ESP32 (DOIT DevKit) finding another host in the same LAN via mDNS?

to build mDNS lookups in raspberry:

http://root42.blogspot.com/2015/02/how-to-setup-mdns-lookups-on-raspberry.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM