Can't resolve mDNS name

A 40 Pin Dip packaged development board enabling you to create internet connected products

Can't resolve mDNS name

Postby jhalfpen » Wed Apr 16, 2014 9:35 am

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?
jhalfpen
 
Posts: 8
Joined: Wed Feb 12, 2014 11:09 am

Re: Can't resolve mDNS name

Postby Carl-SolderSplash » Wed Apr 16, 2014 1:23 pm

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...
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: Can't resolve mDNS name

Postby jhalfpen » Thu Apr 17, 2014 10:00 am

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.
jhalfpen
 
Posts: 8
Joined: Wed Feb 12, 2014 11:09 am

Re: Can't resolve mDNS name

Postby Carl-SolderSplash » Thu Apr 17, 2014 10:27 am

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.
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: Can't resolve mDNS name

Postby jhalfpen » Thu Apr 17, 2014 10:50 am

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
jhalfpen
 
Posts: 8
Joined: Wed Feb 12, 2014 11:09 am

Re: Can't resolve mDNS name

Postby Carl-SolderSplash » Thu Apr 17, 2014 10:56 pm

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
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: Can't resolve mDNS name

Postby Carl-SolderSplash » Sun Apr 20, 2014 12:10 pm

Here is the firmware update binary with update instructions : viewtopic.php?f=15&t=88
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm


Return to WiFi DipCortex

Who is online

Users browsing this forum: No registered users and 8 guests