Page 1 of 1

Sending or Receiving data over UDP/TCP

Posted: Wed Aug 16, 2023 6:55 am
by Vineethad
Hello,


I am using ESP32-C6 module and the tool is ESP IDF with VSCode.

How to send or receive data over TCP/UDP protocol ?

Please find me the solution.

Thanks.

Re: Sending or Receiving data over UDP/TCP

Posted: Wed Aug 16, 2023 11:38 am
by MicroController

Re: Sending or Receiving data over UDP/TCP

Posted: Thu Aug 17, 2023 6:29 am
by Vineethad
Hi Everyone,


I am trying with UDP Client example but it is unable to connect to the host. It's showing like "connecting to host...." and "waiting for IP...." . Why it is showing like this ?

Actually I am new to this ESP32 WIFI modules so please help me...

Thanks in Advance.

Re: Sending or Receiving data over UDP/TCP

Posted: Thu Aug 17, 2023 10:29 am
by MicroController
Post the actual log output you get.

Re: Sending or Receiving data over UDP/TCP

Posted: Thu Aug 17, 2023 11:23 am
by Vineethad
Actual log output is below attached file.

Re: Sending or Receiving data over UDP/TCP

Posted: Sat Aug 19, 2023 9:22 am
by MicroController
Apparently, the ESP already fails to connect to your WiFi. Double-check that the SSID and password are correct; then check that your WiFi is set to allow the new device to connect. Try to improve the WiFi signal by moving the ESP closer to the access point.

Re: Sending or Receiving data over UDP/TCP

Posted: Mon Aug 21, 2023 5:21 am
by Vineethad
I checked the SSID and Password of my WiFi network is correct. I followed the all the instructions as you said but I am still getting the same result.


Thank you.

Re: Sending or Receiving data over UDP/TCP

Posted: Mon Aug 21, 2023 8:17 am
by Yuvaraj1867
Hi,

The example UDP_Client working fine with ESP32-C6 module. Make sure your password is not less than 8 character.

Code: Select all

I (631) wifi:mode : sta (40:4c:ca:41:ca:60)
I (631) wifi:enable tsf
I (631) example_connect: Connecting to Uchi...
I (641) example_connect: Waiting for IP(s)
I (3041) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1
I (3041) wifi:(connect)dot11_authmode:0x3, pairwise_cipher:0x3, group_cipher:0x3
I (3821) wifi:state: init -> auth (b0)
I (3821) wifi:state: auth -> assoc (0)
I (3831) wifi:Extended Capabilities length:8, subtype:0x10, b0:4e:26:03:37:1f, Operating mode notification Support
I (3831) wifi:state: assoc -> run (10)
I (3831) wifi:(trc)phytype:CBW20-SGI, snr:60, maxRate:144, highestRateIdx:0
I (3841) wifi:(trc)rate(S-MCS7, schedIdx:0), ampdu(rate:S-MCS7, schedIdx(0, stop:8)), snr:60, ampduState:wait operational
I (3851) wifi:ifidx:0, rssi:-38, nf:-98, phytype(0x3, CBW20-SGI), phymode(0x3, 11bgn), max_rate:1440, he:0
I (3861) wifi:max ampdu length exponent:3(65535 bytes), mmss:6(8 us)
W (3861) wifi:<ba-add>idx:0, ifx:0, tid:0, TAHI:0x1001f37, TALO:0x3264eb0, (ssn:0, win:64, cur_ssn:0), CONF:0xc0000005
I (3891) wifi:(extcap)mbssid:0, enhanced_mbssid_advertise:0, complete_nontxbssid_profiles:0
I (3891) wifi:connected with Uchi, aid = 3, channel 1, BW20, bssid = b0:4e:26:03:37:1f
I (3901) wifi:cipher(pairwise:0x3, group:0x3), pmf:0, security:WPA2-PSK, phy:11bgn, rssi:-38
I (3901) wifi:pm start, type: 1, itwt_start:0

Re: Sending or Receiving data over UDP/TCP

Posted: Mon Aug 21, 2023 10:55 am
by Vineethad
My password is more than 8 character. But still I am getting same .