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.

CC3120: How to set the Domain name if the simplelink is configured for station mode

Part Number: CC3120

I am using Simplelink CC3120 for our web service application and configuring the same in station mode to get connected to the router/Other AP.

I have configured the Simplelink for Domain name using "sl_NetAppSet" API in AP mode and it is working fine there API call is as shown below:

"Status = sl_NetAppSet(SL_NETAPP_DEVICE_ID, SL_NETAPP_DEVICE_DOMAIN, strlen((const char *) charValPtr), (_u8 *) charValPtr);"

Now if I use the sam API call in Station Mode it is not working.

If above call is meant for AP mode only than, how can I set the Domain Name in Station Mode?

With regards,

Anuj Shah

  • Hi Anuj,

    It is not technically possible to set DNS name at STA mode. This is not a CC3120 limitation, but it comms from natural behaviours of computer networks works. But via URN API you can set name for mDNS and DHCP hostname (Option 12). DHCP hostname may to be propagated as domain name according setup of network infrastructure (DHCP server and DNS server).

    _i16 Status;
    _u8 *device_name = "MY-SIMPLELINK-DEV";
    Status = sl_NetAppSet (SL_NETAPP_DEVICE_ID,SL_NETAPP_DEVICE_URN, strlen(device_name), (_u8 *)
    device_name);
    if( Status )
    {
    /* error */
    }

    Jan

  • Hi Jan,

    Thanks for the quick response. With the URN i am able to discover the device using the URN  name on ICMP protocol.

    What i am looking for is setting the Domain Name so that my http service can be invoked using the same name.

    With regards,

    Anuj Shah

  • Hi Anuj,

    What do you mean discover by ICMP? URN have nothing to do with ICMP protocol.

    No this is not possible. DNS at networks does not work by that way. For discovery devices at STA mode you need to use some discovery/zero-conf protocol like a mDNS/Bonjour, LLMNR or own UDP protocol based on UDP broadcast.

    Jan

  • Hi Jan,

    Discover by ICMP means, i am able to discover the device if i ping using the Name i set in URN. But i am not looking for that.

    What I know is we should be able to set the Domain name for HTTP server, that is irrelevant with the mode of operation of the WIFI. So even though we use WiFi in STA mode we should be able to set the domain name for HTTP server.

    In this case i am not using the existing HTTP server provided by CC3120, I am hosting my own server. Even though i have used both URN and DOMAIN set functionality but i am not able to invoke the http server using the Domain name.

    Any idea how i can do this?

    With regards,

    Anuj Shah

  • Hi Anuj,

    Discover by ICMP means, i am able to discover the device if i ping using the Name i set in URN. But i am not looking for that.

    URN have nothing to do with ping. It may to be possible that domain name is set at your DNS server via DHCP hostname (DHCP Option 12). But this depends on your network infrastructure and you cannot rely on this way for all deployments.

    What I know is we should be able to set the Domain name for HTTP server, that is irrelevant with the mode of operation of the WIFI. So even though we use WiFi in STA mode we should be able to set the domain name for HTTP server.

    In this case i am not using the existing HTTP server provided by CC3120, I am hosting my own server. Even though i have used both URN and DOMAIN set functionality but i am not able to invoke the http server using the Domain name.

    No this is not technically possible. It does not exist such universal way. You need realize that DNS requests at STA mode are carried out at DNS server inside your network. That means network device which have nothing to do with your CC3120. At the internet you find many tutorials how network and DNS works. Detailed discussion how computer networks works is out of scope of this forum.

    I think best option for you is to use mDNS (for Apple devices) or implement by your own LLMNR protocol (for Windows devices) implementation. But you need to have DNS client at your computer which supports such feature.

    Jan

  • Hello Anuj, 

    Unfortunately Domain name configuration is only supported in AP mode for the reasons Jan has stated below. I will refer you to Section 9 (primarily 9.2 and 9.3) of the cc3x20 Network Processor User guide

    Kind Regards,

    Rogelio