Re: [lwip-users] How to check send state?

2014-09-17 Thread Simon Goldschmidt
Karl Karpfen wrote: OK, so let me ask this in an different way:   Currently I do have data to be sent available in main loop only. How can I enqueue these data into the lwIP-ISR-context correctly so that it can be transmitted without problems? To do that you'd either need to lock interrupts

Re: [lwip-users] How to check send state?

2014-09-17 Thread Karl Karpfen
2014-09-17 9:08 GMT+02:00 Simon Goldschmidt goldsi...@gmx.de: Currently I'm doing it as described at http://lwip.wikia.com/wiki/Raw/TCPin section Sending TCP data which seems to be wrong for my case... I only get an empty page with this link: This page needs content. You can help by

Re: [lwip-users] How to check send state?

2014-09-17 Thread Simon Goldschmidt
Karl Karpfen wrote: Currently I'm doing it as described at http://lwip.wikia.com/wiki/Raw/TCPin section Sending TCP data which seems to be wrong for my case... There's nothing wrong with what's described at http://lwip.wikia.com/wiki/Raw/TCP. What's wrong is that your lwIP calls into lwIP

Re: [lwip-users] How to check send state?

2014-09-17 Thread Karl Karpfen
OK, got it - thanks :-) 2014-09-17 11:10 GMT+02:00 Simon Goldschmidt goldsi...@gmx.de: Karl Karpfen wrote: Currently I'm doing it as described at http://lwip.wikia.com/wiki/Raw/TCPin section Sending TCP data which seems to be wrong for my case... There's nothing wrong with what's

Re: [lwip-users] How to check send state?

2014-09-17 Thread Sergio R. Caprile
There's nothing wrong with what's described at http://lwip.wikia.com/wiki/Raw/TCP. What's wrong is that your lwIP calls into lwIP from interrupt context and you call it from your main loop. This is not allowed, that's all. Thank you Simon Wiki 1 users 0

Re: [lwip-users] How to check send state?

2014-09-16 Thread Simon Goldschmidt
Karl Karpfen wrote: [..] My problem here: sentLength is manipulated out of interrupt context while checking it for completion is done out of main loop. That's a problem indeed. Seems like you are violating lwIP's threading requirements (search the list or the wiki, there are numerous post

Re: [lwip-users] How to check send state?

2014-09-16 Thread Karl Karpfen
I don't use any threads but plain, bare-metal programming. Here lwIP is running in context of the Ethernet-PHY-interrupt(s) while some data are pushed to lwIP from the main-loop. 2014-09-16 9:04 GMT+02:00 Simon Goldschmidt goldsi...@gmx.de: Karl Karpfen wrote: [..] My problem here:

Re: [lwip-users] How to check send state?

2014-09-16 Thread Simon Goldschmidt
Karl Karpfen wrote: I don't use any threads but plain, bare-metal programming. Here lwIP is running in context of the Ethernet-PHY-interrupt(s) while some data are pushed to lwIP from the main-loop. I could repeat myself, but I don't (see my last mail). In the end, you are having two threads

Re: [lwip-users] How to check send state?

2014-09-16 Thread Bill Auerbach
-bounces+bauerbach=arrayonline@nongnu.org] On Behalf Of Karl Karpfen Sent: Monday, September 15, 2014 3:00 PM To: lwip-users@nongnu.org Subject: [lwip-users] How to check send state? Hi, within my lwIP application (TCP with permanent connection) I'm sending some data out of main-loop

Re: [lwip-users] How to check send state?

2014-09-16 Thread Simon Goldschmidt
An:Mailing list for lwIP users lwip-users@nongnu.org Betreff:Re: [lwip-users] How to check send state? Hi, Did you declare sentLength as volatile? You might also need to protect it if its not loaded/stored in a single processor instruction (not likely to be the case with a 32-bit architecture

Re: [lwip-users] How to check send state?

2014-09-16 Thread Bill Auerbach
Auerbach bauerb...@arrayonline.com An: 'Mailing list for lwIP users' lwip-users@nongnu.org Betreff: Re: [lwip-users] How to check send state? Hi, Did you declare sentLength as volatile? You might also need to protect it if it’s not loaded/stored in a single processor instruction (not likely

Re: [lwip-users] How to check send state?

2014-09-16 Thread Karl Karpfen
@nongnu.org] *On Behalf Of *Simon Goldschmidt *Sent:* Tuesday, September 16, 2014 9:51 AM *To:* Mailing list for lwIP users *Subject:* Re: [lwip-users] How to check send state? Bill, I appreciate you trying to teach programming basics, but I think this won't get Karl Karpfen further

[lwip-users] How to check send state?

2014-09-15 Thread Karl Karpfen
Hi, within my lwIP application (TCP with permanent connection) I'm sending some data out of main-loop (no interrupt context) and start submission by calling tcp_output(currentPcb); Sending of data is done via tcp_write(). Within the send function itself amount of data already sent is stored in