Place to put your Basic demos and examples

Moderator: Mmiscool

User avatar
By Electroguard
#49701 @russm, you mention subnet address of 192.168.1 in your code, but 192.168.10 in the posting, and I have no way of being sure which is correct and which is a typo.
Therefore in order to try your script I reverted back to assuming an ESP_Basic default AP address of 192.168.4.1 - and find that your script runs correctly and does what is expected, so I suggest you should start by doing likewise.
I modded your script to use the ESP_Basic default AP subnet broadcast address of 1902.168.4.255. Run it, then click Local Set button in debugger utility, which should then set the utility to local address of 192.168.4.2
Once you've got your node broadcasting on the same subnet as the utility is configured for, it should then receive your udp incrementing counts. I've added a udpreply "stopped" acknowledgement for obvious clarity.

Code: Select all'listening port
udpbegin 5001
ret = " "
'where the program will branch on UDP message reception
udpbranch [udp]
for i = 1 to 10000
udpwrite "192.168.4.255", 5001, str(i)
serialprintln ret
next i
end

[udp]
ret = udpread()
if ret = "stop" then
 udpreply "stopped"
 end
endif
return
User avatar
By forlotto
#49888
@russm, you mention subnet address of 192.168.1 in your code, but 192.168.10 in the posting, and I have no way of being sure which is correct and which is a typo.
Therefore in order to try your script I reverted back to assuming an ESP_Basic default AP address of 192.168.4.1 - and find that your script runs correctly and does what is expected, so I suggest you should start by doing likewise.
I modded your script to use the ESP_Basic default AP subnet broadcast address of 1902.168.4.255. Run it, then click Local Set button in debugger utility, which should then set the utility to local address of 192.168.4.2
Once you've got your node broadcasting on the same subnet as the utility is configured for, it should then receive your udp incrementing counts. I've added a udpreply "stopped" acknowledgement for obvious clarity. - See more at: viewtopic.php?f=40&t=9451&start=8#sthash.81G9AjKp.dpuf


May want to change the bold type so we don't get someone confused on this one. Yeah these small quirks are easy to run into if you don't pay attention to detail especially when you run many lines of code like electroguard does I run into them with my small bits of code I do. So I can only imagine when you get into pages long it is easy to leave a thing or two out here and there to leave you stumped start simple then build on it is my motto rather than let her rip and sift.