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.

TCP IP Stack how to transfer a packet of data to a remote servers port

can somone please tell me how to include TCP/IP in a Tiva project? 

I want to talk from server computer to Tiva and Tiva to send some packets to server. 

Is there a special stack to get this done? or does TivaWare include this? 

given that I found the stack/api how do i learn it an a newbie? are there any tutorials? I know abt TCP IP protocol but have never used this kind of implementation in a microcontroller. If you know a way to learn this the correct way, please advice. 

p.s. - I do not want to use beaglebone/ another hardware IC/ TI RTOS. Im interested in knowing other options

View Amalinda J. Gamage's profile on LinkedIn

  • We ship a couple of examples that use either the lwIP (light-weight IP) or uIP (micro-IP) stacks and you'll find code for these in TivaWare under examples/boards/dk-tm4c129x. Look for enet_lwip, enet_uip and enet_io.

    As far as getting started on this is concerned, your best bet other than just trying to figure things out from the source code, would be online sources, You can find some lwIP documentation here. Documentation for uIP is harder to find but this white paper seems helpful.

    If you are acting as a client rather than a server (all the examples I mention above are web servers), you can look at the qs-weather application which sends requests to a remote server to retrieve weather information using lwIP. One very important thing to remember (and which qs-weather currently doesn't do correctly! Bug raised) when making client requests and using lwIP is that lwIP APIs can only be called from the Ethernet interrupt context so you can't just put lwIP API calls into your main function and expect things to work. They will probably work for a while then you'll hit a race condition that corrupts a control block and things will fall over. Beware!

  • Dear Dave, thank you for telling me about the bug. its going to be very useful. otherwise I could have wasted a lot of time trying to figure :-)

    Has TI produced any Videos teaching how to integrate this code to Tiva or MSP430 microcontrollers? 

    Can this code me integrated to an MSP430 with an external ethernet controler?  As I read on the its website, its not specially designed only for Tiva.  So will this source code support MSP430 with an external ethernet controler?

    apologize for the question if they seem obvious I am student.

  • The bug in qs-weather is easy to fix. The note about always calling lwIP from a single context isn't a bug in the library, it's just a requirement of lwIP.

    I'm not aware of any training videos that TI has produced for lwIP and don't know how easy it would be to use the code on an MSP430. I don't know of any MSP430 containing Ethernet or whether it is possible to interface one to an external Ethernet MAC. I guess some of the TI low power wireless parts supporting WiFi may be usable but you would likely be better asking this over on the MSP430 forum.