[lwip-users] How to switch between DHCP and static IP assignment?

2017-07-11 Thread massimiliano cialdi
Hallo, I wonder how to switch between DHCP and static IP. I found an old post, and I wonder How this switch can be done with lwip 2.0.2. I simply call netifapi_dhcp_release(netif); netifapi_dhcp_stop(netif); // set addresses in ipaddr, netmask, gw netifapi_netif_set_addr(netif, , , );

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-11 Thread odobryabov
Sequence number is losted somewhere... I put l2tp->our_ns = l2tp->peer_nr at the start of pppol2tp_input and now it works without interruptions. But still no any ping through VPN server from Windows client to the device with LwIP, only to static ip of the device. -- View this message in

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-11 Thread odobryabov
But if server requests with ns=2, nr=4, why LwIP responds with ns=3, nr=3? nsnr Data input: c8 02 00 14 d0 b3 00 00 [00 02] [00 04] 80 08 00 00 00 00 00 06 UDP send: c8 02 00 0c 76 c4 00 00 [00 03] [00 03] -- View this message

Re: [lwip-users] lwip2.0.2 l2tp question

2017-07-11 Thread odobryabov
No, sorry, it asks. If "Hello" is: pppol2tp: input packet, len=20, tunnel=53427, session=0, ns=2, nr=4 Data input: c8 02 00 14 d0 b3 00 00 00 02 00 04 80 08 00 00 00 00 00 06 than in pppol2tp_udp_send: UDP send: c8 02 00 0c 76 c4 00 00 00 03 00 03 -- View this message in context:

Re: [lwip-users] dhcp behaviour

2017-07-11 Thread Noam Weissman
Hi Max, I hope I am not confusing you or making an error here. As far as I know DHCP client is handled almost completely by LwIP. You should not worry about timers etc... I have attached my DHCP task, take a look and I hope this helps... This code is running with LwIP 1.41 BR, Noam.

[lwip-users] dhcp behaviour

2017-07-11 Thread massimiliano cialdi
Hallo, I have some questions about dhcp behaviour: - Do I have to call the functions dhcp_coarse_tmr() and dhcp_coarse_tmr() explicitly? I have this doubt because I have seen that these functions are already being declared as timer callbacks in file timeout.c - if my dhcp server has 10s