Hi Matthew,
Please explain what you want to do as I am still in the dark. You probably have a client as well? Who is sending what ? There is an echo server that is probably what you need. It excepts a connection, on receive it reads some data, send it back and closes the connection. Examples are in the contribution, also see here: http://lwip.wikia.com/wiki/Sample_lwIP_applications <http://lwip.wikia.com/wiki/Sample_lwIP_applications> <http://lwip.wikia.com/wiki/Sample_lwIP_applications>https://github.com/goertzenator/lwip/tree/master/contrib-1.4.0/apps <http://lwip.wikia.com/wiki/Sample_lwIP_applications> <http://lwip.wikia.com/wiki/Sample_lwIP_applications> BR,<http://lwip.wikia.com/wiki/Sample_lwIP_applications> Noam. <http://lwip.wikia.com/wiki/Sample_lwIP_applications> <http://lwip.wikia.com/wiki/Sample_lwIP_applications> [https://avatars1.githubusercontent.com/u/605072?v=3&s=400]<https://github.com/goertzenator/lwip/tree/master/contrib-1.4.0/apps> lwip/contrib-1.4.0/apps at master · goertzenator/lwip · GitHub<https://github.com/goertzenator/lwip/tree/master/contrib-1.4.0/apps> github.com An old version of lwip and an old version of nxp driver. I am mystified why so many people star and fork this... Sample lwIP applications - lwIP Wiki - Wikia<http://lwip.wikia.com/wiki/Sample_lwIP_applications> lwip.wikia.com You've built the lwIP stack on your target, gotten your network driver working and hurray! you can ping your device!! Great, congratulations to you. ________________________________ From: lwip-users <[email protected]> on behalf of emseahays <[email protected]> Sent: Saturday, March 18, 2017 8:17 PM To: [email protected] Subject: Re: [lwip-users] RAW LWIP TCP Client I basically scrapped the http server code, but rewrote similar functions. My goal is just to be a able to create a TCP connection and send one packet per connection and I want that to happen repeatedly, everytime I hit a btn on the board or perhaps in a timer interrupt. Where are the examples? What I’m doing now works to a degree. I’m wondering if there is a problem with the way I close a connection. I’ve been told I don’t need to wait for the server to close, but I run into the same situation when I close before the server does. When I run the LWIP_DEBUG it never says it goes into CLOSED state, I only see it say it goes into SYN-ACK state, ESTABLISHED, and CLOSED-WAIT states. I don’t use tcp_poll, which I’m wondering if that’s a way I could fix the problem. Did u look at the log I included in my last post? Best, -Matthew From: [hidden email]</user/SendEmail.jtp?type=node&node=29097&i=0> Sent: Saturday, March 18, 2017 11:09 AM To: [hidden email]</user/SendEmail.jtp?type=node&node=29097&i=1> Subject: Re: RAW LWIP TCP Client Hi Student, 1. Maybe if you will first describe what you want to do we may help you more. I did not understand? 2. I am a bit on the dark how you want to change the HTTP server without knowing the basics? >From the little you wrote I am not sure that the HTTP server is the code you >need to start with. The HTTP server is designed to accept a request, parse it, send some data back and CLOSE the connection. This is the basics but it does much more. Therefore it may not be the base code to start with you own project. If you need a server that gets a connection, stays open and be able to send back some data every time you click a button, you need to check other examples. BR, Noam. From: lwip-users <lwip-users-bounces+noam=[hidden email]</user/SendEmail.jtp?type=node&node=29096&i=0>> on behalf of emseahays <[hidden email]</user/SendEmail.jtp?type=node&node=29096&i=1>> Sent: Saturday, March 18, 2017 10:17 AM To: [hidden email]</user/SendEmail.jtp?type=node&node=29096&i=2> Subject: [lwip-users] RAW LWIP TCP Client I'm an EE Student working on a project involving modification of example code for Raw LWIP HTTP Server. I can repeatedly send the same packet when I reset the board because it sets up one TCP connection and sends one packet. However, since I've modified it to perform this same type of behavior on a btn press (rather than reset btn), it is able to send 4 packets, then I don't get the 2nd receive event (from the server closing the connection). I've been informed by a knowing person that I'm supposed to create a State machine to keep track of the pcb state. Is that true? I just want to send one packet per tcp connection. I wait until the server closes to call tcp_close() but it seems there might be a timing issue because I receive some acks late. Using the LWIP_DEBUG functionality with the TCP_Options enabled, I have the log for the 4 tcp connections from the 4 btn presses. I am including a link to the file showing the log. I have a very basic understanding of TCP and internet stuff, so I marked it up to try to find patterns. Can someone look at my log and tell me what they think? Do I need to use the poll() event? I also don't do anything in my errorHandler. Should I? Do I need a state machine to keep track of a single tcp_pcb? link to log is below(filename: TCP Debug Feature.mht). http://s000.tinyupload.com/?file_id=06484156254841729160 TinyUpload.com - best file hosting solution, with no limits, totaly free<http://s000.tinyupload.com/?file_id=06484156254841729160> s000.tinyupload.com TinyUpload.com - solution for tiny file hosting. No download limits, no upload limit. Totaly free. -- View this message in context: http://lwip.100.n7.nabble.com/RAW-LWIP-TCP-Client-tp29090.html lwip-users - RAW LWIP TCP Client<http://lwip.100.n7.nabble.com/RAW-LWIP-TCP-Client-tp29090.html> lwip.100.n7.nabble.com RAW LWIP TCP Client. I'm an EE Student working on a project involving modification of example code for Raw LWIP HTTP Server. I can repeatedly send the same packet when I reset the board because it sets... Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list [hidden email]</user/SendEmail.jtp?type=node&node=29096&i=3> https://lists.nongnu.org/mailman/listinfo/lwip-users lwip-users -- Mailing list for lwIP users - lists.nongnu.org<https://lists.nongnu.org/mailman/listinfo/lwip-users> lists.nongnu.org Welcome to the lwip-users mailing list. Use it to ask questions, share your experience and discuss new ideas. To see the collection of prior postings to the list ... _______________________________________________ lwip-users mailing list [hidden email]</user/SendEmail.jtp?type=node&node=29096&i=4> https://lists.nongnu.org/mailman/listinfo/lwip-users If you reply to this email, your message will be added to the discussion below: http://lwip.100.n7.nabble.com/RAW-LWIP-TCP-Client-tp29090p29096.html To unsubscribe from RAW LWIP TCP Client, click here. NAML<http://lwip.100.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> ________________________________ View this message in context: RE: RAW LWIP TCP Client<http://lwip.100.n7.nabble.com/RAW-LWIP-TCP-Client-tp29090p29097.html> Sent from the lwip-users mailing list archive<http://lwip.100.n7.nabble.com/lwip-users-f3.html> at Nabble.com.
_______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
