Hello,
I am trying to make an Access Point + UDP server using AT commands.
In short, it works, but I cannot control the ESP8266 local port, because it is set at random by the chip.
I want to make a server with a known, fixed port, so that remote clients can initiate the connection (i.e. access it without having to know that random port).
The commands I use are:
AT+CWMODE=2 (or 3)
AT+CIPMUX=0
AT+CIPSTART="UDP","192.168.4.2",50000
-> at that point, I have to use AT+CIPSTATUS to get the ESP8266 port number.
then AT+CIPSEND etc work
Any idea? Thanks!
ESP8266: How to set the local port in UDP?
Re: ESP8266: How to set the local port in UDP?
Postby Her Mary » Tue Mar 27, 2018 6:50 pm
I think it is the AT+CIPSTART="UDP","192.168.4.2",50000,<local port> you can add the local port at last, it is defined in the doc. https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf
Who is online
Users browsing this forum: No registered users and 142 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
-
- All times are UTC+08:00
- Top
- Delete all board cookies
- 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.