ESP8266 Developer Zone The Official ESP8266 Forum 2018-03-27T18:50:39+08:00 https://bbs.espressif.com:443/feed.php?f=16&t=9424 2018-03-27T18:50:39+08:00 2018-03-27T18:50:39+08:00 https://bbs.espressif.com:443/viewtopic.php?t=9424&p=19799#p19799 <![CDATA[Re: ESP8266: How to set the local port in UDP?]]> https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf

Statistics: Posted by Her Mary — Tue Mar 27, 2018 6:50 pm


]]>
2018-03-22T01:43:47+08:00 2018-03-22T01:43:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=9424&p=19725#p19725 <![CDATA[ESP8266: How to set the local port in UDP?]]> 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!

Statistics: Posted by Gaston06 — Thu Mar 22, 2018 1:43 am


]]>