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.

LAUNCHXL-CC3235SF: Device Host Name not recognized by WiFi hub

Part Number: LAUNCHXL-CC3235SF
Other Parts Discussed in Thread: CC3235SF, CC3220SF

One feature I would like to get to work is to have the WiFi hub/switch recognize a customer-given device name of the CC3235SF.  This way, customers can correlate the device name to the device rather than simply relying on the MAC address. For example, a person can give a name to a PC, and the hub will recognize it and associate it with the MAC address.

Right now I am setting the device's names as follows:

sl_NetAppSet(SL_NETAPP_DEVICE_ID, SL_NETAPP_DEVICE_URN, name_length, name);

sl_NetAppSet(SL_NETAPP_DEVICE_ID, SL_NETAPP_DEVICE_NAME, name_length, name);

This is not doing the trick.  I must be missing something.  Any help is appreciated.  Thanks!

  • Hi Fred,

    When you call sl_NetAppSet(SL_NETAPP_DEVICE_ID, SL_NETAPP_DEVICE_URN,...), and then read it back with sl_NetAppGet(), does the CC3235 URN update? You may need to check the behavior of your hub.

    Are you using mDNS?

    Best regards,

    Sarah

  • Thanks, Sarah.  You're right.  The URN is not updating.  I went back to some older code where I thought it was, and indeed it updates.  I'll keep digging on the router side and let you know.

  • To answer your question, yes, I am using mDNS.  The DNS works as I can reference the device as name.local.  However, the hub/switch doesn't seem to auto-recognize the name and associate it with the MAC.  It's not a show-stopper, but something that might make it useful for customers to identify the CC3235SF on their on-premise hub/switch.

    I guess I'll leave it at that for now.

  • Hi,

    Switch have nothing to do with device name regardless it is L3 or L4 switch. Maybe you talk about DHCP hostname feature (option 12). This option can be set by URN option and is maintained by your infrastructure DHCP server (not a switch or even HUB).

    Jan

  • Thanks.  I am setting the following:

    • sl_NetAppSet(SL_NETAPP_DEVICE_ID, SL_NETAPP_DEVICE_URN, strlen(name), (unsigned char*) name);
    • sl_NetAppSet(SL_NETAPP_DEVICE_ID, SL_NETAPP_DEVICE_NAME, strlen(name), (unsigned char*) name);
    • sl_NetAppStart(SL_NETAPP_MDNS_ID)

    Now, in this mode, the device connects to a WiFi AP, so I turn off the DHCP and DNS services:

    • sl_NetAppStop(SL_NETAPP_DHCP_SERVER_ID);
    • sl_NetAppStop(SL_NETAPP_DNS_SERVER_ID);

    Maybe that's incorrect.  It seems a bit nebulous to me. 

    Cheers,

    Fred.

  • Hi Fred,

    DHCP server and DNS server inside CC32xx are used at AP mode only. At client mode are not used.

    btw ... you are using terms like "WiFi hub/switch" which I never heard. And according principles how WiFi network works nothing like a "WiFi switch" cannot exist. From this reason I only guessing what you exactly need.

    Jan

  • Thanks, Jan.  As you said, the CC32xx is an AP client connected to a WiFi station.  The WiFi station comprises a WiFi radio and Ethernet switch.  The radio sits on one port of the Ethernet switch.  The user is able to configure the DHCP server in the switch, and in doing so, the "device name" of each device is made available to user to be more user friendly than the MAC address.   Now, in the switch I am managing, the switch is able to recognize the "names" of the other devices, but not the CC32xx.  This is what has made me curious why this is.

  • Hi,

    Hostname of client is provided via DHCP option 12 (this way is used with any other device as well). This option is configurable at CC32xx device side via URN setup. In case of DHCP hostname is now showing for CC32xx there are options:

    • CC32xx device uses static IP and not DHCP (without enabled DHCP at client side this cannot work)
    • you have not properly set URN at CC32xx device
    • not properly configured network infrastructure

    If you want deeply debug this issue you should capture DHCP Discover package from CC32xx device and check content of the option 12.

    For example from my CC3220SF device:

    DHCP discover:

    DHCP client list at firewall / DHCP server:

    Jan

  • That's it!  I was using a fixed IP address.  (I had to search "DHCP Option 12" to fully appreciate the significance of what you said.)  When I turned off the fixed IP address, then the hostname was broadcast to the switch and it appeared there.  Brilliant.  Thanks so much.

    Case closed.

    Fred.