Error PART:out of blocks in PPP rx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error PART:out of blocks in PPP rx

Jump to solution
1,374 Views
netra
Contributor IV

I am using mqx 3.5 .

I am using ppp server code .i am getting "PART:out of blocks " error in ppp rx task.

please do reply,

Thanks in advance

netra

Labels (1)
0 Kudos
Reply
1 Solution
1,199 Views
soledad
NXP Employee
NXP Employee

Hi,

For this MQX version there is a bug in the PPP driver. We found that PPP RX Task was not finishing correctly after PPP_shutdown. To correct we added in PPP_CFG a flag that finalize for RX Task to exit graceful instead destroy task using RTCS_task_destroy in PPP_shutdown.

We modified  the _iopcb_ppphdlc_read and removed some "dead locks" that could occurs during read from pcb device. After this modification the application should connect and disconnect with no problems.

I strongly suggest switch to the latest version of MQX, you can download it from the following link:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MQX&fpsp=1&tab=Design_Tools_Tab


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
2 Replies
1,200 Views
soledad
NXP Employee
NXP Employee

Hi,

For this MQX version there is a bug in the PPP driver. We found that PPP RX Task was not finishing correctly after PPP_shutdown. To correct we added in PPP_CFG a flag that finalize for RX Task to exit graceful instead destroy task using RTCS_task_destroy in PPP_shutdown.

We modified  the _iopcb_ppphdlc_read and removed some "dead locks" that could occurs during read from pcb device. After this modification the application should connect and disconnect with no problems.

I strongly suggest switch to the latest version of MQX, you can download it from the following link:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MQX&fpsp=1&tab=Design_Tools_Tab


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,199 Views
netra
Contributor IV

Hi sol,

Thanks for your reply,

I have upgraded mqx version 3.5 to 3.8.

I am able to have PPP connection but unable to ping PPP server IP or even start telnet or ftp .

I have pasted the code that i have written :-

    uint_32           error;

    _ip_address       peer_address=0; //address will be assigned by remote host

    IPCP_DATA_STRUCT  ipcp_data;

    _PPP_PAP_LSECRET = &lsecret;

    _PPP_PAP_RSECRETS  = NULL; /* rsecrets  */

    _PPP_CHAP_LNAME    = NULL; /* localname */

    _PPP_CHAP_LSECRETS = NULL; /* lsecrets  */

    _PPP_CHAP_RSECRETS = NULL; /* rsecrets  */

    /* Install a route for a default gateway */

    RTCS_gate_add(GATE_ADDR, INADDR_ANY, INADDR_ANY);

    pio = _iopcb_ppphdlc_init(ppp_handler);

    _PPP_ACCM = 0;

    error = PPP_initialize(pio, &phandle);

   

    if (error)

    {

       printf("\nPPP initialize: %lx", error);

       _task_block();

    } /* Endif */

    _iopcb_open(pio, PPP_lowerup, PPP_lowerdown, phandle);

   

    error = RTCS_if_add(phandle, RTCS_IF_PPP, &ihandle);

   

    if (error)

    {

       printf("\nIF add failed, error = %lx", error);

       _task_block();

    } /* Endif */

    _lwsem_create(&ppp_sem, 0);

    _mem_zero(&ipcp_data, sizeof(ipcp_data));

   

    ipcp_data.IP_UP              = PPP_linkup;

    ipcp_data.IP_DOWN            = PPP_linkdown;

    ipcp_data.IP_PARAM           = &ppp_sem;

    ipcp_data.ACCEPT_LOCAL_ADDR  =  FALSE ;

    ipcp_data.ACCEPT_REMOTE_ADDR = FALSE ;

    ipcp_data.LOCAL_ADDR         = PPP_LOCADDR ;

    ipcp_data.REMOTE_ADDR        = PPP_PEERADDR;

    ipcp_data.DEFAULT_NETMASK  = TRUE;

    ipcp_data.DEFAULT_ROUTE      = TRUE;

   

    _time_delay(1500);

   

    error = RTCS_if_bind_IPCP(ihandle, &ipcp_data);

    _time_delay(1000);

    if (error)

    {

       printf("\nIF bind failed, error = %lx", error);

       _task_block();

    } /* Endif */

    printf("\nPlease initiate PPP connection.  Waiting...\n");   

/*Handshake with RAS server with NULL-modem*/   

#if PPP_DEVICE_RAS

    error = 0; /* 10 attempts to connect */

    while (error < 10)

    {

        if (PPP_link == FALSE)

        {

          _time_delay(1000);

          printf("time = %d\n",error);   

        }

        else

        {

            printf("\nPPP_link = %d, time = %d\n",PPP_link,error);

            break;

        }

        error ++;

    }

    if (PPP_link == TRUE)

    {

        local_address = IPCP_get_local_addr(ihandle);

        peer_address = IPCP_get_peer_addr(ihandle);

        printf("\nPPP device on %s is bound on.\n", PPP_DEVICE);

        printf(" PPP local address is   : %d.%d.%d.%d\n", IPBYTES(local_address));

        printf(" PPP remote address is : %d.%d.%d.%d\n", IPBYTES(peer_address));

        printf(" Now PPP connection is established on %d.%d.%d.%d\n", IPBYTES(peer_address));

    }

    else

    {

        _lwsem_post(&ppp_sem);       

    }

#endif /* PPP_DEVICE_RAS */

    _lwsem_wait(&ppp_sem);

#if PPP_DEVICE_DUN

    printf("\nPPP device %s bound to %d.%d.%d.%d", PPP_DEVICE, IPBYTES(ipcp_data.LOCAL_ADDR));   

#endif /* PPP_DEVICE_DUN */

    if (PPP_link == TRUE)

    {

        return (phandle);

    }

    else

    {

        phandle = NULL;

        return(phandle);

    }

0 Kudos
Reply