Ping reply Error 0x1510 in PPP example

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

Ping reply Error 0x1510 in PPP example

Jump to solution
976 Views
sumate
Contributor I

Hello All,

 

Now I use TWR-K60N512< TWR-SER> with MQX 3.8 to run a PPP client example <rtcs/examples/shell>.

I have done step by step follow the document ,Everything look fine and connection was established.

But, after that I've never success Ping to any IP, It always reply "Error 0x1510".

Could you please give me a suggestion for this?

 

 

Thank you

...................

Labels (1)
Tags (1)
0 Kudos
1 Solution
507 Views
BryGuyH
Contributor IV

It means no route to host.

 

Its because Freescale hasn't fixed their PPP driver (which also has infinate loops in it as well - so some of your RTCS functions will lock up your code when the ppp link is down).

 

This is what I did to fix the issue:

 

static boolean IPCP_up   (      PPPFSM_CFG_PTR    fsm            /* [IN] - State Machine */   ){ /* Body */   IP_IF_PTR            if_ptr = fsm->PRIVATE;   IPCP_CFG_STRUCT_PTR  ipcp_ptr = if_ptr->HANDLE;   /* Bind the negotiated IP address to this interface */   ipcp_ptr->BIND_PARMS.ihandle = if_ptr;   ipcp_ptr->BIND_PARMS.address = ipcp_ptr->LOPT.ADDR;   ipcp_ptr->BIND_PARMS.network = ipcp_ptr->POPT.ADDR?ipcp_ptr->POPT.ADDR:((ipcp_ptr->LOPT.ADDR & IN_CLASSC_NET) + 1);   //ipcp_ptr->BIND_PARMS.network = ipcp_ptr->POPT.ADDR;   ipcp_ptr->BIND_PARMS.netmask = INADDR_ANY;      RTCSCMD_smartissue(ipcp_ptr->BIND_PARMS, IPIF_bind_ppp);   /* Install a default gateway */   if (ipcp_ptr->INIT.DEFAULT_ROUTE) {      ipcp_ptr->GATE_PARMS.address = ipcp_ptr->POPT.ADDR?ipcp_ptr->POPT.ADDR:((ipcp_ptr->LOPT.ADDR & IN_CLASSC_NET) + 1);      //ipcp_ptr->GATE_PARMS.address = ipcp_ptr->POPT.ADDR;      ipcp_ptr->GATE_PARMS.network = INADDR_ANY;      ipcp_ptr->GATE_PARMS.netmask = INADDR_ANY;      /* Start CR 1133 */      ipcp_ptr->GATE_PARMS.locmask = 0;      /* End CR 1133 */      RTCSCMD_smartissue(ipcp_ptr->GATE_PARMS, IPIF_gate_add);   } /* Endif */#if RTCSCFG_ENABLE_DNS || RTCSCFG_ENABLE_LWDNS   /* Set up the primary DNS server */   if (ipcp_ptr->NEG.NEG_DNS) {#if RTCSCFG_ENABLE_DNS      /* Start CR 2257 */      DNS_SLIST_STRUCT slist_entry;      DNS_init_slist_entry(&slist_entry);      slist_entry.IPADDR = ipcp_ptr->LOPT.DNS;      if (DNS_add_slist_entry(&slist_entry) != DNS_OK)         return FALSE;      /* End CR 2257 */#else      LWDNS_server_ipaddr = ipcp_ptr->LOPT.DNS;#endif   } /* Endif */#endif   if (ipcp_ptr->IP_UP) {      ipcp_ptr->IP_UP(ipcp_ptr->IP_PARAM);   } /* Endif */   return TRUE;} /* Endbody */

 

View solution in original post

0 Kudos
3 Replies
508 Views
BryGuyH
Contributor IV

It means no route to host.

 

Its because Freescale hasn't fixed their PPP driver (which also has infinate loops in it as well - so some of your RTCS functions will lock up your code when the ppp link is down).

 

This is what I did to fix the issue:

 

static boolean IPCP_up   (      PPPFSM_CFG_PTR    fsm            /* [IN] - State Machine */   ){ /* Body */   IP_IF_PTR            if_ptr = fsm->PRIVATE;   IPCP_CFG_STRUCT_PTR  ipcp_ptr = if_ptr->HANDLE;   /* Bind the negotiated IP address to this interface */   ipcp_ptr->BIND_PARMS.ihandle = if_ptr;   ipcp_ptr->BIND_PARMS.address = ipcp_ptr->LOPT.ADDR;   ipcp_ptr->BIND_PARMS.network = ipcp_ptr->POPT.ADDR?ipcp_ptr->POPT.ADDR:((ipcp_ptr->LOPT.ADDR & IN_CLASSC_NET) + 1);   //ipcp_ptr->BIND_PARMS.network = ipcp_ptr->POPT.ADDR;   ipcp_ptr->BIND_PARMS.netmask = INADDR_ANY;      RTCSCMD_smartissue(ipcp_ptr->BIND_PARMS, IPIF_bind_ppp);   /* Install a default gateway */   if (ipcp_ptr->INIT.DEFAULT_ROUTE) {      ipcp_ptr->GATE_PARMS.address = ipcp_ptr->POPT.ADDR?ipcp_ptr->POPT.ADDR:((ipcp_ptr->LOPT.ADDR & IN_CLASSC_NET) + 1);      //ipcp_ptr->GATE_PARMS.address = ipcp_ptr->POPT.ADDR;      ipcp_ptr->GATE_PARMS.network = INADDR_ANY;      ipcp_ptr->GATE_PARMS.netmask = INADDR_ANY;      /* Start CR 1133 */      ipcp_ptr->GATE_PARMS.locmask = 0;      /* End CR 1133 */      RTCSCMD_smartissue(ipcp_ptr->GATE_PARMS, IPIF_gate_add);   } /* Endif */#if RTCSCFG_ENABLE_DNS || RTCSCFG_ENABLE_LWDNS   /* Set up the primary DNS server */   if (ipcp_ptr->NEG.NEG_DNS) {#if RTCSCFG_ENABLE_DNS      /* Start CR 2257 */      DNS_SLIST_STRUCT slist_entry;      DNS_init_slist_entry(&slist_entry);      slist_entry.IPADDR = ipcp_ptr->LOPT.DNS;      if (DNS_add_slist_entry(&slist_entry) != DNS_OK)         return FALSE;      /* End CR 2257 */#else      LWDNS_server_ipaddr = ipcp_ptr->LOPT.DNS;#endif   } /* Endif */#endif   if (ipcp_ptr->IP_UP) {      ipcp_ptr->IP_UP(ipcp_ptr->IP_PARAM);   } /* Endif */   return TRUE;} /* Endbody */

 

0 Kudos
507 Views
netra
Contributor IV

Can u please tell me what does this statement  " ipcp_ptr->GATE_PARMS.address = ipcp_ptr->POPT.ADDR?ipcp_ptr->POPT.ADDR:((ipcp_ptr->LOPT.ADDR & IN_CLASSC_NET) + 1);   "     exactly do?

when ppp_up() get executed?

0 Kudos
507 Views
sumate
Contributor I

Great work, Thak you so much.

0 Kudos