Hi,
I am new to this forum, i hope this is the right place to ask this question.
We use the ESP8266 on a controller board, and control it with AT commands over the uart.
It works as a server on a single UDP port and requests are send to the controller board from Android apps, we can have several apps communicating simultaneously. This works perfectly, and we are very satisfied.
However we have one problem, it seems we cannot fix. Right now each client/app appends its ipaddress and port to the request, we need to do that to be able to tell where to respond. However, if the device is behind a NAT router, this will not work. If we could see the udp header, and thus the ip address and port number for each request, then we could respond back to the correct ip address/port, and NAT will work.
So my question is basically, how do i, with AT commands, get the UDP header of an incoming request to determine the ip address and port to respond back to? I know that if i have only one device communicating, then it will automatically set the ip address and port, but with simultaneous devices communication, we cannot rely on that.
Thank you in advance. If its not possible, what is our next step? Should we build a custom firmware etc?
Regards Jens
UDP header
-
- Posts: 7
- Joined: Thu Jun 23, 2016 5:12 pm
Re: UDP header
Postby Her Mary » Mon Jul 11, 2016 10:21 am
Hi,
Command “AT+CIPSTATUS” can get the information of remote IP and port.
Command "AT+CIPSEND=[<link ID>,]<length>[,<remote IP>,<remote port>]" can send UDP data to the target remote IP and port.
Command “AT+CIPSTATUS” can get the information of remote IP and port.
Command "AT+CIPSEND=[<link ID>,]<length>[,<remote IP>,<remote port>]" can send UDP data to the target remote IP and port.
-
- Posts: 7
- Joined: Thu Jun 23, 2016 5:12 pm
Re: UDP header
Postby stokersoft » Mon Aug 15, 2016 8:19 pm
Thank you so much - but also this command
AT+CIPDINFO=1
Enables the IP and port for each incomming packet, just what we need.
Thanks.
AT+CIPDINFO=1
Enables the IP and port for each incomming packet, just what we need.
Thanks.
Who is online
Users browsing this forum: No registered users and 189 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.