2025-03-27 1:49 AM - last edited on 2025-03-27 1:59 AM by Andrew Neil
hii every one
i have a question about setting up the ip of the STM32 MCU remotely
when we want to do client server in udp or tcp on stm32 controller , we are used to set the ip address manually in the ioc file in general settings in the lwip section in the middleware tab .
and i was wondering if there is a way to set up any default ip of mine , and is there a way to change this ip remotly after i am connected to the stm32 .
my goal is to design an application that can give me the ability to access and change the ip and mask and gateway of my stm32 controller , i be very thankful for help and to know if there is a method to do that
Solved! Go to Solution.
2025-03-27 2:12 AM - edited 2025-03-27 2:12 AM
You said, "we are used to set the ip address manually in the ioc file in general settings in the lwip section in the middleware tab" - so you already have this working?
So that code is your example!
That is the code that you browse, find the settings, then modify...
Did you try the internet search?
2025-03-27 1:56 AM - edited 2025-03-27 1:57 AM
The ioc file from cubeMx as i understood is just a point and click User Interface that generates code.
Here is what i would do:
2025-03-27 2:04 AM
This is going to be more down to the IP stack that you use (LwIP) rather than specific to STM32 - so try searching in general for "LwIP set IP address" and similar ...
Also, as @Javier1 said, browse the generated code to see where these things get set - then change them from compile-time constants to run-time settings ...
2025-03-27 2:06 AM
can yo guys give an example code where to look for thanks
2025-03-27 2:12 AM - edited 2025-03-27 2:12 AM
You said, "we are used to set the ip address manually in the ioc file in general settings in the lwip section in the middleware tab" - so you already have this working?
So that code is your example!
That is the code that you browse, find the settings, then modify...
Did you try the internet search?
2025-03-27 2:24 AM
@Javier1 wrote:
- Just put your project inside the version control of your choice (git?)
@abeba.1 If you don't already have version control, then I would certainly recommend that you should.
But you don't actually need it to do this - you can just use a simple copy:
If you don't already have a diff utility, try WinMerge: https://winmerge.org/?lang=en
A diff utility is an invaluable tool.
2025-03-27 3:34 AM
hii guyes thanks for help :)