Jump to content
43oh

mDNS or similiar with cc3000?


Recommended Posts

Does anyone have experience with mdns?

I want to connect the tiva-c and CC3000 with my network and access it by name and not the ip.

 

I got the WiFi stuff working, but entering an name in the browser instead on an IP would be quite nice, and assigning a static ip in the router isnt an option.

 

regards,

Nick

Link to post
Share on other sites

Thanks, i tried it and it returns 58557 as the result, according to SimplelinkWiFi\utility\socket.h it should return either 0 or -1?

//*****************************************************************************
//
//!  mdnsAdvertiser
//!
//!  @param[in] mdnsEnabled         flag to enable/disable the mDNS feature
//!  @param[in] deviceServiceName   Service name as part of the published
//!                                 canonical domain name
//!  @param[in] deviceServiceNameLength   Length of the service name
//!  
//!
//!  @return   On success, zero is returned, return SOC_ERROR if socket was not 
//!            opened successfully, or if an error occurred.
//!
//!  @brief    Set CC3000 in mDNS advertiser mode in order to advertise itself.
//
//*****************************************************************************

But somehow it works, in the Bonjour Browser it shows up under Available Bonjour services as:

"_device-info._udp. (CC3000)"

 

Service information:

Name: CC3000

vendor Texas-Instruments

dev CC3000

 

but i cant connect to it with http://CC3000.local, i think i should look deeply into the TI forum.

 

thanks anyway, im one step further :)

 

regards, Nick

Link to post
Share on other sites

I googled yesterday and found out that the device also needs a mDNS responder which listens to a specific udp port for broadcasts and then sends a reply to the client with its IP.

I'm on it. Adafruit published a library for the CC3000, i'll have a look if i can port it to energia.

Link to post
Share on other sites

I wasnt able to get the Adafruit mDNS working correctly. But i found out that issuing a mDNS advertising with

mdnsAdvertiser(1, "CC3000", 6);

registers the CC3000 with the Bonjour service (you need to install iTunes or Bonjour on Windows platforms).

 

I could not access the CC3000 with http://CC3000.local, after reading several posts in the TI forum i found out that the current implementation of mDNS in the CC3000 firmware is buggy or broken and no matter what you specify as a name the CC3000 advertises itself as "target.local". I was able to access my webserver by http://target.local

This is only working for windows, with iOS this isnt working.

 

regards, Nick

Link to post
Share on other sites

Status update:

I started porting the Arduino EthernetBonjour library for the cc3000, it is able to announce its name correctly with a multicast mdns packet, but it seems that the cc3000 is unable to receive multicast packets.

 

My firmware is 1.24, i know there is a new firmware out, but TI decided to make patch programmer only available to some FRAM mcu yet. i doubt anyway this new firmware fixes the mDNS code.

 

So the only choice at the moment is to spam the network in short intervals with an advertiserpacket :(

At the moment i am thinking of slimming down the bonjour library to just replace the mdnsAdvertiser() function. my wifi is spammed by the HP Printer anyway ;)

 

this is quite frustrating, im looking forward to the atmel mcus with wifi onboard, perhaps those will work as intended.

 

regards, Nick

Link to post
Share on other sites

I compared the binaries of the firmwares 1.24 and 1.26 and noticed that "target" shows up in the 1.24 and is missing in the 1.26 binary, looks like TI finally removed the mDNS name bug.

The funny thing is they release the Patchprogrammer only for the FR5739 Launchpad yet :(

Im thinking of porting it, but there is a chance of bricking my cc3000 :-P

I'm a little disappointed by the support of TI concerning the cc3000.

 

regards, Nick

Link to post
Share on other sites

Tadaaa, not bricked :)

IP Address Information:
IP Address: 192.168.0.17
Version: 1.26
NetMask: 255.255.255.0
Gateway: 192.168.0.1

mdnsAdvertiser(1, "energia", 7);

shows up correctly as energia.local in wireshark

>ping energia.local -> resolves to 192.168.0.17 :D

 

I'll post the updated fw_patch.h for energia later.

 

regards, Nick

Link to post
Share on other sites
  • 2 weeks later...

@@Thorvard can you post the fw_patch.h so that I can pull it into the library?

Did you get the CC3000 library to work with mdns or is this with the Adafruit lib?

I posted the fw_patch.h about 10 days ago in the library section :)

http://forum.stellarisiti.com/topic/1895-updated-fw-patchh-for-cc3000-firmware-126/

 

Feel free to pull it into the library.

 

I was able to get the Adafruit MDNS code to work, i'll post it later in the library subsection.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...