Re: [lwip-users] TCP Dup ACKs and TCP Window full

2018-04-06 Thread goldsi...@gmx.de

On 06.04.2018 15:30, Adrian Figueroa wrote:
I am writing a bootloader application that receives data over ethernet 
for flashing the processor it runs on. This is implemented on an 
STM32F746 running the ChibiOS-RTOS and the HAL drivers that come with 
it. Consequently, the netconn-api is used. I run Lwip 1.4.1, because 
Lwip 2.X was not yet ported to ChibiOS and I cannot to do it myself.


Lwip is used to implement a simple TCP server. A python TCP client 
connects to it and sends a chunk of data (around 200k).


I moved Lwip pools and heap to external SDRAM, so I can store large 
amounts of packets without discarding them.


First, the TCP server thread waits for an incoming connection with 
“netconn_accept()”. Find this in “server.c”, attached to this mail. 
There is also a “helper” thread that cleans things up after a 
connection was closed (dynamic threads).


After “netconn_accept()”, the netconn is handed over to a thread that 
receives data. Find the receiver functionality in “receiver.c”.


The receiver constantly calls netconn_recv(), until the connection is 
closed. A netbuf is filled each time and chained to the previous 
netbuf. I also have an evaluation thread that works on the received 
netbufs, but it does not do anything at the moment. In the end, I have 
a long netbuf chain in memory, ready for evaluation.


The problem is that I lose some of the packets in the process. Find 
the dump from Wireshark attached. My lwipopts.h is also included in 
the mail. I chose very generous amounts of storage for all pools, 
because I have 32 MB of SDRAM available. I get no errors at all in 
lwip_stats.


Do you have any suggestions?



Are you aware that you seem to be using TCP segmentation offloading on 
your windows network card? The wireshark trace shows TCP segments with 
5840 bytes although MSS is advertised as 1460 by lwIP. If you want (us) 
to debug network problems using wireshark, please ensure you change the 
driver settings to make wireshark let you see what's on the cable!


Simon
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Guide/example on moving from IPv4 to IPv6?

2018-04-06 Thread goldsi...@gmx.de

On 06.04.2018 11:56, thomasfogh wrote:

I'm currently running an IPv4-only socket application with DHCP on my
STM32F407 board and need to switch to IPv6 only with SLAAC.
I can't find any example code for an IPv6-only socket application.

Can anyone point me in the right direction on how to migrate from IPv4 to
IPv6?


If you're relly using sockets as you said, this is not an lwIP specific 
question. Use google instead of this list.


If you want to ask about lwIP specifics instead, please tell us what you 
want to know or study the win32 or unix port in contrib (where IPv6-only 
works).


Simon

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] Initialization problem upgrading from 1.4.1 to 2.0.3

2018-04-06 Thread goldsi...@gmx.de

On 05.04.2018 20:29, Keith Rubow wrote:

I am trying to use lwip on ARM cortex M4. My development software is
Atollic Truestudio on Win10. So far I have gotten lwip 1.4.1 to work
using raw api and a simple multitasking OS.

Now I am trying to change over to lwip 2.0.3, and am having trouble with
initialization. My initialization code is as follows:
#include "lwipopts.h"
#include "lwip/tcpip.h"
#include "lwip/tcp.h"
struct netif wiznetif;    // network interface struct for wiznet
...
static void initialize_lwip(void) {
      struct ip_addr ipaddr, netmask, gateway;


Since 1.4.0, "struct ip_addr" is an "internal" type, and applications 
should use "ip_addr_t", which is a typedef and keeps us more free to 
change the types. We do have struct ip_addr (Dirk suggested to add the 
appropriate include), but I just saw it's only defined for dual-stack mode.


You should instead convert your software from "legacy" (i.e. pre 1.4.0) 
coding style to just use ip_addr_t.


Simon

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

[lwip-users] Tunnel solution for HTTP server expose to Internet

2018-04-06 Thread Giuseppe Modugno
My embedded device, running lwip httpd server, is under a router with a 
dynamic public IP address and a local private network 192.168.1.x. I 
know how to configure DDNS and NAT on the router to reach the server 
from outside, but these are tedious and tricky steps for most users.


So I'm searching more "plug" solutions that would allow the end 
user to connect to my embedded device. I found yaler, pakekite and some 
others. They should work, but all solutions need the installation of a 
piece of software in the embedded HTTP server, in my case lwip-based.


Do you have any experiences on implementing this protocols on lwip to 
expose httpd to Internet? Could you suggest any other better solutions?




___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


[lwip-users] Guide/example on moving from IPv4 to IPv6?

2018-04-06 Thread thomasfogh
Hi,

I'm currently running an IPv4-only socket application with DHCP on my
STM32F407 board and need to switch to IPv6 only with SLAAC.
I can't find any example code for an IPv6-only socket application.

Can anyone point me in the right direction on how to migrate from IPv4 to
IPv6?


FYI: The current application is running FreeRTOS and uses mbedTLS to post
data with HTTPS and also has a MQTT client running.

/Thomas Fogh



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


Re: [lwip-users] help with mDNS sending a DNS_RRTYPE_SRV query

2018-04-06 Thread Simon Goldschmidt
antonio wrote:
> The problem is the function that requires recursion (*mdns_readname*). The
> error is related to */Stack Overflow/.. *

So this is not related to threads? Then please describe the actual problem you 
see.
I'm getting lost in all the other things you write...

Simon

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users