Chat freely about anything...

User avatar
By Makuna
#14526
whiledo wrote:... create an UDP Server need to use the AT+CIPSERVER ... but it is not the right way.
So if someone else is still struggling with this matter I can say to you that the right command to use is AT+CIPSTART…..


I looked at the document and I see the extra params, but I am trying to make sense of how to use this to open a UDP server socket/connection.

AT+CIPSTART=0,UDP,<remote ip?>,<remote port?>,<local port>

How are "remote ip" and "remote port" used for a UDP server?
User avatar
By Jan Marius Evang
#14695 Marius-MacBook-Pro:~ janmariusevang$ cat ./findmyesp.sh
#!/bin/bash
# findMYPi.sh:
# Find all MY Pi's on the LAN

#grep broadcast ip
var1=$(ifconfig | grep inet | tail -1 | awk '{print $6}' | cut -f2 -d: | cut -f1-3 -d.)

#ping all ip's on the network
for i in {1..255}; do (ping -c 1 -W 1 $var1.$i &) ; done >/dev/null
sleep 1
#grep MY ESPs
arp -a | grep "18:fe"
User avatar
By gerardwr
#14701
Jan Marius Evang wrote:Marius-MacBook-Pro:~ janmariusevang$ cat ./findmyesp.sh


Works excellent, thanks for sharing.

Takes 15 seconds before the ESP's on my network are listed, output looks like:
Code: Select allimac-van-gerard:~ gerard$ ./findmyesp.sh
? (192.168.1.100) at 18:fe:34:9f:xx:yy on en1 ifscope [ethernet]
? (192.168.1.101) at 18:fe:34:9a:xx:yy on en1 ifscope [ethernet]
imac-van-gerard:~ gerard$
User avatar
By gerardwr
#14702
whiledo wrote:Hi,

I noticed that it is not possible to create an UDP server on the ESP8266.
Could someone suggest me the best way to find an ESP8266 module previously registered on my network (only STA mode)?
How I can find them without the possibility to send an UDP broadcast message?

Any idea?


In the meantime in the ESP8266-Arduino environment UDP is working OK.

I created a UDP Multicast example that can be used a basis for ESP-discovery here:
viewtopic.php?f=29&t=2464