S32k148: IPv6 ping not working in project example lwIP s32k148

cancel
Showing results for 
Search instead for 
Did you mean: 

S32k148: IPv6 ping not working in project example lwIP s32k148

2,182 Views
saad_saeed
Contributor III

Dear All,

I am using using S32K148 board and the IDE I am using is S32 design studio. I am running the example project by name of lwip_s32k148. The problem is I have assigned link local address and also enabled IPv6 auto configuration. I have done nothing but enabling the macro #define LWIP_IPV6  to 1. Enabling this macro to 1 causes the block in function enetif_init() present in test.c to enable. The only thing I have added in this code is netif.ip6_autoconfig_enabled=1. Rest is the same.
 
#if LWIP_IPV6
*netif.ip6_autoconfig_enabled=1;
netif_create_ip6_linklocal_address(&netif, 1);
#if PRINTF_SUPPORT
printf("ip6 linklocal address: ");
#endif
ip6_addr_debug_print(0xFFFFFFFFU & ~LWIP_DBG_HALT, netif_ip6_addr(&netif, 0));
#endif /* LWIP_IPV6 */
Now, when I debug the program on my s32k148 board. Every thing goes fine. I can see the IPv4 address i.e 192.168.0.102 assigned to my board. I can also ping this IP address  Below is the image 
image 1.PNG
But when I try to ping the IPv6 address which I can see by checking my laptops IPv6 neighbors since  my laptop and the s32k148 nodes are on the same network. I can see the IPv6 address 2001:db8:aaaa:b:12:13ff:fe10:1513 (I can see that by checking the network part , first 64 bits which is (2001:db8:aaaa:b) and the host part which is created using the physical address of the board which is 02-12-13-10-15-13) of the node but in Physical Address  and Type we see its unreachable.
image2.PNG
Kindly tell me what I am doing wrong here. I would be grateful to you.
Kind Regards,
Saad.
NOTE: I have assigned IPv6 address on FRDM k64 node with lwIP 2.0.2 (This is the same version which is present in s32 Design Studio ). The IPv6 was assigned successfully and I was able to ping the node. Following is the screen shot.
image 3.PNG
12 Replies

1,725 Views
nxf45013
NXP Employee
NXP Employee

Hi! 

From your output seems that you don't have ipv6 gateway set. Can you please check your router settings? 

Vlad

0 Kudos

1,725 Views
saad_saeed
Contributor III

Hello,

Thank you for the reply. I dont think that the issue is the gateway because I have a frdm k64 board which is being assigned ipv6 address. It pings perfectly fine. 

0 Kudos

1,725 Views
nxf45013
NXP Employee
NXP Employee

Can you try with a different MAC? 10:11:12:00:00:00, for example.

0 Kudos

1,725 Views
saad_saeed
Contributor III

Hello,

I did change the mac address to what you have mentioned above. Below is the screen shot of my IPv6 neigbors.

ipv6.PNG

As you can clearly see that my s32k148 node with IPv6 assigned but I cant see any physical address getting assigned. It still shows 00-00-00-00-00-00. More important when I used Wireshark to check the status of neighbor solicitation messages I am seeing this.

neighbor_solicitation_message_ipv6.PNGThe checksum seems to be incorrect. I don't know whats wrong here.

0 Kudos

1,725 Views
nxf45013
NXP Employee
NXP Employee

The only thing I have added in this code is netif.ip6_autoconfig_enabled=1.


Can you try to remove this setting? I believe this could be the issue. 

Where have you set LWIP to 1? Have you used design studio to generate or have you wrote it by hand? 

0 Kudos

1,725 Views
saad_saeed
Contributor III

Hello Vlad,

The IPv6 issue is solved there is a macro LWIP_CHECKSUM_CTRL_PER_NETIF  in lwipopt.h. By default it is 1, now I have changed it to 0. Now, both link local Ipv6 address and IPv6 address achieved using SLAAC are working properly. The only problem I am facing now is that  my IPv4 address is not working. KIndly help me out with this issue.

Regards,

Saad.

0 Kudos

1,725 Views
nxf45013
NXP Employee
NXP Employee

Hi, 

What do you mean by it's not working? you don't see the board on your network?

However, I believe this is a configuration issue. Are you using the example in design studio? I would suggest configuring the application from the interface, rather than investigating this. 

Vlad

0 Kudos

1,725 Views
saad_saeed
Contributor III

Yes I am using the example in design studio.

0 Kudos

1,725 Views
saad_saeed
Contributor III

Hello Vlad, 

Thanks for the tip. I configure the board using the processor expert and it did worked. Cheers:)

Kind Regards,

Saad.

1,725 Views
saad_saeed
Contributor III

Hello Vlad,

By not working I mean I cant ping the board. There is a macro in lwipopt.h which is LWIP_CHECKSUM_CTRL_PER_NETIF. If it is set to 1 IPv4 address gets assigned and ping is working perfectly. If this macro is set to 0 IPv6 address gets assigned and ping works properly. But the only problem is that only one of IP (IPv4 or IPv6) are working at a single time.

Regards,

Saad.

0 Kudos

1,725 Views
saad_saeed
Contributor III

Hello Vlad;

Is there any update on the IPv6 link local address configuration problem.

0 Kudos

1,725 Views
saad_saeed
Contributor III

In the last reply, I did disable the auto config. But nothing changed.

I have set #define LWIP_IPv6 to 1 in lwipopts.h by hand not by processor expert or something like that.

0 Kudos