espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
12.93k stars 7.1k forks source link

Socket,UDP Cann't get dada (IDFGH-13190) #14128

Open henry1960 opened 6 days ago

henry1960 commented 6 days ago

Answers checklist.

IDF version.

IDF 5.2

Espressif SoC revision.

ESP32C6

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

CMD

Development Kit.

ESP32-C6-DevKitC-1

Power Supply used.

USB

What is the expected behavior?

I what to get a answer from espressif.

What is the actual behavior?

A udp client project was normally completed ,but it can NOT receive data,.

Steps to reproduce.

After the App is started, server can get data form the Kit, bet server get nothing from Kit.

Debug Logs.

No response

More Information.

No response

nopnop2002 commented 6 days ago

There are four ways to specify UDP addresses: ・Limited broadcast address ・Directed broadcast address ・Multicast address ・Unicast address

You need to understand this difference.

Communication is not possible if the sender and receiver are different.

henry1960 commented 6 days ago

It's no matter about IP address, because data server can get data from udp client, but udp client can not get data from data server. The Kit gets IP address from DHCP server , the data server too. they connect to same router.

nopnop2002 commented 6 days ago

https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets/udp_client

https://github.com/espressif/esp-idf/tree/master/examples/protocols/sockets/udp_server

henry1960 commented 6 days ago

Thank you,I'll test the samples tomorrow.