This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

mDNS implementation on CC3200 - service name collision

Other Parts Discussed in Thread: CC3200

I have two CC3200 Launchpad eval boards, running stock firmware. It looks like mDNS service name collision is not implemented on these boards per the api documentation (see below). When I run the iOS WiFi starter app, run Smart Config, provide a device name, both of the boards are provisioned with that device name, but only one comes back in discovery. I'm not an mDNS expert. Can someone explain what is going on here? Is this a bug? Seems like this should be a valid use case and mDNS should handle this.

========================

13.5.3 API – Register Service

Description: This API registers a service and advertises it if mDNS is started and the device has an IP address (STA) or up (P2P or AP). The service is kept in the mDNS database; only one registration is needed. This registered service is offered by the application.

The service name should be the full-service name according to DNS-SD RFC, meaning the value in the name field of the SRV answer.

Example of a service name:
• PC1._ipp._tcp.local
• PC2_server._ftp._tcp.local

If the service is unique (see the Options parameter in Table 13-5), mDNS probes the service name to ensure its uniqueness before starting to announce the service on the network. If it is not unique, a number will be added to identify it.

Return

= 0 – Success
<0 – A kind of error

API name

int sl_NetAppMDNSRegisterService( const char*

Parameters:

       pServiceName,
ServiceNameLen,
unsigned char
const char*
unsigned char
unsigned short  Port,
unsigned long   TTL,
unsigned long   Options);

========================

-Mark

  • To assist in trouble shooting I recommend using a mDNS browser, this will let you see what is being advertised on the network and will ensure that both devices are advertising them selves correctly.

    There are many of these browers available for Windows, Macintosh, iOS and Android. Just search on mDNS Browser or Bonjour Browser

    Glenn.
  • Thank you, Glenn. I use Bonjour Browser. Only one is being advertised.
  • If this is the case, then the issue is not with mDNS but most likely with connectivity. Are you sure both devices are on the Network? Another tool to use if you have iOS or Android device is the Fing app (available from iOS App Store or Google Play). It will show you what is on your network, you will need to look for devices that have the manufacturer as Texas Instruments.

    Glenn.
  • I can see both devices on the network, using Fing. I can also just go to each device's setup web page. Setup shows that both devices have the same name as I used to provision them from the iOS app. I believe the code running on these boards must be failing to advertise the service if a service with the same name is already registered on the network. Glenn, are you able to test this? Or, someone from TI?

    Thanks.


    -Mark

  • Can I please get some help from a TI engineer on this? Thank you.

    -Mark
  • I still need some help with this. Maybe my original question was not clear. If so, please let me know. Or, maybe this post is way down the queue by now and nobody can see it? I'll open another thread for this if I don't hear from a TI engineer soon. This is the "Support Forum", right?

    -Mark
  • Hi Mark,

    Let me clarify the questions/points, which may assist.

    1) Does the mDNS specification allow for the same name for the same service to be advertised but on different devices with different IP addresses?

    You could possibly find out what the answer to this is from other sources like http://stackoverflow.com/ for example. If the answer was no, as the mDNS spec does not allow this, then you would have your answer. And that would be that the CC3200 is not the issue, it is the mDNS specification.

    2) You can test to see if it is possible with the CC3200. I think you have already done this, and when checking with Bonjour Browser, and it only shows 1 device even when fing shows 2 devices are present.

    My understanding on mDNS is that the CC3200 will advertise with a certain mDNS packet and then devices which are listening for this packet, then build a database of devices and their services. So if the Bonjour Browser is not showing both devices, the issue looks related to how mDNS works or how the specific browser you are using builds its database.


    Basically, what I am saying is that it looks to me to be an expected outcome of how mDNS works, and is not related to the CC3200. Please following the recommendations I outlined in 1) above to confirm this.

    Glenn.
  • Glenn,

    Thank you for the reply. Sorry if my questions sound stupid. I'm just not an expert on the mDNS/DNS-SD code that is running on the CC3200 Launchpad eval boards. Neither am I an expert on the mDNS/DNS-SD in general. Also, I am an iOS developer, not a CC3200 firmware/driver developer, so right now, the CC3200 Launchpad eval board is somewhat of a black box to me, other than I have a pretty good handle on how Smart Config works. No, there is nothing specific to "CC3200 mDNS" on Stackoverflow. As for the mDNS spec, that's really kind of moot for the question I am trying to ask. Clearly, service name collision is handled by some bonjour service hosts, as it is typical to see unique identifiers appended to service names when multiple devices register services with the same name on the network (e.g. Apple TV). So, let me see if I can ask my question(s) more succinctly:

    1) Is the Smart Config code and/or mDNS code that is running on the CC3200 Launchpad using the API referenced in my original message to register services? If so, does not the part in bold print suggest that both services would be registered, but one would have a unique number added (appended?) to it to guarantee uniqueness?

    2) Is this not a valid use case? (a) 2 or more unprovisioned CC3200's are powered and within range, (b) user runs Smart Config via iOS app, with device name entered as "Garage", and both devices are connected to the network (confirmed) (c) two services are registered for both devices, and the iOS app pcan discover both devices (e.g. as "Garage" and "Garage 2"). If this isn't valid used case, then there is a flaw in Smart Config, because this is a highly possible scenario. We can't just rely on the user reading, and following, our instructions to only power and provision one device at a time. This scenario is going to happen. The expectation would be that two devices provisioned on the network would advertise themselves with a unique name, especially if they are connected to the network with the same device name (which they are).

    This has nothing to do with the specific browser I am using. This is simply a matter of only one of two services (for two devices provisioned with the same name) being advertised (yet they are reachable on the network). Hence, I cannot discover both of these devices. That's not a good user experience.

    Am I making any sense whatsoever? I'm simply asking for someone from TI to confirm that what I am seeing is either the way it's supposed to work, or whether what I am seeing is contrary to the way it should work. If the former, I need someone to explain to me what the API I reference in my original post is referring to when it talks about service name uniqueness (bold print). Maybe the Launchpad does not use this API method to register services?

    Thank you.


    -Mark

  • Hi Mark,

    You don't sound stupid at all, very knowledgeable.

    I need to run, so cannot address all your post. But regarding stackoverflow....I suggested posting some questions there, to see if other can assist with the mDNS spec part. It is a great community, I just posted 2 questions about Wi-Fi Direct, which I could have posted here, but I knew there would be more experts on that forum who know about these sorts of things.

    Anyway I will try and respond later to the rest of your post.

    Glenn.
  • Thanks Glenn. I use stackoverflow all the time. I just don't think it's a question for stackoverflow. It's a question for TI. Again, it's not a general question about mDNS or DNS-SD; it's a question about the CC3200 and TI's implementation of both Smart Config and the aforementioned technologies. The questions I asked in my previous post would best be answered by TI. Or, if you have any insight, based on your experience with the CC3200, I would welcome your input too. I'm quite surprised that if you have worked with the CC3200 and Smart Config (and mDNS discovery), that you would not have run into the scenario.

    -Mark

  • Please read Appendix D about automatic name conflict resolution:

    RFC 6763 - DNS-Based Service Discovery - tools.ietf.org/.../rfc6763

    -Mark