Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By dpap
#85932 Hi, i'm a novice in the IoT and i'm trying to explore it.
My trivial sketch allows updates from WiFi and I want to protect my project from unauthorized access.
So i want to disable completely the serial comunication (USB) by the uploaded sketch and, if possible, force USB to not consunes power from battery.
Is these posiible, please ?
User avatar
By QuickFix
#85956 Not sure what you're trying to achieve, but from what I can decipher:
  • The ESP8266 doesn't have USB, only a UART (serial) port.
    You probably have a development board with an integrated USB - UART convertor
    If you don't want the convertor to draw any power, simple choose a board without one (or use a plain ESP-12)
  • The ESP8266 doesn't have a feature to protect your code (ie. a code fuse).
    Even "Worse": the code isn't even stored inside the ESP, but in external (unprotected) flash memory; one can easily read the chip if wanted.
User avatar
By dpap
#85958 Thank you for your response.
Yes, I use a deployment board with a built-in USB-UART converter. I need the inverter to upload the first sketch and after that I don't need it and want to turn it off so that no one will be able to reprogram it except by OTA access. I also want to limit power consumption since I no longer need the inverter.
User avatar
By QuickFix
#85969 As the name suggests a development board is to develop software and/or hardware, after that you can use your own (hardware) design that incorporates an ESP8266 module and flash the firmware once over UART by using some pads on your PCB and pogo-pins, just like with (almost) all commercial products (like in Sonoff modules).