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.

SimpleLink Wi-Fi Starter App source code question (iOS)

Other Parts Discussed in Thread: CC3200, CC3100

In SmartConfigDiscoverMDNS method -netServiceDidResolveAddress:the code looks for a value for the key "srcvers" in the TX record data dictionary. In the case where discovery is being performed for any device (empty deviceName string), it looks for a value of "1D90645". Can someone explain the intent of the srcvers key? Is the intent for applications to use this just as a means for identifying their own product-specific devices, or is the value TI-specific and we should always look for this value? I ask because the name implies "source version". I assume the value is programmable on the CC3200 side. Is that correct? (Note, I'm working the iOS side of our application, so don't have good knowledge of the device side host code.)

-Mark

  • Hi Mark,

    Yes this is the case for advertising the HTTP service.....this way you can filter on the ones being sent by the CC3100/CC3200 device.

    Most likely in a real world setting you would want to create your own service and advertise it, and then have your iOS app look for this service.

    I have provided open source code which you can easily modify ti make this happen. My CC3200 application is using TI-RTOS, so you will need to have this installed in CCS (Code Composure Studio).

    CC3200 Starter Code is here -

    iOS Starter Code is here -

    In simplelinklibrary.h, change the following define to what ever you want to call your mDNS service

    #define MDNS_SERVICE  "._control._udp.local"

    Then in the iOS app, you need to change the SmartConfigDiscoverMDNS .m to the following

    - (void) startMDNSDiscovery:(NSString*)deviceName {
    
       NSLog(@"Starting mDNS discovery with device name %@", deviceName);
       NSLog(@"Stop discovery prior to starting again");
    
       [self stopMDNSDiscovery];
       self.deviceName = deviceName;
       self.netServiceBrowser = [[NSNetServiceBrowser alloc] init];
       [self.netServiceBrowser setDelegate:self];
       [self.netServiceBrowser searchForServicesOfType:@"._control._udp.local" inDomain:@""]
    }

    Then in the netServiceDidResolveAddress function you can just removed the bits regarding expectedSrcvers, or you could create your own value to search on from the mDNS details.

    I may not have included everything required, but this should be enough to get your started.

    Glenn.

  • Glenn,

    This make total sense. Thank you for the great info, and for sharing your github project!

    -Mark