0

I want to listen to UDP packets from a single IP address (in my example the PC). Using LWIP 2.1:

udp_bind(upcb, IP_ADDR_ANY, PORT)

Allows me to receive data from PC on IP 192.168.1.2 (for example)

However using:

uint8_t BytesIP[4];
BytesIP[0] = 192;
BytesIP[1] = 168;
BytesIP[2] = 1;
BytesIP[3] = 2;
ip4_addr_t ip;
IP4_ADDR(&ip, BytesIP[0], BytesIP[1], BytesIP[2], BytesIP[3]);
udp_bind(upcb, &ip, PORT)

Doesn't receive anything (doesn't trigger the callback).

Why? What's the difference?

TIA.

Currently using LWIP RAW API, Hercules Setup Utility and STM32 Cube HAL.

Lunch
  • 3
  • 2

0 Answers0