Android & iOS scan network for Raspberry Pi?

别等时光非礼了梦想. 提交于 2019-12-25 06:49:29

问题


I want my Android and iOS (Swift to be specific) apps to connect to the Raspberry Pi in the network. Of course I can set a fix IP for the Pi and hardcode the IP to the apps, but I would like to know how to do it more dynamically.

What do I need to do on both sides to allow the apps to discover the Pi?


回答1:


If you are connected over Wifi(Access Point) then you can discover devices using SSDP protocol.which does multicast at 1900 port and whoever has joined to particular group will receive and can respond back with information.It can be implemented both side App as well as Pi.



来源:https://stackoverflow.com/questions/36821321/android-ios-scan-network-for-raspberry-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!