BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk Edgent Arduino Library example won't switch to AP mode

Hello Community,
I followed the instruction to download the blynk library and launch the edgent and I got about 6 tabs of code.

I input my template ID and my firmware ID as well. I ran it on my nodemcu board and I was able to connect to my device using the old app.

This was awesome at first but now, I have been trying to run the code again and each time, it still trying to connect to my old wifi.

I don’t want this. I want my device to be in AP mode so I can connect to a different wifi. I don’t know how to do this. I have gone through the code but don’t know how to tell the code to return back to AP mode after few tries connecting to the previous wifi.

Which board type did you uncomment?
If you’ve told it to use NodeMCU then pressing the right hand button on the board should put it into config mode.

Pete.

Is it just the base edgent example or have you added in any of your own code yet?

Still the base. I haven’t added any code. Thanks for the prompt reply.

Thanks for the prompt reply. The board I am using is NodeMCU.

I’m not that familiar with the NodeMCU boards or ESP8266’s in general but is there a chance you have your previous credentials stuck in flash?

I’d try running the esptool erase_flash and trying again, alternatively Pete’s, and quicker would be Pete’s suggestion which uses one of the boards buttons to reboot it in AP mode.

If you decide to go the esptool route and you don’t have it:

So does that mean that you un-commented #define USE_NODE_MCU_BOARD in Edgent_ESP8266.ino ?

If so, then pressing the FLASH button on the board should put it into config mode.

Pete.

Yes Pete. I uncommented USE_NODE_MCU_BOARD in Edgent_ESP8266.ino.
Is there an extra code I can put in to say, after this many tries connecting to the last known wifi, set wifi status back to AP mode? Thank you.

Thank you for your contributions, hms11.

What happens if you press and hold the FLASH button for > 10 seconds?

Pete.

Thank you Pete, that seems to work. Thank you so very much.