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

OTA serial monitor

ota
telnet
serial-monitor

#1

if you need to see your serial data in OTA mode, you need Putty https://www.putty.org/ and this sketch. :wink:

Don’t forget to replace all your Serial.Print with SerialOTA.print

 /***************  Telnet *********************/
WiFiServer TelnetServer(23); // Telnet Server Declaration port 23
WiFiClient SerialOTA;     // Telnet Client Declaration 
bool haveClient = false; client detection flag


/*************** Setup *********************/
void setup()
{
//after OTA setup

timer.setInterval(1000L, UpTime);

/*************** Telnet  *********************/
  TelnetServer.begin();
  TelnetServer.setNoDelay(true);
//end setup

void loop() {
  timer.run();
  Blynk.run();
  ArduinoOTA.handle();  // For OTA

// Handle new/disconnecting clients.
  if (!haveClient) {
    // Check for new client connections.
    SerialOTA = TelnetServer.available();
    if (SerialOTA) {
      haveClient = true;
      Blynk.setProperty(Vx, "color", BLYNK_GREEN); //TELNET LED ON
    }
  } else if (!SerialOTA.connected()) {
    // The current client has been disconnected.
    SerialOTA.stop();
    SerialOTA = WiFiClient();
    haveClient = false;
    Blynk.setProperty(Vx, "color", DARK_RED);  //TELNET LED OFF
  }
}


void UpTime() { // to print something 

SerialOTA.print("time: ");
  SerialOTA.println(millis());
}

Video_00390 Video_00389


Blynk-ser(ial) port to android
#2

Hey Alexis, do you find that this works well?
I tried this approach a while ago, and didn’t find that it worked very well for me. From memory, I had to keep restarting the ESP when the PC went to sleep.

Pete.


#3

hey Pete,

it runs fine for me.
no need to reset my nodmcu.
I also downloaded the Android version of putty.


#4

Don’t use the “A” word!!!
:skull_and_crossbones: :skull_and_crossbones: :skull_and_crossbones:

Pete.


#5

can I use Ondroid instead ? :rofl:


#6

Apple :stuck_out_tongue_winking_eye: