2019-11-25 02:37 PM
Hi all,
I am trying to get LwIP running on my STM32F769I-Discovery board. It works fine with the provided netconn-example.
But when I try to generate a new project inside CubeIDE the dhcp-discovery is always failing. I can not see anything when running my code using Wireshark.
Can anybody provide me a working example based on a project generate from a recent CubeMX version? Unfortunately I failed to integrate the provided example into my CubeIDE project.
@ST: When will you update your examples and integrate them into CubeIDE?
Thanks
Klaas
2019-11-25 02:49 PM
2019-11-26 12:03 AM
> working example based on a project generate from a ... CubeMX
Without rewriting that is impossible, because CubeMX generates non-working bloatware.
But there are still several critical bugs to report, especially related to Cortex-M7, and ST's DHCP and netif up/down usage most likely is also broken.
2019-11-26 03:03 AM
Hello Klaas,
I'm currently working with the same board and I've got it working using CubeMx 5.4.0.
I also use AC6 System Workbench for IDE.
I use dnsmasq to run a DHCP server and the board and my laptop are connected through a switch (to prevent dnsmasq to go to some sort of sleep mode).
use
$ netcat -lu4 54321
to listen to the UDP packets
Regards,
Arno
2019-11-26 11:23 AM
Hi Arno,
thanks for that. Maybe I should think about switching to AC6SW as well. CubeIDE seems to be to buggy...
Thanks
Klaas
2021-08-04 03:53 AM
Hi,
I presume you aren't anymore searching for an answer, but others like me might do. Here it is:
When you do activate the DHCP option on the CubeIDE software, it indeed changes the code to use DHCP... and... disable it !
How clever are those who have made such a tool... Amazing ! :-))
You have to manually insert
#define USE_DHCP
in the main.h file in order that the DHCP is used. If you do that, it works (at least it did for me).
By the way, if you use a static address instead of DHCP and you enter the IP address, mask and gateway in the IDE/cube interface... it doesn't work as well (how surprising !) and you have to set it manually in the code:
in the file LWIP/App/lwip.c, replace
uint8_t IP_ADDRESS[4];
uint8_t NETMASK_ADDRESS[4];
uint8_t GATEWAY_ADDRESS[4];
by
uint8_t IP_ADDRESS[4]={192,168,1,201};
uint8_t NETMASK_ADDRESS[4]={255,255,255,0};
uint8_t GATEWAY_ADDRESS[4]={192,168,1,1};
there as well... it works (you have to redo it everytime you open the cube editor as it regenerate the code... without the IP :-)) )
I honnestly can't understand why they can't/don't fix those problems (because I guess almost everybody runs into them) or at least document the workarounds or if this is a feature, explain why it needs to be like that.
This is a bit sickening to loose a few days of your life looking for a solution to those trivial problems and likely turns many people away from developing products with STM.