Showing results for 
Search instead for 
Did you mean: 

Can’t connect STM32 board to laptop using ethernet cable. Ping works. Host application always shows

Associate II

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, Gateway, Subnet mask, port 39

Laptop is client, set to IP, Gateway, Subnet Mask 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, 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, Gateway, Subnet Mask, 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 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




"Wi-Fi is a family of wireless network protocols ..."

I don't get your wifi references, so how do you connect the board?

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....


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?


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.

Associate II

STM32 board is set to use a static IP ( netmask gateway

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 netmask and gateway

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. netmask and gateway

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?


Pavel A.
Evangelist III 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.