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.

Board resets when trying to get the data from local server

Hi,

I am trying enet_weather example for TM4C1294XL board.

The code works fine when I am trying to send the data to openweathermap.org

For a change I created a local server and hosted some services and provided static local ip to server (10.10.1.210).

I have modified the code to send JSON request to local server and expecting some JSON response from server. Now I am sending data on local server I can see the JSON string being sent to fetch the data (on serial port debug mode). On server also the request is coming and it is sending a JSON response, but on the board I am not getting this response and also not getting HTTP 200 OK from server.

Also at the same time board is restarting and Ethernet port is disabled and not able to assign the IP address to the board anymore until and unless hardware reset is not done. After hardware reset the same sequence is happening.

Can anybody explain me why this problem is occurring? 

Thanks,

Bhavesh

  • Hello Bhavesh

    There is a System Control register called RESC (Reset Cause). Can you check what the value in the register is?

    Regards
    Amit
  • Hi Amit,

    I was able to find the issue and stopped the rebooting as of now. I Was trying to read the buffer values beyond its limit and so it was creating fault.

    But there is one thing I am still observing:
    One service is hosted on the server which sends unix time stamp along with Http headers as Below:

    ---------------

    Response
    Server: Apache-Coyote/1.1
    headers:
    Set-Cookie: JSESSIONID=8D30567AE5F493A85C68CAB97052D2A6; Path=/app/; HttpOnly
    Content-Length: 14
    Date: Thu, 08 Jan 2015 08:43:12 GMT

    ---------------

    This content size is of around 182 bytes in buffer.

    When I am hitting public server to get the time using JSON GET call it is working fine and I can see total buffer size is 196 bytes (182 + 14 bytes for unix timestamp).

    We tried to mimic the same on local server and when I hit the server buffer size is only 182 bytes and I do not see any unix time stamp related data in buffer. We checked with server guys and they are saying its working as when I try to hit the URL in browser it is showing unix time stamp.

    Any idea why this happens or how to debug this issue?

    Thanks,

    Bhavesh

  • Hello Bhavesh,

    Did you connect something like a snooper or WireShark to monitor the packet being received? What was the source of the original issue?

    Regards
    Amit
  • Hi Amit,

    I tried to add the interface using Wireshark but it is not able to connect to board. Can you guide me or send me link of how to know packet being received at board from my local computer?

    The original issue was in fault_isr there was a code to reboot board. When we tried to read the unix time stamp from local server it was not there but still we were reading the buffer for those bytes and it was generating error and board was re booting.

    Using CCSV6 on Windows 8 64 bit.


    Thanks,
    Bhavesh

  • Hi Amit,

    Is there a way to get unix time stamp for UTC on TM4C1294XL board?
    I tried to see different C code examples but none found which provides answer on this.

    - Bhavesh
  • Hello Bhavesh,

    The wireshark has to be on the same n/w port as the TM4C1294XL. You would need to snoop the TX lines. Secondly, since the Public Server approach to get UTC works, there has to be something with the Local Server. That is why it is important to see the packets.

    Regards
    Amit
  • Hi Amit,

    can you please guide me how to snoop the lines?

    I tried to connect with board from wireshark but the board is not allowing the connection even though I have assigned static IP to the board.

    Thanks,

    Bhavesh

  • Hello Bhavesh,

    Now that could be a board limitation (as my board has the snoop resistor where I can connect my laptop using RJ45). However in your system can you instead try making your PC as a local server and connect the board to your PC which is running wireshark?

    Regards
    Amit
  • Hi Amit,

    The issue is resolved. I am able to get the data in GET request from the server now.

    The issue was, in GET request data comes in second callback like happens in Asynchronous service call. So JSON parser function is called twice and in second call actual data comes.

    Closing the question chain as issue is resolved.

    Thanks,

    Bhavesh