零配置名称解析 [英] Zeroconf Name resolution

查看:196
本文介绍了零配置名称解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了嵌入式Web服务器的控制装置。 Web服务器提供了一个控制界面来请求它的任何Web浏览器(从Windows浏览器,Mac浏览器,iPhone的Andr​​oid等)。

I am developing a control device with an embedded webserver. The webserver provides a control interface to any web browser that requests it (from Windows browsers, Mac browsers, iPhone android etc).

我遇到的问题是,与一般的知道如何访问设备的通用方式。即在Web浏览器中键入的内容地址。

The problem I am having is with a general way of generically knowing how to access the device. i.e. what address to type in the web browser.

固定IP地址是太为我的用户技术人员,并可以去错了,因为我的设备可以插入到许多不同的本地网。使用UPnP服务发现需要软件给客户一些平台上运行,而不是像刚才输入网址的自然。我想要实现名称解析。

Fixed IPs are too techie for my users and could go wrong as my device could be plugged into many different Local networks. Using uPnp service discovery requires software to run on the client for some platforms and isn't as natural as just typing a web address. I want to implement Name Resolution.

我目前的实现使用NetBIOS协议。所以,从Windows浏览器中我可以输入//控制器/和它的作品,但是这不符合苹果电脑或智能手机工作。我除了可以尝试实施苹果mDnsresponder这将使Mac电脑和iPhone手机玩的开心(虽然我觉得然后是IM限//controller.local/)。为Android,塞班等也可能存在类似的事情,但有不是创建一个网络名字,我可以尝试一个更通用的解决方案?

My current implementation uses the netbios protocol. So from a windows browser I can type //controller/ and it works but this doesn't work with Macs or smartphones. I can in addition try to implement Apples mDnsresponder which should make Macs and iPhones play happy (although i think then im limited to //controller.local/). Maybe similar things exist for Android, Symbian etc too but is there not a more universal solution for creating one network name that I could try?

该平台目前基于TI的的Cortex M3处理器和lwIP的。

The platform is currently based on a TI Cortex M3 processor and lwIP.

任何帮助或如何寻找解决办法的建议是多AP preciated。

Any help or suggestions for how to find a solution are much appreciated.

亲切的问候,

鲍勃

推荐答案

有关Windows用户能够自动地发现使用零配置您的设备,他们将需要:

For Windows users to be able to 'automagically' find your device using Zeroconf, they would need to:


  1. 已安装的mDNS守护进程(如 mDNSResponder 你所说,这是免费的从苹果)

  2. 拥有的第二的安装的软件,知道如何在本地网络上发出查询到的mDNS守护进程,并显示可用的服务(即设备的嵌入式Web服务器)

  1. Have an mDNS daemon installed (like the mDNSResponder you mentioned, which is available for free from Apple)
  2. Have a second piece of software installed that knows how to issue queries to the mDNS daemon and display available services on the local network (i.e., your device's embedded web server)

用于Windows的Bonjour还附带了一个Internet Explorer的插件,这足以项目#2,可能不是'太技术人员为您的用户。 (他们将只需要下载和安装Windows的Bonjour并勾选框安装Internet Explorer的插件。)Mac用户可以只使用Safari浏览器,已经是零配置感知。

Bonjour for Windows comes bundled with an Internet Explorer plugin that's adequate for item #2, and might not be 'too techie' for your users. (They would just need to download and install Bonjour for Windows and tick the box to install the Internet Explorer plugin.) Mac users could just use the Safari browser, which is already Zeroconf-aware.

之谜---和最棘手的部分的最后一部分---是,你将不得不修改自己的软件与本地的mDNS守护注册您的控制器。但是,有没有这样的事情,presumably,因为你的控制装置是一个嵌入式系统。所以,你需要编写自己裸机的mDNS守护进程。这不是的的很难​​做,你可以使用苹果的的 mDNSPosix code作为一个起点。但是,根据您的硬件限制,这可能是不可行的。

The final piece of the puzzle---and the trickiest part---is that you would have to modify your own software to register your controller with the "local mDNS daemon". However, there's no such thing, presumably, because your 'control device' is an embedded system. So you'd need to write your own bare-bones mDNS daemon. It's not that hard to do, and you can use Apple's mDNSPosix code as a starting point. But, depending on your hardware constraints, this might not be feasible.

所有的一切,零配置可以协议一起工作的一个棘手的堆栈。 零配置方面只适用于用户的体验。到的开发的,它presents一个相当陡峭的学习曲线。如果您的用户通常只有一个的您的设备运行的一个的情况下,它可能是矫枉过正。

All in all, Zeroconf can be a tricky stack of protocols to work with. The 'zero configuration' aspect applies only to the user's experience. To a developer, it presents a fairly steep learning curve. If your users typically only have a single instance of your device running, it may be overkill.

这篇关于零配置名称解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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