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.

example of the lwip socket connection

Other Parts Discussed in Thread: TMS570LS3137

Do you have the socket connection examples of the lwip in TMS570LS3137? I found that the udp functions in the example in the wiki is not so good to use. 

Another question is that if I use 3 machine to connection through Ethernet, two of them is the TMS570LS3137 board,the other is the PC,how should I set the configurations of the 2 TMS570 boards? I've tried that but it seems not that easy to make it work.

Regards,

yong

  • Hello Yong,

    I have forwarded your question to one of our experts.  Due to the year-end holidays and vacations, There may be a delay in the response.

  • Yong,

    There is currently no example for socket connection using lwip for Hercules. There is quite a lot of documentation available online though : http://lwip.wikia.com/wiki/Raw/UDP .

    Also, for configuring the boards, I'd suggest running a DHCP server on your PC to automatically assign IP addresses to the boards. ( Assuming they are physically connected through a router or a hub). You'll have to randomly assign a MAC address for each board as well.

    Hope that helps.

    Regards,

    Chaitanya

  • Thanks for your reply,I know the udp raw can relize the udp function, while the program do not have the function like the udp_recvfrom() in the socket, the program need to call the function which to judge whether the coming packets are udp packets. If they are, then call the callback function to handle them. It doesn't like the recvfrom() function in the socket, when you run the function, the program will recv the udp packet for once.

    As for the 2 boards and PC communications,If I assign two static IP addresses(for example 192.168.1.10 and 192.168.1.11) to the two boards,while the PC's IP address is also a static(192.168.1.20), is that correct that to relization the communitions?

    1.Randomly assign MAC addresses for the two boards and the physical address in the HCG, then initialize the two boards with that settings.

    2.creat a "pcb" on the two boards with the same PORT settings(use different IP address,different MAC address and PHY address, but same PORT), the communication between the board and PC can be relized? how do I tell the two udp packets apart for when reccive packets from the PC?

    I'm not so familiar with the lwip running procedures,so hope to get support.

    Regards,

    yong