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.

TMS570LS1227: TMS570 EMAC (TCP/IP) Commuincation(client, tcp/ip)

Part Number: TMS570LS1227
Other Parts Discussed in Thread: HALCOGEN

Dear Users.

I am developing the sensor data receive embedded board with TMS570LS1227 HDK board.

Sensor is the server and HDK should be client in TCP/IP with static IP address in local network.(direct commincation, no internet network)

And, HDK only receive the sensor data no transmit.

Currently, I download the lwIP demo project, and successfuly compile the project.

But, the demo projet only show the HDK is http server, but I want to use the HDK as client with TCP/IP.   

But, I don't know how can I configure the HDK for TCP/IP client with static IP.

And how can I parse the receive raw data.(what is the function or variable receiving data buffer in lwIP example project)

Please help me,

Is it possible to send me the example source code or project? 

Thanks you for your reading... 

  • Hi user1842336,

    We don't provide much in the way of lwIP support, just the demo project.  

    If you study the ..\example\hdk\src\lwip_main.c file, you can see where to change to a static IP address,

    comment out the call to lwIPInit that uses  "IPADDR_USE_DHCP" and uncomment the one that uses "IPADDR_USE_STATIC"

    	/* Initialze the lwIP library, using DHCP.*/
    
        /*
        while (ipAddr == 0) {
    	*/
    		sciDisplayText(sciREGx, txtEnetInit, sizeof(txtEnetInit));
    		ipAddr = lwIPInit(0, macAddress, 0, 0, 0, IPADDR_USE_DHCP);
    
    	/*
    	}
    	*/
    
    	/* Uncomment the following if you'd like to assign a static IP address. Change address as required, and uncomment the previous statement. */
        /*
    	uint8 ip_addr[4] = { 10, 219, 15, 60 };
    	uint8 netmask[4] = { 255, 255, 254, 0 };
    	uint8 gateway[4] = { 10, 219, 14, 1 };
    	ipAddr = lwIPInit(0, macAddress,
    			*((uint32_t *)ip_addr),
    			*((uint32_t *)netmask),
    			*((uint32_t *)gateway),
    			IPADDR_USE_STATIC); */

    As far as the rest of the questions I really can't help as they are related to the lwIP software and we mainly have expertise with the microcontroller hardware here.

    So I would say read as much as you can on the lwIP Wiki or Forums.. since it is an open source project.

  • Thank you for your fast reply..

    TI don't have a plan to deploy example source code or project related to my question?

  • No, the current lwIP example handles all of the chip specific questions because it shows how to layer lwIP with the
    HALCoGen EMAC low level driver.

    But showing how to make various configurations of lwIP is really outside the scope of our expertise.
    For these questions I would go to the lwIP community and/or look at examples there. I think the static web server is just one
    of the examples for lwIP and it was the one that the team chose to show how to hook up to the EMAC driver code.

    -Anthony