Re: [lwip-users] Is tcp_err()-callback optional?

2015-10-12 Thread Karl Karpfen
OK, thanks! 2015-10-12 13:17 GMT+02:00 Simon Goldschmidt : > Karl Karpfen wrote: > >indepenedent from the fact if it makes sense or if it is bad program > style: > > is it mandatory to announce a error-callback via tcp_err() or will the > whole > > thing also work smoo

[lwip-users] Is tcp_err()-callback optional?

2015-10-12 Thread Karl Karpfen
Hi, indepenedent from the fact if it makes sense or if it is bad program style: is it mandatory to announce a error-callback via tcp_err() or will the whole thing also work smoothly when there is no error-callback function available? Thanks! ___ lwip-us

Re: [lwip-users] Call tcp_close() out of tcp_recv()-context?

2015-09-07 Thread Karl Karpfen
2015-09-07 14:17 GMT+02:00 Sergio R. Caprile : > It depends on what you mean by "context". > > The structure is as follows (all non-OS and with RAW API): With tcp_recv() I set up a receive-callback function my_recv(). my_recv() is triggered by lwIP whenever some data are received. Some of these d

[lwip-users] Call tcp_close() out of tcp_recv()-context?

2015-09-07 Thread Karl Karpfen
Hi, I'm using raw-API within my application and have defined a receive-callback by using tcp_recv(). Now it may happen a close-command (from my own protocol running on top of TCP/IP) is received within this receive-callback. My question: is it allowed to call tcp_close() out of the context of thi

Re: [lwip-users] Patch to update from 1.4.0 to 1.4.x?

2015-03-18 Thread Karl Karpfen
ources. I moved > our v1.3.2 code to the latest from the main branch in git. > On Mar 18, 2015 3:57 AM, "Simon Goldschmidt" wrote: > >> >> Karl Karpfen wrote: >> >> So my question: is there a patch available somewhere that can be applied >> to

[lwip-users] Patch to update from 1.4.0 to 1.4.x?

2015-03-17 Thread Karl Karpfen
Hi, I'm running my controller with lwIP 1.4.0 and tried recently to update it to 1.4.1 but with no success. Simply copying the 1.4.1 sources lead to a non-working network stack. So I have to assume the vendor of the board support package has changed some important things directly within lwIP. So

Re: [lwip-users] SNTP client does not work

2015-02-08 Thread Karl Karpfen
> On Fri, Feb 06, 2015 at 08:57:06AM +0100, Karl Karpfen wrote: > > 2015-02-03 15:24 GMT+01:00 Simon Goldschmidt : > > > > > Karl Karpfen wrote: > > > > > > There's nothing strange here: the contents of ip_addr_t needs to be in > > > network b

Re: [lwip-users] SNTP client does not work

2015-02-05 Thread Karl Karpfen
2015-02-03 15:24 GMT+01:00 Simon Goldschmidt : > Karl Karpfen wrote: > > There's nothing strange here: the contents of ip_addr_t needs to be in > network byte order and the sntp client calls a function that returns the > correct byte order. > > OK, to clarify that: to

Re: [lwip-users] SNTP client does not work

2015-02-03 Thread Karl Karpfen
contacted. Somewhat strange but works this way. Karl 2015-01-29 18:04 GMT+01:00 Sylvain Rochet : > Hi Karl, > > On Thu, Jan 29, 2015 at 05:57:50PM +0100, Karl Karpfen wrote: > > 2015-01-29 15:56 GMT+01:00 Simon Goldschmidt : > > > > > Karl Karpfen wrote: > >

Re: [lwip-users] SNTP client does not work

2015-01-29 Thread Karl Karpfen
2015-01-29 15:56 GMT+01:00 Simon Goldschmidt : > Karl Karpfen wrote: > > No but there I have to specify the IP of the NTP-server to communcate > with > > My assumption: when I have to ntohl() the netif-IP, I have to do that for > > the NTP-IP and the port-number too

Re: [lwip-users] SNTP client does not work

2015-01-29 Thread Karl Karpfen
2015-01-29 14:35 GMT+01:00 Simon Goldschmidt : > Karl Karpfen wrote: > > At least for the IP it definitely is necessary. When I hand over a > > non-ntohl()'ed IP-address to LWIP_IF.ipAddr (used with lwIPInit()), > > my network interface comes up with wrong IP. > >

Re: [lwip-users] SNTP client does not work

2015-01-29 Thread Karl Karpfen
2015-01-29 7:46 GMT+01:00 Simon Goldschmidt : > Karl Karpfen wrote: > > - I have rewritten the example a bit to get rid of the sys_xxx() > functions which are not available for me > > I'm not sure I understand. You don't have sys_timeout/sys_untimeout? > Tha

[lwip-users] SNTP client does not work

2015-01-28 Thread Karl Karpfen
Hi, I'm trying to implement an SNTP client based on the example that comes with lwIP 1.4.x but with no success. That's what I have done: - I have rewritten the example a bit to get rid of the sys_xxx() functions which are not available for me - I do a ntohl() on all IP's that are retruned by ipa

Re: [lwip-users] Handling in case of disabled Nagle

2014-12-09 Thread Karl Karpfen
2014-12-08 19:47 GMT+01:00 goldsi...@gmx.de : > As it's always better to know than to guess, why don't you check wih > wireshark? Simply because Wireshark does not work - it crashes on capturing. This is for sure a Windows-problem but it keeps me away from analysing this. But connection problem

[lwip-users] Handling in case of disabled Nagle

2014-12-08 Thread Karl Karpfen
Hi, I found a strange problem related to Nagle-algorithm but possibly caused by host operating system. My application is as follows: - host sends payload data to my lwIP-driven device in packets of 1460 bytes - host sends state-requests to this device in packets of 3 bytes - device sends state-re

Re: [lwip-users] poll-function not called

2014-09-24 Thread Karl Karpfen
Just to complete this discussion: TI's support for their products is really very, very poor. There is simply no answer to my question why they have disabled it although the poll-callbacks are still there (not the first time that there is no response to users requests also in case of definitive bugs

Re: [lwip-users] Context of poll and recv?

2014-09-22 Thread Karl Karpfen
Sergio, reception is not the problem but transmission. Here I learned I can't enqueue data fgrom main loop directly. Meanwhile I'm setting a similar flag and collect all my data from within transmission IRQ context - which works fine. Karl 2014-09-17 15:03 GMT+02:00 Sergio R. Caprile : > Hi Ka

Re: [lwip-users] poll-function not called

2014-09-22 Thread Karl Karpfen
OK, thanks, this leaded me into the correct direction: Texas Instrumetns has implemented full poll-functionality but they have set both NO_SYS and NO_SYS_NO_TIMERS to 1 which disables the timers completely. One of both seems to be wrong/superfluid for me... 2014-09-22 9:31 GMT+02:00 mobin.seven :

[lwip-users] poll-function not called

2014-09-21 Thread Karl Karpfen
Hi, I'm using lwIP 1.4.0 implementation that comes with Starterware for AM3358 from Texas Instruments. Thus I do not know that much about its exact implementation for used hardware. Now I found the poll-function is never called in TI's implementation. To track down the problem: where in lwIP is t

Re: [lwip-users] Context of poll and recv?

2014-09-17 Thread Karl Karpfen
Great, thanks! :-) :-) :-) 2014-09-17 12:16 GMT+02:00 Simon Goldschmidt : > Karl Karpfen wrote: > > [..] > > My question: are both running in same IRQ-context or are they triggered > > by different ones so that filling the send buffer this way would lead to > &g

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

[lwip-users] Context of poll and recv?

2014-09-17 Thread Karl Karpfen
Hi, this is a follow-up to "How to check send state?" but I start a new discussion since it is a new question: I'm trying to enqueue some data into lwIP's send queue that are generated from within my applications main-loop (which is not allowed). Now my solution is to just set a flag and then fet

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

2014-09-17 Thread Karl Karpfen
2014-09-17 9:08 GMT+02:00 Simon Goldschmidt : > > 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 adding a se

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

2014-09-16 Thread Karl Karpfen
h=arrayonline@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

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 : > Karl Karpfen wrote: > > [..] > > My problem

[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 a