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.

TM4C1294xL simple GET/POST request

Hello,

Can someone hel i have instaled tivaware library,CCSstudio, and i have TM4C1294XL evaluation kit. I have installed on my raspberry pi node js server and i want to take temp measures from my TM4C1294XL and send it to the server. The problem is i cant recieve anyting, i used the eweather example and try it to change to get work with no succes. In this example there is eth_client.c there a lot of functions i tried them all, there is a connect function a send function...i changed the port ip addres but nothing seems to work. Can someone put me in the right direction how and what to use, to send a simple get request and get response.What should i intialize first which functions i must use.

Thanks!!

  • Hello Suad,

    Can you post the changes you have made?

    Thanks,

    Sai

  • Thank you for the reply

    First i intialize the ethernet contler and i am getting ip adress of the device, then i try to conecct with ethclientconnect(8000), 8000 is the port then i try to send the get request with ethclientsend("GET Request",size of the request). I also tried to change all the links where there is something like this //api.openweather.org .

    Here are some pictures

    while

  • Hello Suad,

    First step is to connect to the Server. Are you using Proxy settings? If not, please replace the parameter ("api.openweathermap.org") passed to the function "EthClientDNSResolve" with the correct server name in the function "EthClientTick" in the file "eth_client.c".

    As you have mentioned, replace the parameter passed to "EthClientTCPConnect" with the correct port number.

    Then run the program. If the connection to the server is successful, then the EnetEvents function (in enet_weather.c file) is called with ui32Event set to "ETH_EVENT_CONNECT". Place a break point in this function and check if it ever gets there. You could also use Wireshark (if you have the right set-up) to capture packets going out of TM4C device to see if the correct TCP packets have been sent out to the server to connect to a socket.

    Once the connection is successful, refer "WeatherForecast" function to see how to transmit data to the server.

    Thanks,
    Sai

  • Thank you for your reply, i will try it!