Page 1 of 1

Can't resolve mDNS name

PostPosted: Wed Apr 16, 2014 9:35 am
by jhalfpen
Hi
I'm trying to put a system together with a Raspberry Pi acting as a web socket server for WiFIDipCortex WiFi nodes. I'm using mDNS and on the RPi I'm using Avahi to set and report a mDNS name of server.local. This works and I can resolve this correctly on iOS and Windows based machines running Bonjour. However, when I try to do this with mbed using the CC3000 library on the WiFiDipCortex, when using gethostbyname() I get:

Get IP address for server.local
gethostbyname Returned code : -73
Failed to resolve

This code works fine for 'ordinary' DNS names and resolves these correctly to their IP address

The code is:

uint32_t ip;
int32_t resolveRetCode = 0;
uint8_t *HostToPing = (uint8_t *)ACTIFI_SERVER_URL;

printf("Get an IP address for %s\r\n",HostToPing);
sprintf (DebugTextBuffer, "Get IP address for %s\r\n",HostToPing); REPORT;
resolveRetCode = wifi._socket.gethostbyname(HostToPing,strlen((const char *)HostToPing), &ip);
sprintf (DebugTextBuffer, "gethostbyname Returned code : %i \r\n", resolveRetCode); REPORT;

REPORT being a macro which supports serial port debug messages and which works fine.

Any ideas?

Re: Can't resolve mDNS name

PostPosted: Wed Apr 16, 2014 1:23 pm
by Carl-SolderSplash
Hi,

I've not used mDNS that much, I don't think TI's gethostbyname is using mDNS so will query its congifigured DNS servers to resolve the domain provided, in your case this a locally configured mDNS domain which your internet DNS provider would have no knowledge of.

Looking at the TI forum there appears to be a few limitations and issues with the internal mDNS.

I shall keep looking...

Re: Can't resolve mDNS name

PostPosted: Thu Apr 17, 2014 10:00 am
by jhalfpen
Hi
All is becoming clearer - the CC3000 firmware version that we have (1.24 AKA 1.11.1 !!!) has bugs in the mDNS area. We need to update the firmware to 1.26 AKA 1.12 - can you tell me how to do this please.

Re: Can't resolve mDNS name

PostPosted: Thu Apr 17, 2014 10:27 am
by Carl-SolderSplash
Ahh I wasn't aware there was an update, I am now

We have a build of code we use before shipping to flash the CC3000 modules from the 1.10 version they ship with to 1.24 (1.11.1). TI have a click wrap license for the firmware update code so it can't be distributed. There was an mbed project that did this but it had to be removed.

I'm sure we can send you a binary though.

I shall update our Test app with the latest firmware image and test it over the weekend. I'll update the thread when I have a .bin for you.

The firmware changes may or may not break the host driver so I need to look at the changes they have made to that too.

Re: Can't resolve mDNS name

PostPosted: Thu Apr 17, 2014 10:50 am
by jhalfpen
Hi Carl

Many thanks - see http://processors.wiki.ti.com/index.php ... ease_Notes for changes 1.11.1->1.12

Very confusing from TI having two, similar but different numbers for firmware variants.

John

Re: Can't resolve mDNS name

PostPosted: Thu Apr 17, 2014 10:56 pm
by Carl-SolderSplash
Yes TI have confused their version numbers a lot! There's another set of numbers when it comes to the driver library too.

I've updated our test app with the new firmware image and successfully flashed a board, it now reports 1.26.

Connected to an AP, pinged, fetched the time, flooded it with UDP. Started mDNS and it appears on the Zeroconfig app for android. So It seems to work.

Next I've got to compare TI's previous driver library with the current to work out any host driver changes, the release notes dont suggest much was altered.

Also, looking through the host library, I can only see the mDNS advertisement ability there doesn't seem to be any more mDNS functionality built in.
http://processors.wiki.ti.com/index.php/CC3000_mDNS

Re: Can't resolve mDNS name

PostPosted: Sun Apr 20, 2014 12:10 pm
by Carl-SolderSplash
Here is the firmware update binary with update instructions : viewtopic.php?f=15&t=88