Re: [lwip-users] PPP server problem

2015-05-05 Thread LMao
Hi Sylvain, Thanks for your help. Yes, you're right. I was using the wrong PPPoS input path. I should have used pppos_input_tcpip() instead of pppos_input() in my circumstance. Regards, Charles -Original Message- From: lwip-users-bounces+cmao=moog@nongnu.org

Re: [lwip-users] PPP server problem

2015-05-05 Thread LMao
Yes, it works now. Charles -Original Message- From: lwip-users-bounces+cmao=moog@nongnu.org [mailto:lwip-users-bounces+cmao=moog@nongnu.org] On Behalf Of Sylvain Rochet Sent: Tuesday, May 05, 2015 8:52 AM To: Mailing list for lwIP users Subject: Re: [lwip-users] PPP server

[lwip-users] PPP server problem

2015-05-04 Thread LMao
Hi Sylvain, I try to use PPP server on AT91SAM7x chip and it failed authentication (both sides using PAP). Here's the debug message from a Linux (PPP client) followed by lwIP PPP debug message. Interesting thing is the PPP authentication failure also causes the whole lwIP stack stop working. I

Re: [lwip-users] PPP server problem

2015-05-04 Thread LMao
Hi Sylvain, NO_SYS = 0. I am using freeRTOS. I increased both main lwIP thread and my PPP application thread stack size from 200 to 500 and problem not solved. The message after enabling PRINTPKT_SUPPORT is as following: ppp phase changed[1]: phase=0.. ppp_listen[1].. ppp phase changed[1]:

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-15 Thread LMao
Sylvain, I observed similar messages. I think VJ is in effect in my test. Charles -Original Message- From: lwip-users-bounces+cmao=moog@nongnu.org [mailto:lwip-users-bounces+cmao=moog@nongnu.org] On Behalf Of Sylvain Rochet Sent: Monday, April 14, 2014 10:19 AM To: Mailing list

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-14 Thread LMao
Hi Sylvain, I applied the patch and it seems everything is working. However, I don't know much about VJ support, so I don't know if the PPP server and my gateway device have actually negotiated to use VJ at all. Please tell me how to check VJ is in effect. Is there any specific debug options

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-11 Thread LMao
Sylvain, I applied the new patch, but the following statement always cause Data Abort exception run-time error. No matter I set ETH_PAD_SIZE to 0 or 2. The good thing is my compiler doesn't generate any error message for the new patch. *((ppp_pcb**)payload) = pcb; Another thing I am not so

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-11 Thread LMao
Sylvain, Great, the latest patch works. Thank you very much. Charles -Original Message- From: lwip-users-bounces+cmao=moog@nongnu.org [mailto:lwip-users-bounces+cmao=moog@nongnu.org] On Behalf Of Sylvain Rochet Sent: Friday, April 11, 2014 2:01 PM To: Mailing list for lwIP

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread LMao
Hi Sylvain, Thank you for your reply. I really appreciate your help. The below are a few comments and more observations. Well, ip_forward() should call netif-output(), which in our case is ppp_netif_output_ip4(), could you first check that ? Sorry, I may confuse you about which direction the

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread LMao
Sylvain, It seems the patch makes things worse - PPP connection couldn’t build-up anymore. Below is the complete log message after applying the patch. It seems the code stalled at very early stage. *** FreeRTOS Demo Started! *** netif_set_ipaddr: netif addrnetif: IP address of interface set

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread LMao
Below is more debug information and hope it's helpful for fixing the problem. Regarding the code stalled at early stage, that's hardware related. I am using ARM7 (AT91SAM7 to be specific), so the data alignment is 4 and PBUF_LINK_HLEN is 14 by default, so I replaced all PBUF_LINK_HLEN in the

Re: [lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-10 Thread LMao
Hi Sylvain, Good news, I got it work with your patch plus the replacement of (PBUF_LINK_HLEN +2), however, set ETH_PAD_SIZE to 2 actually doesn't work. It seems fail at ARP and infinitely repeat with the following debug messages: ethernet_input: dest:ff:ff:ff:ff:ff:ff, src:c8:d7:19:ee:1f:fc,

[lwip-users] ppp-new IP forwarding only works one direction (Ethernet to PPP)

2014-04-09 Thread LMao
Hi Sylvain, I try to get IP forwarding work between two interfaces - Ethernet and PPP. So far, I can see it works in one direction, i.e., Packets from Ethernet can be forward to PPP, but it seems lwIP stack silently drop the packets in the opposite direction, i.e., from PPP to Ethernet. Can

[lwip-users] I cannot get PPP-new IP forwarding and pppapi_set_default() work

2014-04-08 Thread LMao
Hi Sylvain, Here's my scenario: I am developing a gateway between Ethernet and PPP using ppp-new branch. The gateway device has one Ethernet port(IP 192.168.0.50, i.e., 0x3200a8c0) and one PPP port (IP 192.168.1.105, i.e., 0x6901a8c0). For testing purpose, I connected the Ethernet port to a

Re: [lwip-users] I cannot get PPP-new IP forwarding and pppapi_set_default() work

2014-04-08 Thread LMao
Sylvain, The Ethernet and PPP interfaces don't share the same subnet, actually they are in different subnet, i.e., Ethernet uses subnet 192.168.0.0 with netmask 255.255.255.0 while PPP uses subnet 192.168.1.0 with netmask 255.255.255.0. Any problem with the above settings? Charles

Re: [lwip-users] I cannot get PPP-new IP forwarding and pppapi_set_default() work

2014-04-08 Thread LMao
You're right. It was a typo. Charles -Original Message- From: lwip-users-bounces+cmao=moog@nongnu.org [mailto:lwip-users-bounces+cmao=moog@nongnu.org] On Behalf Of Sylvain Rochet Sent: Tuesday, April 08, 2014 1:31 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] I

Re: [lwip-users] I cannot get PPP-new IP forwarding and pppapi_set_default() work

2014-04-08 Thread LMao
Sylvain, Thanks for the suggestion. I will try to implement a static routing. Charles -Original Message- From: lwip-users-bounces+cmao=moog@nongnu.org [mailto:lwip-users-bounces+cmao=moog@nongnu.org] On Behalf Of Sylvain Rochet Sent: Tuesday, April 08, 2014 2:00 PM To: Mailing

[lwip-users] PPP-new threaded vs non-threaded application

2014-04-07 Thread LMao
Hi Sylvain, I think in your post http://lists.nongnu.org/archive/html/lwip-users/2013-06/msg00011.html, you gave some code snippet showing how to use ppp-new in user's application. I believe that snippet is used in a non-threaded application, am I right? Can you give an example application

[lwip-users] Missing typedef in vj.h fsm.h ppp.h etc

2014-04-04 Thread LMao
Sylvain, I try to compile ppp-new and my compiler(Keil) gave compiling errors like this: .\lwip-1.3.0\src\include\netif/ppp/vj.h(110): error: #20: identifier u_short is undefined .\lwip-1.3.0\src\include\netif/ppp/vj.h(111): error: #20: identifier u_char is undefined

Re: [lwip-users] Missing typedef in vj.h fsm.h ppp.h etc

2014-04-04 Thread LMao
Hi Sylvain, Don't be fooled by the folder name lwip-1.3.0. Actually the whole src folder under it contains the ppp-new's src folder. I just kept lwip1.3.0 folder name to minimize the change to Keil project files. Charles -Original Message- From:

Re: [lwip-users] Missing typedef in vj.h fsm.h ppp.h etc

2014-04-04 Thread LMao
A few files have the problem: init.c, memp.c, pbuf.c, timers.c, ppp.c, api_lib.c, api_msg.c, pppapi.c, sockets.c and tcpip.c Charles -Original Message- From: lwip-users-bounces+cmao=moog@nongnu.org [mailto:lwip-users-bounces+cmao=moog@nongnu.org] On Behalf Of Sylvain Rochet

Re: [lwip-users] Missing typedef in vj.h fsm.h ppp.h etc

2014-04-04 Thread LMao
Hi Sylvain, The compiler log is in the attached file. Keil uVision use ARMCC compiler, here's the command line options for compiling: --thumb -c --cpu ARM7TDMI -g -O0 --apcs=interwork --asm --interleave --asm_dir .\\lst\\ -I. -I.\EMAC -I..\..\Source\include -I..\..\Source\portable\Keil\SAM7

Re: [lwip-users] Missing typedef in vj.h fsm.h ppp.h etc

2014-04-04 Thread LMao
Sylvain, Thank you very much. It works now. Charles -Original Message- From: lwip-users-bounces+cmao=moog@nongnu.org [mailto:lwip-users-bounces+cmao=moog@nongnu.org] On Behalf Of Sylvain Rochet Sent: Friday, April 04, 2014 3:52 PM To: Mailing list for lwIP users Subject: Re:

Re: [lwip-users] Which PPP implementation should be used? PPP-new or PPP from the master branch

2014-04-01 Thread LMao
Hi Sylvain, Thanks for your support. I didn't know it doesn't support PPP server. Any plans to add PPP server? What needs be done in order to support PPP server? Charles -Original Message- From: lwip-users-bounces+cmao=moog@nongnu.org

[lwip-users] Which PPP implementation should be used? PPP-new or PPP from the master branch

2014-03-31 Thread LMao
Hi there, I am new to the lwIP community and try to use lwIP v1.4.1 to implement a gateway between an Ethernet interface and PPP on ATM91SAM7x. I found a port (with lwIP 1.3) in FreeRTOS community contributions and migrated to lwIP 1.4.1. It works fine with the Ethernet part, but the port

Re: [lwip-users] Which PPP implementation should be used? PPP-new or PPP from the master branch

2014-03-31 Thread LMao
To: Mailing list for lwIP users Subject: Re: [lwip-users] Which PPP implementation should be used? PPP-new or PPP from the master branch Hello LMao, On Mon, Mar 31, 2014 at 12:57:56PM +, l...@moog.com wrote: Hi there, I am new to the lwIP community and try to use lwIP v1.4.1 to implement