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.

change URN doesn't take effect

Other Parts Discussed in Thread: CC3200

try to change the urn, but it doesn't take effect.

tried after switch mode to sta or ap:

sl_NetAppSet (SL_NET_APP_DEVICE_CONFIG_ID,NETAPP_SET_GET_DEV_CONF_OPT_DEVICE_URN,strlen(device_urn),(unsigned char *) device_urn);

  • Hi Vincent,

    I used the following code which worked. Please note that this changes the Device Name and not the Device Domain. If you are using mDNS to discover the device, then this is the correct setting to use.

        unsigned char device_urn[] = "testURN";
        sl_NetAppSet (SL_NET_APP_DEVICE_CONFIG_ID,NETAPP_SET_GET_DEV_CONF_OPT_DEVICE_URN,strlen((const char *)device_urn),(unsigned char *) device_urn);
    

    This will now be discoverable in a iOS or Macintosh or a mDNS browser as http://testURN.local

    Glenn.

  • the cc3200 works in the AP mode and I want the ssid to be myname-xxxx instead of mysimplelink-xxxx. 

    it still doesn't work ; (

  • You need to set the AP name and not the Device Name, try the below code

                    char apName[12] = "YourName-123";
    
                     // Set new AP SSID Name
                    unsigned short length = strlen((const char *)apName);
        	        sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SSID, length, apName);
    
        	        // Set security type for AP mode
        	        //Security options are:
        	        //Open security: SL_SEC_TYPE_OPEN
        	        //WEP security:  SL_SEC_TYPE_WEP
        	        //WPA security:  SL_SEC_TYPE_WPA
        	        unsigned char  val = SL_SEC_TYPE_OPEN;
        	        sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_SECURITY_TYPE, 1, (unsigned char *)&val);
    
        	        //Set Password for for AP mode (for WEP or for WPA) example:
        	        //Password - for WPA: 8 - 63 characters
        	        //           for WEP: 5 / 13 characters (ascii)
        	        //unsigned char  str[65];
        	        //unsigned short  len = strlen(password);
        	        //memset(str, 0, 65);
        	        //memcpy(str, password, len);
        	        //sl_WlanSet(SL_WLAN_CFG_AP_ID, WLAN_AP_OPT_PASSWORD, len, (unsigned char *)str);
    
                    // If you want to retrieve the AP Name
    		// Obtain the AP SSID Name
                    char ssid[32] = "";
    		unsigned short len = 32;
    		unsigned short  config_opt = WLAN_AP_OPT_SSID;
    		sl_WlanGet(SL_WLAN_CFG_AP_ID, &config_opt , &len, (unsigned char*)ssid);

    Glenn.