lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] LWIP IPV6 UDP STM32f746


From: ajnlwip
Subject: [lwip-users] LWIP IPV6 UDP STM32f746
Date: Sun, 24 Nov 2019 10:25:57 -0700 (MST)

Hi, I have a STM32F746 that I am able to send/receive IPV4 UDP messages and it working just fine. Now I try to move from IPV4 to IPV6. I am using CubeMx to configure my STM32F746. The first step is to ping the device but I cannot reach the STM32F746. According to the print out in MX_LWIP_Init() the IPV6 address is FE80::8000:0:0:E1 So I tried the the following but failed: C:\Users\ajn>ping FE80::8000:0:0:E1 Pinging fe80::8000:0:0:e1 with 32 bytes of data: Destination host unreachable. The ip address of the PC is: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::b034:7349:9aec:332e%5 IPv4 Address. . . . . . . . . . . : 192.168.0.101 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.0.1 I am little bit lost when it comes to this IPV6 addresses, so may I am not using the correct ones. Do you have any suggestion how I can solve this problem? I have following code in: int main(void) { ... MX_LWIP_Init(); ... while (1) { /* Read a received packet from the Ethernet buffers and send it to the lwIP for handling */ ethernetif_input(&m_gnetif); // Checks if Ethernet link is up or down ethernetif_set_link(&m_gnetif); /* Handle timeouts */ sys_check_timeouts(); } } void MX_LWIP_Init(void) { /* Initilialize the LwIP stack without RTOS */ lwip_init(); /* add the network interface (IPv6) without RTOS */ netif_add(&gnetif, NULL, ðernetif_init, ðernet_input); /* Create IPv6 local address */ netif_create_ip6_linklocal_address(&gnetif, 0); netif_ip6_addr_set_state(&gnetif, 0, IP6_ADDR_VALID); gnetif.ip6_autoconfig_enabled = 1; my_printf("%s: ", ip6addr_ntoa(netif_ip6_addr(&gnetif, 0))); /* Registers the default network interface */ netif_set_default(&gnetif); if (netif_is_link_up(&gnetif)) { /* When the netif is fully configured this function must be called */ netif_set_up(&gnetif); } else { /* When the netif link is down this function must be called */ netif_set_down(&gnetif); } /* Set the link callback function, this function is called on change of link status*/ netif_set_link_callback(&gnetif, ethernetif_update_config); /* Create the Ethernet link handler thread */ /* USER CODE BEGIN 3 */ /* USER CODE END 3 */ }

Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]