Lwip Ppp Over Serial Port

Posted on by
Lwip Ppp Over Serial Port Rating: 5,1/10 2091reviews

>hii, >i am trying to implement ppp over serial using lwip version 1.4.1 for our >project.i am working on this from last 15 to 20 days.i have first >initialized gsm modem SIM900D and dial using ATD*99# command and once it >gets connected call below code. >>>>>tcpip_init(lwIPInit,NULL); >xTaskCreate(vPPPApplication, 'vPPPApplication', configMINIMAL_STACK_SIZE, >NULL, tskIDLE_PRIORITY, NULL ); You should wait lwIP is initialised before starting vPPPApplication() which is calling pppapi_* functions, please use the tcp_init_done callback with a semaphore here, or start vPPPApplication() in lwIPInit(). You can also use non-thread safe functions in your lwIPInit(), this is always better than using heavyweight pppapi_ calls. >>( void ) pvArgument; >>SysConfigGetLocalIPAddress(&ipAddr1, &ipAddr2, &ipAddr3, &ipAddr4); >>// Set up the network interface. >ip_addr_set_zero( &xGateway ); >ip_addr_set_zero( &xIPAddr ); >ip_addr_set_zero( &xNetMask ); >>LWIP_PORT_INIT_GW(&xGateway); >LWIP_PORT_INIT_IPADDR(&xIPAddr); >LWIP_PORT_INIT_NETMASK(&xNetMask); >>netif_set_default( netif_add( &xNetIf, &xIPAddr, &xNetMask, &xGateway, >NULL,GSM_init, tcpip_input ) );//ethernetif_init >netif_set_up( &xNetIf ); xNetIf is not your PPPoS interface, the PPP code you are using is still using an internal netif.

Note that master HEAD is now using a user provided netif for PPP, which should prevent the confusion you are having. Hello Rohan, On Thu, Feb 19, 2015 at 02:56:17AM -0700, rohanm wrote: >hii, >>thank you for your valuable response, >please find attachment of received frame form sio_read function. >lcp_conf_reject.csv You are asking a bit too much. I am not going to debug your serial driver or debug your PPP stream byte by byte. Please send a PPP trace using the lwIP trace feature once and only once your serial in and out flows are working flawlessly. Sylvain _______________________________________________ lwip-users mailing list.

Hello, On Thu, Feb 19, 2015 at 01:15:04PM +0100, wrote: >rohanm wrote: >>[.] >>This is off-topic, but please subscribe to the list before posting, >I have to manually accept all posts of non-subscribed users: Yes, Nabble sucks. I must admit I have set a filter which automatically archive mails sent to lwip-users using nabble except if the subject contains PPP due to low quality input we get from nabble, and this thread is no exception.

Sylvain _______________________________________________ lwip-users mailing list. Hello Rohan, On Thu, Feb 19, 2015 at 06:04:36AM -0700, rohanm wrote: >goldsimon- i have already subscribed.

Lwip Ppp Over Serial Port

No, you are not, you are using Nabble, which is just an insipid forum to mailing list gateway. >please check debug log and please let me know is it enough or u need more >detailed Debug_log.log >data. This dump is a mess and you expected me to unmess the log for you, this is uncivil when you are asking for help. I didn't parse it thoroughly, but there is nothing wrong in this PPP trace, everything is negotiating as expected up to IPCP, which is generally the latest PPP config step. Sylvain _______________________________________________ lwip-users mailing list. Rohanm wrote: >i am calling 'dns_gethostbyname' function to >resovle dns host name. [.] this function is >returining 'ERR_INPROGRESS'.GPRS is working in sim card.

Before writing this mail, have you took the time to read the documentation of the function you chose to call? I'm sure you know that 'dns_gethostbyname' is a raw API function that must not be called from outside the tcpip_thread and that it can't block until he response is received, right? Simon _______________________________________________ lwip-users mailing list.

>rohanm wrote: >>i am calling 'dns_gethostbyname' function to >>resovle dns host name. [.] this function is >>returining 'ERR_INPROGRESS'.GPRS is working in sim card. >>Before writing this mail, have you took the time to read the >documentation of the function you chose to call? I'm sure you know >that 'dns_gethostbyname' is a raw API function that must not be >called from outside the tcpip_thread and that it can't block until >he response is received, right? And this should have been asked in a new thread at least, this is not related to 'ppp over serial using gsm modem getting config acknowledgement reject packet' at all. Download Rotor Gene 6000 Software Engineer. Allowing others to browse archives is something I consider prominent. Sylvain _______________________________________________ lwip-users mailing list.

PPP interface for lwIP. * PPP over serial. ===== Received data on serial port should be sent to lwIP using the pppos_input() function or the pppos. The garbaged log probably means you are violating lwIP threading constraints. You can notice that PPP negotiated up to a running session in your log, which is quite a.

>hii, >i am trying to implement ppp over serial using lwip version 1.4.1 for our >project.i am working on this from last 15 to 20 days.i have first >initialized gsm modem SIM900D and dial using ATD*99# command and once it >gets connected call below code. >>>>>tcpip_init(lwIPInit,NULL); >xTaskCreate(vPPPApplication, 'vPPPApplication', configMINIMAL_STACK_SIZE, >NULL, tskIDLE_PRIORITY, NULL ); You should wait lwIP is initialised before starting vPPPApplication() which is calling pppapi_* functions, please use the tcp_init_done callback with a semaphore here, or start vPPPApplication() in lwIPInit(). You can also use non-thread safe functions in your lwIPInit(), this is always better than using heavyweight pppapi_ calls. >>( void ) pvArgument; >>SysConfigGetLocalIPAddress(&ipAddr1, &ipAddr2, &ipAddr3, &ipAddr4); >>// Set up the network interface. >ip_addr_set_zero( &xGateway ); >ip_addr_set_zero( &xIPAddr ); >ip_addr_set_zero( &xNetMask ); >>LWIP_PORT_INIT_GW(&xGateway); >LWIP_PORT_INIT_IPADDR(&xIPAddr); >LWIP_PORT_INIT_NETMASK(&xNetMask); >>netif_set_default( netif_add( &xNetIf, &xIPAddr, &xNetMask, &xGateway, >NULL,GSM_init, tcpip_input ) );//ethernetif_init >netif_set_up( &xNetIf ); xNetIf is not your PPPoS interface, the PPP code you are using is still using an internal netif.

Note that master HEAD is now using a user provided netif for PPP, which should prevent the confusion you are having. Hello Rohan, On Thu, Feb 19, 2015 at 02:56:17AM -0700, rohanm wrote: >hii, >>thank you for your valuable response, >please find attachment of received frame form sio_read function. >lcp_conf_reject.csv You are asking a bit too much. I am not going to debug your serial driver or debug your PPP stream byte by byte.

Please send a PPP trace using the lwIP trace feature once and only once your serial in and out flows are working flawlessly. Sylvain _______________________________________________ lwip-users mailing list. Hello, On Thu, Feb 19, 2015 at 01:15:04PM +0100, wrote: >rohanm wrote: >>[.] >>This is off-topic, but please subscribe to the list before posting, >I have to manually accept all posts of non-subscribed users: Yes, Nabble sucks. I must admit I have set a filter which automatically archive mails sent to lwip-users using nabble except if the subject contains PPP due to low quality input we get from nabble, and this thread is no exception. Sylvain _______________________________________________ lwip-users mailing list. Hello Rohan, On Thu, Feb 19, 2015 at 06:04:36AM -0700, rohanm wrote: >goldsimon- i have already subscribed.

No, you are not, you are using Nabble, which is just an insipid forum to mailing list gateway. >please check debug log and please let me know is it enough or u need more >detailed Debug_log.log >data. This dump is a mess and you expected me to unmess the log for you, this is uncivil when you are asking for help. I didn't parse it thoroughly, but there is nothing wrong in this PPP trace, everything is negotiating as expected up to IPCP, which is generally the latest PPP config step.

Sylvain _______________________________________________ lwip-users mailing list. Rohanm wrote: >i am calling 'dns_gethostbyname' function to >resovle dns host name. [.] this function is >returining 'ERR_INPROGRESS'.GPRS is working in sim card.

Before writing this mail, have you took the time to read the documentation of the function you chose to call? I'm sure you know that 'dns_gethostbyname' is a raw API function that must not be called from outside the tcpip_thread and that it can't block until he response is received, right? Simon _______________________________________________ lwip-users mailing list.

>rohanm wrote: >>i am calling 'dns_gethostbyname' function to >>resovle dns host name. [.] this function is >>returining 'ERR_INPROGRESS'.GPRS is working in sim card. >>Before writing this mail, have you took the time to read the >documentation of the function you chose to call?

I'm sure you know >that 'dns_gethostbyname' is a raw API function that must not be >called from outside the tcpip_thread and that it can't block until >he response is received, right? And this should have been asked in a new thread at least, this is not related to 'ppp over serial using gsm modem getting config acknowledgement reject packet' at all. Allowing others to browse archives is something I consider prominent. Sylvain _______________________________________________ lwip-users mailing list.