Thorvard 14 Posted March 13, 2014 Share Posted March 13, 2014 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 Quote Link to post Share on other sites
dubnet 238 Posted March 14, 2014 Share Posted March 14, 2014 There have been some interesting threads on the TI E2E site on mdns. These might be useful. http://e2e.ti.com/search/default.aspx#q=mdns&g=90&sc=forum Thorvard 1 Quote Link to post Share on other sites
energia 485 Posted March 14, 2014 Share Posted March 14, 2014 I have not tried it myself but you can try a call to mdnsAdvertiser() in your Sketch after you get connected to WiFi: mdnsAdvertiser(unsigned short mdnsEnabled, char * deviceServiceName, unsigned short deviceServiceNameLength); For example: mdnsAdvertiser(1, "CC3000", 6); Thorvard 1 Quote Link to post Share on other sites
Thorvard 14 Posted March 14, 2014 Author Share Posted March 14, 2014 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 Quote Link to post Share on other sites
Thorvard 14 Posted March 15, 2014 Author Share Posted March 15, 2014 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. Quote Link to post Share on other sites
Thorvard 14 Posted March 16, 2014 Author Share Posted March 16, 2014 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 Quote Link to post Share on other sites
dubnet 238 Posted March 16, 2014 Share Posted March 16, 2014 So much for multiple nodes on the same network. Quote Link to post Share on other sites
Thorvard 14 Posted March 22, 2014 Author Share Posted March 22, 2014 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 Quote Link to post Share on other sites
Thorvard 14 Posted March 23, 2014 Author Share Posted March 23, 2014 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 Quote Link to post Share on other sites
Thorvard 14 Posted March 23, 2014 Author Share Posted March 23, 2014 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 I'll post the updated fw_patch.h for energia later. regards, Nick dubnet 1 Quote Link to post Share on other sites
Thorvard 14 Posted March 23, 2014 Author Share Posted March 23, 2014 I found the problem why the cc3000 isnt receiving any multicast packets... its my WiFi Router It isnt forwarding multicasts from the lan to the wifi interface. I tried another Access Point and everything works as intended Quote Link to post Share on other sites
energia 485 Posted April 3, 2014 Share Posted April 3, 2014 @@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? Quote Link to post Share on other sites
Thorvard 14 Posted April 3, 2014 Author Share Posted April 3, 2014 @@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. Quote Link to post Share on other sites
Thorvard 14 Posted April 3, 2014 Author Share Posted April 3, 2014 Posted the modified library in the library subsection, have fun http://forum.stellarisiti.com/topic/1917-adafruit-mdns-library-ported-for-energia-cc3000/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.