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.

TM4C1294 LaunchPad Custom Server Connection

Other Parts Discussed in Thread: ASH

Hello,

I'm working with a TM4C1294 LaunchPad. I've been able to connect to the exosite server just fine using the demo program qs_iot. Now I want to begin sending data to my own server I have configured. I have found the portion of the demo code that is sending the data in exosite.c lns 488-493 (they are 5 straight calls of the function "sendLine()").

I feel like I have been able to construct my own POST command just fine. I plugged it into the code instead of the data they have but it is not reaching my server. The error message I read back in get_http_status() is not one sent out by my server so I know the POST message isn't even getting to my server.

I have done plenty of digging and am wondering if anyone knows what I am missing. Evidently changing just the contents of the POST command isn't adequate. I believe before we get to this point in the code there is a routine utilizing a DNS to figure out the IP address of the host server. I think the exosite code is initializing to m2.exosite.com, which would explain why my commands aren't going where I want them to.

Does anyone know how I can get it to send data to my server? Is there somewhere I can plug in my domain or IP address?

Thanks,

V

  • Alright,

    It looks like the code is pulling the exosite servers' IP from an internal table and it doesn't even utilize DNS. I'm going to keep searching and confirm this fact and will update once I've found something.

    V

  • Ok,

    So the connection with the server definitely needs to be initialized before the POST command gets issued. Seeing as the POST command contains an address I thought that was directing it to the host server.

    Studying the code sending the commands I can see it is sending the commands to a server we already initiated a connection with.

    I'll keep digging back in the code to see how the connection to a server gets initialized. I feel like it's something as simple as giving the address of the server you are looking for, using DNS to convert this to an IP address, and providing a socket number for the server and we should be ready to go. I'll see if I can confirm or deny this. Any other insight is appreciated.  

  • So I found where we are setting up the address of the host server. In the file exosite_hal_lwip.c ln 630 we are calling a function EthClientHostSet() this initializes the address of the host server. I believe after this function the host server address gets run through a DNS to return an IP address.

    I still haven't gotten my POST command working but I'm making progress.

    Hopefully someone else finds all this talking to myself useful.

  • Hi V ,

    I am trying to send data to my server , and facing the same problem as yours.

    Did you make any progress ??

    Thanks,

    Ash

  • Hi Ash,

    I haven't made a lot of progress. Hopefully some of the code sections I outlined above are helpful to you but I still haven't solved the puzzle.

    Please let me know if you make progress. There are a lot of variables in this. So far as I can tell you must:

    Run the address of your server through a DNS to resolve the IP address

    Open a socket to this IP address

    Send the POST (or GET) command

    It seems pretty simple to me. Some sort of outline or flowchart for the code would be very handy. Let me know if you find anything like this. Sorry I can't be of more help (yet).