安卓&Raspberry Pi 的 iOS 扫描网络? [英] Android & iOS scan network for Raspberry Pi?

查看:73
本文介绍了安卓&Raspberry Pi 的 iOS 扫描网络?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的 Android 和 iOS(具体来说是 Swift)应用程序连接到网络中的 Raspberry Pi.当然,我可以为 Pi 设置固定 IP 并将 IP 硬编码到应用程序,但我想知道如何更动态地执行此操作.

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.

我需要在双方做什么才能让应用发现 Pi?

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

推荐答案

如果您通过 Wifi(接入点)连接,那么您可以使用 SSDP 协议发现设备.它在 进行多播1900端口,加入特定组的人将收到并可以回复信息.它可以在App端和Pi上实现.

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.

这篇关于安卓&Raspberry Pi 的 iOS 扫描网络?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆