2024-01-11 08:17 AM - last edited on 2024-01-12 02:35 AM by SofLit
I have a laptop with Wifi.
I directly connect a straight-through ethernet cable between my laptop and my custom STM32 board.
Using IPV4.
STM32 board with LWIP, set as server, IP 192.168.3.1, Gateway 192.168.3.0, Subnet mask 255.255.255.0, port 39
Laptop is client, set to IP 192.168.3.2, Gateway 192.168.3.0, Subnet Mask 255.255.255.0 in Control Panel->Network and Internet ->Network Connections, Ethernet Icon, Properties, Internet Protocol Version 4 (TCP/IPv4)
My STM32 board starts first, no issue with LWIP initialization.
Then I start Hercules application (from HW-group.com), it shows on “your PC network settings” the wifi IP, gateway and netmask. This is the problem.
When I ping from laptop on Hercules, it works fine.
When I try to connect from my laptop to STM32, it fails. Ethernet icon in Network connections has a red cross.
I had all this working before: I took my laptop home, came back, it stopped working.
When It was working, Hercules would show on “your PC network settings” IP 192.168.3.2, Gateway 192.168.3.0, Subnet Mask 255.255.255.0, and not the wifi IP/Gateway/Mask.
Also when it was working, Ethernet icon in Network connections would not have any red cross.
What am I doing wrong here?
Which settings I need to do so that Hercules app. Would show the static local IP 192.168.3.2 and not the wifi IP?
Anything that would allow me to connect my laptop to my STM32 board.
How to have/setup a wired LAN with static IP, that I can use to connect to my STM32 board
2024-01-11 08:31 AM
"Wi-Fi is a family of wireless network protocols ..."
I don't get your wifi references, so how do you connect the board?
2024-01-11 08:36 AM
thanks for your quick reply
I'm connecting my laptop to the STM32H7-based custom board using an ethernet cable.
My laptop has integrated Wifi. I don't want to use the Wifi to connect to the board, but connect through the ethernet cable.
Ping works fine using Hercules app on my laptop. When I try to connect on Hercules, it fails....
2024-01-11 10:09 PM
Do you already have an http server on the STM32?
If yes, can you connect via browser?
Does PING work via the windows command shell?
Have you checked the STM32 side via UART / debugging?
2024-01-12 12:04 AM
What are your LWIP DHCP settings? If you are expecting to use static IPs have you turned DHCP off in LWIP?
I also don't understand your references to WiFi unfortunately.
2024-01-12 08:29 AM
STM32 board is set to use a static IP (192.168.3.1) netmask 255.255.255.0 gateway 192.168.3.0
port 39
its set as a server with TCP
tcp_bind, tcp_listen and initializations work
ping from laptop works
I use Hercules application for testing on my laptop
Wifi I;m talking about is on my laptop.
my laptop has the company wifi enabled and functional.
I connected my laptop to my stm32 board using a straight-through ethernet cable.
I set on my laptop ethernet (control panel, network connections) to use a static IP 192.168.3.2 netmask 255.255.255.0 and gateway 192.168.3.0
when I open Hercules application on my laptop, it shows the ip of the wifi not the static IP.
I had all this working before. When it was working, Hercules app. would show the static ethernet settings data of my laptop (i.e. 192.168.3.2 netmask 255.255.255.0 and gateway 192.168.3.0).
I think my issue is in the setup of my laptop. how to setup the client (laptop) for a fixed/static IP? I did in control panel but Im missing something?
thanks
2024-01-12 10:09 AM - edited 2024-01-12 10:23 AM
192.168.3.0 is not a valid default gateway address.
Also, a Windows desktop (Home,Pro) by default does not act as a bridge between its network interfaces.
> when I open Hercules application on my laptop, it shows the ip of the wifi not the static IP.
If the command ipconfig /all shows your LAN interface with the correct address - this looks like a problem with the Hercules software.
> how to setup the client (laptop) for a fixed/static IP?
This is easy, explained in many places. For one, try the new Windows co-pilot or Edge browser AI.