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.

Simplest way to create a TCP server?

Other Parts Discussed in Thread: EK-TM4C1294XL

Hi,


I am using the Tiva C Series Connected Launchpad EK-TM4C1294XL and now I want to connect it to my home network. The idea is that the launchpad gets an IP and opens a port where it begins to listen. Then I want to connect to that port from my laptop with netcat for example and sending data in both directions.

What is the best and shortest way to do this? What's about this third party library I found in the Tiva Ware Library:  tilib/third_party/uip-1.0/ ? May do you recommend it?

Thank you!

  • Hello user1597705,

    Both uIP and LwIP would be good for a TCP server kind of application. In fact they do support the TCP stack.

    Regards

    Amit

  • Hi Amit

    i'm using  tiva c series development board. when i run uIP from examples, that is running good, but when i copy this whole project into new project than i get compile error

    1. #20 identifier "tEMACWakeUpFrameFolter" is undefined

    2. #20 identifier "tEMACWakeUpFrameFolter" is undefined

    3.  #66 expected a ";"

    4. expected a type specifier

    Thamks

    Er. Sanjay Kumar

  • I created a new project within CCS named Ethernet_Test. Then I copied the files hello-world.c and hello-world.h, renamed them to main.c and main.h and linked the directories 'lib', 'uip' and 'unix' to the workspace of the project. Then I added 'uip' and 'unix' to the list of include directories in the project properties.

    Then there are two problems left. There is no 'inttypes.h' and 'sys/time.h' available in the Tiva Ware Library. Because of that I can not compile the Hello World example from uip-1.0. What should I do with them?

    Edit:

    Sorry, it seems there are much more files which are missing and should be located in the 'sys'-directory. My linux installation (Ubuntu 14.04) has the files in '/usr/include/x86_64-linux-gnu/sys/', but I can not use them in the ARM project.

  • user1597705 said:
    Then there are two problems left. There is no 'inttypes.h' and 'sys/time.h' available in the Tiva Ware Library. Because of that I can not compile the Hello World example from uip-1.0. What should I do with them?

     Please specify at almost:

     Your platform details

     Your CCS version

    Tivaware version

    if nothing special compress all files of project and post.

     Some details of what your intention to exchange on tcp packet but I assume this is far from compilation and first test.

    user1597705 said:
    I created a new project within CCS named Ethernet_Test.

     If you are not CCS well experienced, creating a working project from scratch is forever difficult so I forever copy or import a working project then I customize it to my new need.

     Also this way some setting are forever hard to setup till you know in deep tool.

  • Your platform details

    I am using Ubuntu 14.04 LTS for programming the Tiva™ C Series Connected Launchpad EK-TM4C1294XL.

    Your CCS version


    I am using the Code Composer Studio 6.0.1.201406261800.

    Tivaware version


    I am using the Tiva Ware Library from here: https://github.com/yuvadm/tiva-c

    if nothing special compress all files of project and post.


    See this Dropbox link: https://dl.dropboxusercontent.com/u/28394458/Bastelkeller/Ethernet_Test.zip

    If you are not CCS well experienced, creating a working project from scratch is forever difficult so I forever copy or import a working project then I customize it to my new need.


    Yes, I am not very experienced with CCS, but I managed to create a new project from scratch which can send data through USART to my Laptop and can send data though SPI to an AD5754 to output voltages betwenn -10 and 10 volts.

    This is the only experience I have with CCS.

  • user1597705 said:

    Yes, I am not very experienced with CCS, but I managed to create a new project from scratch which can send data through USART to my Laptop and can send data though SPI to an AD5754 to output voltages betwenn -10 and 10 volts.

    This is the only experience I have with CCS.

    Hi, I got longest experience but I still encounter some troubles I am learning how to solve, I wish to have better documentation like a good book to read over topic of but I never found.

     About your project, linked reference is wrong on my system but can be it is good on your, I see all include files are on project root but they are linked on a relative position referenced outside this directory on old installation path, so you need trim to where they are:

     Open this setting on project properties and see if link is broken or not.

     On my Linux machine (platform Linux Mint 17) linked resources where not copyed from original project into .project file, but you can move everywhere installation and files. On your project are ok but reference appear to me as broken, after trim still some files still got unresolved, add relative path to lib ex:

    #include "uipopt.h" got unresolved, changing to #include "uip/uipopt.h" got resolved.

      another thing to check is stack depth, it is set twice and last one taking effect is the one in the project setting, I lost a week trying to figure why program never worked and crashed still if measured stack depth was smaller than max before discovering from console that was at mere 512 byte default not 8K.

     Why not try import prebuilt example from TIVAWare? The better program I found using Ethernet are both TIRTOS and FreeRToS examples. Also api are more close to unix(linux) standard.