lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] RAW LWIP TCP Client


From: Noam Weissman
Subject: Re: [lwip-users] RAW LWIP TCP Client
Date: Sat, 18 Mar 2017 18:42:45 +0000

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


https://github.com/goertzenator/lwip/tree/master/contrib-1.4.0/apps



BR,

Noam.

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...

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 <lwip-users-bounces+address@hidden> on behalf of emseahays <address@hidden>
Sent: Saturday, March 18, 2017 8:17 PM
To: address@hidden
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]
Sent: Saturday, March 18, 2017 11:09 AM
To: [hidden email]
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]> on behalf of emseahays <[hidden email]>
Sent: Saturday, March 18, 2017 10:17 AM
To: [hidden email]
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

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.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]
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]
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

 



View this message in context: RE: RAW LWIP TCP Client
Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]