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.

TM4C1294NCPDT: uIP does not send packets when a specific IP is used but is able to Broadcast if broadcast IP(255.255.255.255) is used

Part Number: TM4C1294NCPDT

Hello,

I am using Ethernet bootloader for my application and the bootloader broadcasts bootp requests in the network.

Now I want to send these bootp requests to a specific IP and not broadcast.

What I did was assign uip_hostaddr a IP address for the device.

Then open a connection using the function as shown below

g_pConn = uip_udp_new(&sAddr, HTONS(BOOTP_SERVER_PORT));

sAddr is the address of the server PC.

and then send the Bootp request Packet.

The bootloader doesnt send the Bootp request.

Now when sAddr is broadcast IP I can see the BootP packets in Wireshark.

But when I change this IP to my server PC IP bootloader doesnt send out bootp packets.

What could be the issue?

Thanks.

  • Hi,
    I certainly don't claim any kind of expertise on uip. I'm not sure what the problem is. Did you call uip_udp_bind to bind your local port after calling the uip_udp_new?

    Are you using the TivaWare Ethernet bootloader?

    If you are using the TivaWare Ethernet bootloader, in the bl_emac.h the UIP_CONF_BROADCAST is currently set to 1. Try changing it to 0. I don't know if this will solve the problem.

    //*****************************************************************************
    //
    // Enable UDP broadcast support.
    //
    //*****************************************************************************
    #define UIP_CONF_BROADCAST 1
  • Hi Charles,

    I did call uip_udp_bind after as suggested in uIP documentation.

    Yes im using Tivaware bootloader.

    As per uIP UIP_CONF_BROADCAST is used to allow reception of UDP broadcast packets. I checked again by changing it to 0 but it still doesnt work.

    I have the same application on stellaris ware and it works correctly there.

    There are no changes in uIP stack.

    Can you please check what could be the issue for sending to a specific IP?

    Thanks.

  • Hi,

    Do you still have the Stellaris board that you can run on the same network? I just wanted to make sure we are comparing the Tiva and Stellaris boards in the same operating environment, i.e. in the same network, same subnet, same VLAN and etc. The reason is that if the Stellarisware and TivaWare have the same uip stack then i can't understand why it wouldn't work in Tiva.

    Can you also use WireShark to capture both the Stellaris board and the Tiva board BOOTP traffics and compare what is the difference?
  • Hi,

    Found the issue in initialization of systick.  uIP works correctly.

    Also when setting the IP address of uIP used uip_addr_copy instead of directly assigning IPs.

    Now the code works fine.

    Thanks.

  • Hi Prassanna,
    Do you mind to share with us what you changed to the systick initialization and the code you use to configure the IP using uip_addr_copy ? I'm sure it will benefit many in the forum and we may be able to incorporate into future TivaWare release.