2024-10-17 06:35 PM - last edited on 2024-10-18 05:54 AM by SofLit
I hope this email finds you well. I am currently working with the STM32 NUCLEO F429ZI and encountering challenges with Ethernet connectivity. Specifically, I am looking for example projects demonstrating how to connect STM32 to Ethernet, both using a fixed IP and DHCP.
Solved! Go to Solution.
2024-10-18 06:01 AM - edited 2024-10-18 06:02 AM
Hello @QuangIoT ,
You can refer to this example on GitHub.
In lwipopts.h file, there is this definition:
/* ---------- DHCP options ---------- */
#define LWIP_DHCP 1
1: DHCP activated,
0: deactivated -> Static IP.
In main.c for static IP:
/*Static IP ADDRESS*/
#define IP_ADDR0 ((uint8_t)192U)
#define IP_ADDR1 ((uint8_t)168U)
#define IP_ADDR2 ((uint8_t)0U)
#define IP_ADDR3 ((uint8_t)10U)
Hope it does answer your question.
2024-10-18 06:01 AM - edited 2024-10-18 06:02 AM
Hello @QuangIoT ,
You can refer to this example on GitHub.
In lwipopts.h file, there is this definition:
/* ---------- DHCP options ---------- */
#define LWIP_DHCP 1
1: DHCP activated,
0: deactivated -> Static IP.
In main.c for static IP:
/*Static IP ADDRESS*/
#define IP_ADDR0 ((uint8_t)192U)
#define IP_ADDR1 ((uint8_t)168U)
#define IP_ADDR2 ((uint8_t)0U)
#define IP_ADDR3 ((uint8_t)10U)
Hope it does answer your question.
2024-10-19 01:20 AM
How to connect STM32F429ZI to MQTT HiveMQ? What is the connection principle, and what is the connection command? What are the steps to connect STM32F429ZI to HiveMQ?
2024-10-21 12:54 AM
Hello @QuangIoT ,
I invite you to open a new thread for this new question.
Thank you.