2018-02-13 05:27 AM
My projects with 32F107 runs DHCP ON works fine on LAN.
I want my MCU get custom IP when I connect to PC without DHCP Server.
I am using cube and already set
Should I use autoIP or insert code when DHCP fail.
Do I have to use cross cable?
&sharpdefine WITH_RTOS 0
/*----- CHECKSUM_BY_HARDWARE disabled -----*/&sharpdefine CHECKSUM_BY_HARDWARE 0/*-----------------------------------------------------------------------------*//* LwIP Stack Parameters (modified compared to initialization value in opt.h) -*/
/* Parameters set in STM32CubeMX LwIP Configuration GUI -*//*----- Value in opt.h for LWIP_DHCP: 0 -----*/&sharpdefine LWIP_DHCP 1/*----- Default Value for MEMP_NUM_TCP_PCB: 5 ---*/&sharpdefine MEMP_NUM_TCP_PCB 2/*----- Value in opt.h for NO_SYS: 0 -----*/&sharpdefine NO_SYS 1/*----- Value in opt.h for SYS_LIGHTWEIGHT_PROT: 1 -----*/&sharpdefine SYS_LIGHTWEIGHT_PROT 0/*----- Value in opt.h for MEM_ALIGNMENT: 1 -----*/&sharpdefine MEM_ALIGNMENT 4/*----- Default Value for MEMP_NUM_PBUF: 16 ---*/&sharpdefine MEMP_NUM_PBUF 10/*----- Default Value for MEMP_NUM_TCP_PCB_LISTEN: 8 ---*/&sharpdefine MEMP_NUM_TCP_PCB_LISTEN 1/*----- Default Value for MEMP_NUM_TCP_SEG: 16 ---*/&sharpdefine MEMP_NUM_TCP_SEG 10/*----- Default Value for PBUF_POOL_SIZE: 16 ---*/&sharpdefine PBUF_POOL_SIZE 11/*----- Default Value for PBUF_POOL_BUFSIZE: 592 ---*/&sharpdefine PBUF_POOL_BUFSIZE 1524/*----- Value in opt.h for LWIP_ETHERNET: LWIP_ARP || PPPOE_SUPPORT -*/&sharpdefine LWIP_ETHERNET 1/*----- Default Value for LWIP_AUTOIP: 0 ---*/&sharpdefine LWIP_AUTOIP 1/*----- Default Value for LWIP_DHCP_AUTOIP_COOP: 0 ---*/&sharpdefine LWIP_DHCP_AUTOIP_COOP 1♯♯♯@#autoip2018-08-10 09:12 AM
Sorry, bumping old zombie unanswered threads off my feed