You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am developing a cellular modem interface using renesas RX processor RX72N.
I need to start and stop the PPP interface for each session and have followed the recommended guide.
First I stop the PPP
nx_ppp_stop(pModem->pPPP); // Now wait until the PPP thread goes to a closed state before proceeding with the delete. // This will give PPP the opportunity to properly release all packets being worked on. while (pModem->pPPP->nx_ppp_state != NX_PPP_STOPPED) { // Sleep for a tick. tx_thread_sleep(1); }
Next I delete the associated IP interface
if (NX_SUCCESS == nx_ip_delete(pModem->pIP)) { if (pModem->device.DiagsOn) { LogDiagMessage("%s: IP Interface deleted", ID); } }
Finally I delete the PPP interface itself
if (NX_SUCCESS == nx_ppp_delete(pModem->pPPP)) { if (pModem->device.DiagsOn) { LogDiagMessage("%s: PPP Interface deleted", ID); } }
However, I am finding that the nx_ppp_delete, does not always release the partial receive packet and I need to add this code before I delete the PPP interface to avoid my packet pool running out.
// Check if partial Rx packet needs releasing if (pModem->pPPP->nx_ppp_receive_partial_packet) { LogDiagMessage("%s: PPP Partial Receive Packet Released", ID); nx_packet_release(pModem->pPPP->nx_ppp_receive_partial_packet); pModem->pPPP->nx_ppp_receive_partial_packet = NX_NULL; }
I have tried this with ip thread higher priority than ppp thread, and ip thread same priority as ppp thread. Regardless of priority, most times there is a partial receive packet allocated when I call nx_ppp_delete and this only checks the partial receive packet if the PPP isn't already stopped.
The text was updated successfully, but these errors were encountered:
I am developing a cellular modem interface using renesas RX processor RX72N.
I need to start and stop the PPP interface for each session and have followed the recommended guide.
First I stop the PPP
nx_ppp_stop(pModem->pPPP); // Now wait until the PPP thread goes to a closed state before proceeding with the delete. // This will give PPP the opportunity to properly release all packets being worked on. while (pModem->pPPP->nx_ppp_state != NX_PPP_STOPPED) { // Sleep for a tick. tx_thread_sleep(1); }
Next I delete the associated IP interface
if (NX_SUCCESS == nx_ip_delete(pModem->pIP)) { if (pModem->device.DiagsOn) { LogDiagMessage("%s: IP Interface deleted", ID); } }
Finally I delete the PPP interface itself
if (NX_SUCCESS == nx_ppp_delete(pModem->pPPP)) { if (pModem->device.DiagsOn) { LogDiagMessage("%s: PPP Interface deleted", ID); } }
However, I am finding that the nx_ppp_delete, does not always release the partial receive packet and I need to add this code before I delete the PPP interface to avoid my packet pool running out.
// Check if partial Rx packet needs releasing if (pModem->pPPP->nx_ppp_receive_partial_packet) { LogDiagMessage("%s: PPP Partial Receive Packet Released", ID); nx_packet_release(pModem->pPPP->nx_ppp_receive_partial_packet); pModem->pPPP->nx_ppp_receive_partial_packet = NX_NULL; }
I have tried this with ip thread higher priority than ppp thread, and ip thread same priority as ppp thread. Regardless of priority, most times there is a partial receive packet allocated when I call nx_ppp_delete and this only checks the partial receive packet if the PPP isn't already stopped.
The text was updated successfully, but these errors were encountered: