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.

RTOS/TM4C1294NCPDT: Access a TM4C1294 running TI-RTOS via its hostname

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Hi

I have the latest TI-RTOS on my tiva C processor. I set up the networking to use DHCP and the device is getting a valid IP-Adress and sends back a valid hostname to my home router (checked in wireshark). The device is responding when calling the IP address in my network but now I would like to access my TivaC via its hostname. 

The windows ">>ping -a" command is not resolving the hostname. And the device is also not responding when I ping the hostname e.g. ">>ping mytiva".

Any suggestions?
It would be very nice if I could tell my customer to just plugin the device in a DHCP enabled router and then entering "http://mytiva" in the webbrowser.

Thanks für your support

Chris

  • Hi Chris,

    So it sounds like you are setting your host name properly on the target (e.g. in the .cfg, you are setting Ip.hostName = "mytiva"). What DNS server are you using? It sounds like it is not getting updated.

    Todd
  • Hi Todd 

    Thanks for your reply.

    Exactly. My hostname is set in the .cfg file of the Ti-RTOS project as you mentioned.
    I have not activated the TI-RTOS DNS Server. Actually, I thought my Wifi Router at home should be my DNS to resolve hostnames on my local Network. I thought the DHCP (also running on my router) should tell the right DNS Server and Default GW to the client.

    Please correct me if I am wrong.

    Thanks in advance.

    Cheers,

    Chris

  • Hi :)

    I am still facing this problem. Thanks for your suggestions and ideas.

    Cheers,

    Chris

  • Chris,

    What do you see for "hostname" in the DHCP transaction in Wireshark?

    Steve
  • Hi Steve, Thanks for your reply.

    DHCP Discover and Request do have the correct Hostname "testBoard" at DHCP Option 12 set. Please don't get confused by the MAC address, this is randomly generated.

  • OK, that looks good.

    What about the DHCP offer that the server sends you? (note that it will be sent to the broadcast address).

    Do you see options 6 (domain name server) and 15 (domain name)?

    Steve

  • Hi Steve

    Thanks for your reply.

    Hmm, unfortunately I only see the DHCP Discover and the Request. I cant see any Offer or Ack. Strange, because the TivaC is getting a valid IP Adress so far...

  • Chris Henschel7 said:
    Hmm, unfortunately I only see the DHCP Discover and the Request. I cant see any Offer or Ack

    The DHCP Discover and Request are sent using broadcast addressing. Whereas the DHCP Offer and DHCP Ack are sent using unicast addressing. Therefore, if the PC running wireshark is connected to an Ethernet switch by default the PC won't see the DHCP Offer and DHCP Ack sent by unicast addressing between the Tiva and DHCP server.

    If using an Ethernet switch which supports Port mirroring then it is possible to capture all the DHCP messages exchanged by the Tiva. E.g.:

  • Chris Henschel7 said:
    Actually, I thought my Wifi Router at home should be my DNS to resolve hostnames on my local Network.

    The hostname "mytiva" doesn't contain a domain name, and from experiments the network configuration on the PC can affect how hostnames without a domain are resolved.

    Using TIRTOS TivaC 2.16.01.14 the hostname was set in the .cfg file with the following:

    Ip.hostName = "mytiva";

    The Tiva was set to obtain its IP address using DHCP. The DHCP server was a SAGEMCOM F@ST2704N router. The DHCP server is placing hosts allocated by DHCP in the lan domain.

    A Windows 10 machine configured to use DHCP is able to resolve the following hostnames:

    mytiva
    mytiva.
    mytiva.lan

    The Windows 10 machine configured to use DHCP has added the lan domain to the DNS suffix search list as shown the the following output from ipconfig /all:

    C:\Users\mr_halfword>ipconfig /all
    
    Windows IP Configuration
    
       Host Name . . . . . . . . . . . . : LAPTOP-<redacted>
       Primary Dns Suffix  . . . . . . . :
       Node Type . . . . . . . . . . . . : Hybrid
       IP Routing Enabled. . . . . . . . : No
       WINS Proxy Enabled. . . . . . . . : No
       DNS Suffix Search List. . . . . . : lan

    Whereas a different Windows 10 machine configured to use a static IP address can't resolve the mytiva hostname but can resolve the following:

    mytiva.
    mytiva.lan

    The Windows 10 machine configured to use a static IP address isn't showing a DNS Suffix Search List in its ifconfig /all output.

    Can your PC resolve the following hostname (i.e. with a trailing period)?

    mytiva.

  • Hi Chris,

    What's the status with this one?

    Todd
  • Thanks for your rich reply and sorry for my late response.

    I tested it yesterday, unfortunately without success. The Tiva is still getting a valid IP-Address and can be pinged on this address. But I can not ping its host-name. If I put a dot behind the ping request takes much more time but still without response from the board.

    I will test the TI-Launchpad standard application tonight. 

    Cheers,

    Chris

  • Hi Chris,

    There is an easy fix for local name resolve, simply add the TIVA host name into Windows hosts file found under C:\Windows\System32\drivers\etc. Network RFC1012 (think) specifies checking local (hosts) file first for name resolve prior to making DNS queries.

  • Chris,

    Can I mark this as resolved?

    Todd

    [4/16 update...I'm marking this as TI thinks resolved. You can post a reply to re-open it.]