Report Bugs Here

Moderator: Mmiscool

User avatar
By rodrigocirilo
#56187 Hello. I ask your help because I made a small code to be able to trigger an LED (pin 2 nodemcu ESP12E) and accessing the local network works and nodemcu responds to the request.

Then I opened a router port and dedicated to an ip that gave the ESP. Then I do access via smarfone (4G internet) and access to the page ESPbasic he already is to run automatically program.bas, so I send command and esp does not respond !! I wonder why?

Here the code:

let pinNo = 2
let pinstat = 0
print "porta"
textbox pinNo
print "status"
textbox pinstat
button "aciona",[SetThePin]
button "exit",[TestExit]
wait

[SetThePin]
io(po,pinNo,pinstat)
if pinstat = 0 then
pinstat = 1
else
pinstat = 0
end if
wait

[TestExit]
end
User avatar
By Mmiscool
#56199 You need to port forward port 80 qnd 81 on your router in order to access the web interface from an external ip address. You can then send from your external ip address.
User avatar
By rodrigocirilo
#56206 I forward port 8282 to the IP ESP, and the settings settings esp I put this IP and this port. I can access the inerface an external IP, but the small command code I have done, which is to light the LED pin 2 nodemcu not work.

Since the local network it triggers normal.

look:
Image
User avatar
By Oldbod
#56256 As you're using a nodemcu, how about putting some serialprint commands in at various points in your program to show whats being activated when? A simple terminal emulator is all you need to see them, if you haven't used one before I've been using this https://sites.google.com/site/terminalbpp/ for a few weeks - it works fine.

Mimiscool posted a very simple example for this a while back, which showed how to access an internal esp8266 then from that unit control a second esp8266 and blink the led. I simplified that even further to blink the led on the first unit accessed. It works fine using ports 80 and 81. I'd get it working that way, then think about changing your port numbers.

Is it that the led doesnt blink, or that you don't get the communications to your phone that you expect?