cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f767zi nucelo ethernet hardware setup : Can we use our laptop as a router for testing?

Anare.1
Associate III

Hello  everyone,

It is a quite basic question, I have this stm32767zi nucleo board with a LAN driver and rj45 connector, and I intend to test the basic ping/web server examples.So for now, I do not have a router with me, so I was wondering, if I could use my laptop as a router itself , if it is connected to the WiFi and connect my board to laptop using an Ethernet cable.

10 REPLIES 10

I'm trying to build a server using STM32F207 processor and LAN8742A I have used CubeIDE to generate the configuration code as follows:

1) ETH -> Auto negotiation Enabled

            -> PHY Address = 0

            -> PHY SR Offset = 1F

            -> PHY Speed Mask = 0x0004

             -> PHY Duplex Mask = 0x0010

             -> PHY Interrupt Source Flag register Offset = 0x001D

             -> PHY Link Down Interrupt = 0x0010

Rest of the settings are default. Since I found these to be wrongly auto generated.

2) LWIP ->  LWIP_DHCP = Disabled

               -> IP Address = 192.168.001.111

               -> Netmask Address = 255.255.255.000

               -> Gateway Address = 192.168.001.001

3) LWIP -> Key Options -> MEM_SIZE (Heap Memory Size) = 10*1024 Bytes

Then generated the code and added the below  

int main(void)
{
   HAL_Init();
  SystemClock_Config();
 
  MX_GPIO_Init();
  MX_LWIP_Init();
 
  while (1)
  {
  MX_LWIP_Process();
  }
}
 
But unable to ping the above IP address from my command prompt. when i check "Ipconfig" on the command prompt, it shows this  
Autoconfiguration IPv4 Address. . : 169.254.89.23
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

I have cross verified it shows the above only when I connect LAN cable to my board. But doesn't show my IP Address which I configured.

The Processor is able to communicate with PHY , I could check on my Oscilloscope, the data sent is correct via MDIO and MDC. If I can establish this ping, then I have to create a TCP Server using my board to transfer sensor data to pc and receive command from PC.

 Please Help me through , what am I doing wrong or if there are any bugs in the STM32 libraries etc.