[lwip-users] Ping function problem

2016-09-26 Thread Soldavin, Keith A.
Hello all,
I am trying to implement the ping software found in Contrib but I am having 
issues. I have successfully gotten the code to compile and while stepping 
through line by line it seems like everything is working correctly. The problem 
is that the computer I am trying to ping never responds. When I look at 
Wireshark, the ping message is received by the computer but the checksum is 
0x so the computer seems to rejects it. When I stepped through the code the 
checksum is being calculated correctly and put into the message. Somehow it is 
being lost. Any ideas where to look for the issue?

I am running the latest LWIP and Contrib from the GIT server. I have LWIP set 
up correctly as I use it for sending and receiving data over UDP with no issues.

Also, is there any way to implement the ping program using  netconn instead of 
sockets?

Thank you very much.
Keith

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

Re: [lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initialization)

2016-09-26 Thread Dirk Ziegelmeier
Sorry, I did not answer clearly in my last mail.
​"No need to override the output functions" means you do not have to set
them in your application startup.
But you have to set them in your netif_init() function.
Use ethip6_output() for output_ip6.​
___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Re: [lwip-users] Could sys_restart_timeouts be provided also for !NO_SYS targets ?

2016-09-26 Thread Ari Suutari

> On 26 Sep 2016, at 21:34 , Ari Suutari  wrote:
> 
> I’ll enable sys_restart_timeouts and see if it works also, I think it should
> because the effect should be same as my workaround.

I quickly tested sys_restart_timeouts for my case, it seems to work
ok. Without it, dhcp timers are not running properly after sleep and
system is not able to get dhcp lease. When using sys_restart_timeouts
just after system has waken up, dhcp client works perfectly.

   Ari S.

> 
> 
>> On 26 Sep 2016, at 21:20 , Sylvain Rochet > > wrote:
>> 
>> Hi Ari,
>> 
>> On Mon, Sep 26, 2016 at 02:13:10PM +0300, Ari Suutari wrote:
>>> Hi,
>>> 
>>> This related to http://savannah.nongnu.org/bugs/index.php?48568 
>>> 
>>> 
>>> I have a system which sleeps long times but sys_now() progresses during
>>> sleep.
>>> Currently this still seems to cause some surprises with timers.
>>> 
>>> While there seems to be discussion about moving to absolute time
>>> in timers instead of current implementation, could it be possible that
>>> timeouts.c provided
>>> sys_restart_timeouts() function also for targets that are using RTOS in the
>>> meantime ?
>> 
>> The problem here is that sys_timeouts_mbox_fetch() is still running when 
>> you go to sleep, therefore calling sys_restart_timeouts() would do 
>> nothing, this is why this function is currently not available in !NO_SYS 
>> mode.
>> 
>> Anyway, could you try enabling sys_restart_timeouts() for !NO_SYS and 
>> then calling it with tcpip_callback() to see what happen ? Theoretically 
>> it should work but I'm not confident enough to certainly state there is 
>> no corner case doing so.
>> 
>> (And yes, absolute timers does not have this problem ;)
>> 
>> Sylvain
>> ___
>> lwip-users mailing list
>> lwip-users@nongnu.org 
>> https://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> ___
> lwip-users mailing list
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users

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

Re: [lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initialization)

2016-09-26 Thread Dirk Ziegelmeier
​Hello Joseph,​


I've got a few questions about IPv6 support.
>
> First, I've decided to try to use 2.0.0 RC2 for IPv6 support (is this
> wise?).
>
​Definitely: YES​


> Second, I've got a few questions about how to properly initialize an
> interface for IPv6. I have experience working with lwip 1.4.1 in IPv4 mode
> with no problem. However, I've spent a while trying to piece together clues
> for IPv6 but I can't seem to find much in the way of documentation or
> examples. Maybe you guys can send me in the right direction.
>
> Here's my initialization code (modeled loosely after how I'd do things in
> IPv4 mode).
>

​Look at the example init code:
http://git.savannah.gnu.org/cgit/lwip/lwip-contrib.git/tree/ports/unix/unixsim/simhost.c
Line 547

You should have a link-local address at index 0
(​netif_create_ip6_linklocal_address()).

No need to override the output functions.


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

Re: [lwip-users] blocked udp

2016-09-26 Thread Noam Weissman
Hi,

What API are you using?... RAW, Netconn or Socket ?

When you say you send random data, how do you send it. I mean do you send it 
from
Within the LwIP context or via the route you try to send the video?

BR,
Noam.

From: lwip-users [mailto:lwip-users-bounces+noam=silrd@nongnu.org] On 
Behalf Of garibaldi pineda garcia
Sent: Monday, September 26, 2016 4:27 PM
To: lwip-users@nongnu.org
Subject: [lwip-users] blocked udp

Hello all,
I'm building a system which encodes video in a Zedboard FPGA and sends it out 
through the ethernet port. I have tested sending random data out and it works, 
but when I try to use the data from the video source I manage to set the ARM 
core/network in a locked state. I've also tested the system without sending any 
data through etherenet and it works fine.
I've increased memory and pool sizes; I also decreased the Time-To-Live for all 
protocols and tried using a global pbuf or a dynamic local pbuf.
These setting seem to get the system working a bit longer, but I still get 
locked whenever the video encoding requires to send more than random data.
Does anyone have suggestions on what I could do?

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

Re: [lwip-users] Could sys_restart_timeouts be provided also for !NO_SYS targets ?

2016-09-26 Thread Ari Suutari
Hi,

In my case sys_timeouts_mbox_fetch is not running when 
system sleeps. I have a function tcpipSuspend() which waits for
RTOS semaphore for tcp/ip stack to wake up. This function is
called with tcpip_callback_with_block, which makes the lwip stack
to “sleep” inside tcpip thread.

My project is  open source, see
https://github.com/AriZuu/emw-sensor/blob/master/main.c#L126 

and
https://github.com/AriZuu/emw-sensor/blob/master/main.c#L250 


Code has currently a kludgery workaround, it forcefully resets RTOS
‘jiffies’ after sleep, which is used by sys_now(), system works very well
with this.

I’ll enable sys_restart_timeouts and see if it works also, I think it should
because the effect should be same as my workaround.

Ari S.


> On 26 Sep 2016, at 21:20 , Sylvain Rochet  wrote:
> 
> Hi Ari,
> 
> On Mon, Sep 26, 2016 at 02:13:10PM +0300, Ari Suutari wrote:
>> Hi,
>> 
>> This related to http://savannah.nongnu.org/bugs/index.php?48568
>> 
>> I have a system which sleeps long times but sys_now() progresses during
>> sleep.
>> Currently this still seems to cause some surprises with timers.
>> 
>> While there seems to be discussion about moving to absolute time
>> in timers instead of current implementation, could it be possible that
>> timeouts.c provided
>> sys_restart_timeouts() function also for targets that are using RTOS in the
>> meantime ?
> 
> The problem here is that sys_timeouts_mbox_fetch() is still running when 
> you go to sleep, therefore calling sys_restart_timeouts() would do 
> nothing, this is why this function is currently not available in !NO_SYS 
> mode.
> 
> Anyway, could you try enabling sys_restart_timeouts() for !NO_SYS and 
> then calling it with tcpip_callback() to see what happen ? Theoretically 
> it should work but I'm not confident enough to certainly state there is 
> no corner case doing so.
> 
> (And yes, absolute timers does not have this problem ;)
> 
> Sylvain
> ___
> lwip-users mailing list
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users

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

Re: [lwip-users] Could sys_restart_timeouts be provided also for !NO_SYS targets ?

2016-09-26 Thread Sylvain Rochet
Hi Ari,

On Mon, Sep 26, 2016 at 02:13:10PM +0300, Ari Suutari wrote:
> Hi,
> 
> This related to http://savannah.nongnu.org/bugs/index.php?48568
> 
> I have a system which sleeps long times but sys_now() progresses during
> sleep.
> Currently this still seems to cause some surprises with timers.
> 
> While there seems to be discussion about moving to absolute time
> in timers instead of current implementation, could it be possible that
> timeouts.c provided
> sys_restart_timeouts() function also for targets that are using RTOS in the
> meantime ?

The problem here is that sys_timeouts_mbox_fetch() is still running when 
you go to sleep, therefore calling sys_restart_timeouts() would do 
nothing, this is why this function is currently not available in !NO_SYS 
mode.

Anyway, could you try enabling sys_restart_timeouts() for !NO_SYS and 
then calling it with tcpip_callback() to see what happen ? Theoretically 
it should work but I'm not confident enough to certainly state there is 
no corner case doing so.

(And yes, absolute timers does not have this problem ;)

Sylvain


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

[lwip-users] lwIP 2.0.0 IPv6 Support (specifically interface initialization)

2016-09-26 Thread josephjah
Hello everyone!

I've got a few questions about IPv6 support. 

First, I've decided to try to use 2.0.0 RC2 for IPv6 support (is this
wise?).

Second, I've got a few questions about how to properly initialize an
interface for IPv6. I have experience working with lwip 1.4.1 in IPv4 mode
with no problem. However, I've spent a while trying to piece together clues
for IPv6 but I can't seem to find much in the way of documentation or
examples. Maybe you guys can send me in the right direction.

Here's my initialization code (modeled loosely after how I'd do things in
IPv4 mode).

static ip6_addr_t addr6;
IP6_ADDR2(, 0xfd56, 0x5799, 0xd8f6, 0x1238, 0x8c99, 0x93b4, 0x9d8e,
0x24f6);

ip_2_ip6(_addr[0])->addr[0] = addr6.addr[0]; 
ip_2_ip6(_addr[0])->addr[1] = addr6.addr[1]; 
ip_2_ip6(_addr[0])->addr[2] = addr6.addr[2]; 
ip_2_ip6(_addr[0])->addr[3] = addr6.addr[3]; 

netif_ip6_addr_set_state(, 0, IP6_ADDR_TENTATIVE); 
netif_add(, NULL, tapif_init, ethernet_input);

interface6.state = this;
interface6.output_ip6 = _etharp_output;
interface6.mtu = _mtu;
interface6.name[0] = 't';
interface6.name[1] = 'p';
interface6.hwaddr_len = 6;
_mac.copyTo(interface6.hwaddr, interface.hwaddr_len);
netif_set_default();
netif_set_up();


where IP6_ADDR2 is a macro I took and renamed from lwIP 1.4.1, which for
some reason is removed from lwIP 2.0.0?

So, in short, this initialization code is faulty/incorrect in some way but I
can't figure out how. Any suggestions?

Thanks in advance!




--
View this message in context: 
http://lwip.100.n7.nabble.com/lwIP-2-0-0-IPv6-Support-specifically-interface-initialization-tp27397.html
Sent from the lwip-users mailing list archive at Nabble.com.

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


[lwip-users] Could sys_restart_timeouts be provided also for !NO_SYS targets ?

2016-09-26 Thread Ari Suutari

Hi,

This related to http://savannah.nongnu.org/bugs/index.php?48568

I have a system which sleeps long times but sys_now() progresses during  
sleep.

Currently this still seems to cause some surprises with timers.

While there seems to be discussion about moving to absolute time
in timers instead of current implementation, could it be possible that 
timeouts.c provided
sys_restart_timeouts() function also for targets that are using RTOS in 
the meantime ?


   Ari S.





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


[lwip-users] blocked udp

2016-09-26 Thread garibaldi pineda garcia
Hello all,

I'm building a system which encodes video in a Zedboard FPGA and sends it
out through the ethernet port. I have tested sending random data out and it
works, but when I try to use the data from the video source I manage to set
the ARM core/network in a locked state. I've also tested the system without
sending any data through etherenet and it works fine.

I've increased memory and pool sizes; I also decreased the Time-To-Live for
all protocols and tried using a global pbuf or a dynamic local pbuf.

These setting seem to get the system working a bit longer, but I still get
locked whenever the video encoding requires to send more than random data.

Does anyone have suggestions on what I could do?

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