Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. ESP8266 CH340 Error on gateway

ESP8266 CH340 Error on gateway

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 4 Posters 997 Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SAm85
    wrote on last edited by mfalkvidd
    #1

    Hello,
    I use a esp8266 de type CH340 NodeMcu V3 .

    here is my code:

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
    #define MY_BAUD_RATE 9600
    
    // Enables and select radio type (if attached)
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    //#define MY_RADIO_RFM95
    
    #define MY_GATEWAY_ESP8266
    
    #define MY_WIFI_SSID "yyyyyyy"
    #define MY_WIFI_PASSWORD "xxxxxx"
    
    // Enable UDP communication
    //#define MY_USE_UDP  // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS below
    
    // Set the hostname for the WiFi Client. This is the hostname
    // it will pass to the DHCP server if not static.
    //#define MY_HOSTNAME "sensor-gateway"
    
    // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
    //#define MY_IP_ADDRESS 192,168,1,102
    
    // If using static ip you can define Gateway and Subnet address as well
    //#define MY_IP_GATEWAY_ADDRESS 192,168,1,254
    //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
    
    // The port to keep open on node server mode
    #define MY_PORT 5003
    
    // How many clients should be able to connect to this gateway (default 1)
    #define MY_GATEWAY_MAX_CLIENTS 2
    
    // Controller ip address. Enables client mode (default is "server" mode).
    // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
    //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
    
    // Enable inclusion mode
    //#define MY_INCLUSION_MODE_FEATURE
    
    // Enable Inclusion mode button on gateway
    //#define MY_INCLUSION_BUTTON_FEATURE
    // Set inclusion mode duration (in seconds)
    //#define MY_INCLUSION_MODE_DURATION 60
    // Digital pin used for inclusion mode button
    //#define MY_INCLUSION_MODE_BUTTON_PIN D1
    
    // Set blinking period
    //#define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    // Flash leds on rx/tx/err
    // Led pins used if blinking feature is enabled above
    //#define MY_DEFAULT_ERR_LED_PIN 16  // Error led pin
    //#define MY_DEFAULT_RX_LED_PIN  16  // Receive led pin
    //#define MY_DEFAULT_TX_LED_PIN  16  // the PCB, on board LED
    
    #if defined(MY_USE_UDP)
    #include <WiFiUdp.h>
    #endif
    
    #include <ESP8266WiFi.h>
    #include <MySensors.h>
    
    #define CHILD_ID 30
    volatile uint32_t watt = 10;
    MyMessage msgContacteur(CHILD_ID, V_TRIPPED);
    //uint32_t SEND_FREQUENCY = 20000; // Minimum time between send (in milliseconds). We don't want to spam the gateway.
    
      MyMessage wattMsg(CHILD_ID,V_WATT);
      MyMessage kWhMsg(CHILD_ID,V_KWH);
      MyMessage pcMsg(CHILD_ID,V_VAR1);
      
    void setup()
    {
    	// Setup locally attached sensors
    }
    
    void presentation()
    {
    	sendSketchInfo("MySensors Watt", "1.0");
        present(CHILD_ID, S_POWER);
    
    }
    
    void loop()
    {
    	// Send locally attached sensors data here
      send(wattMsg.set(watt));  // Send watt value to gw
                  Serial.print("Watt:");
                Serial.println(watt);
    }
    

    here are the errors:

    90 TSF:LRT:OK
    105 TSM:INIT
    119 TSF:WUR:MS=0
    142 !TSM:INIT:TSP FAIL
    166 TSM:FAIL:CNT=1
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 3
    cnt 
    
    connected with yyyyyyyyyy, channel 1
    dhcp client start...
    334 TSM:FAIL:DIS
    352 TSF:TDI:TSL
    ip:192.168.1.102,mask:255.255.255.0,gw:192.168.1.254
    10370 TSM:FAIL:RE-INIT
    10394 TSM:INIT
    10415 !TSM:INIT:TSP FAIL
    10441 TSM:FAIL:CNT=2
    10463 TSM:FAIL:DIS
    10483 TSF:TDI:TSL
    

    do you have an idea about the problem?

    cordially

    Y J 2 Replies Last reply
    0
    • S SAm85

      Hello,
      I use a esp8266 de type CH340 NodeMcu V3 .

      here is my code:

      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
      #define MY_BAUD_RATE 9600
      
      // Enables and select radio type (if attached)
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      //#define MY_RADIO_RFM95
      
      #define MY_GATEWAY_ESP8266
      
      #define MY_WIFI_SSID "yyyyyyy"
      #define MY_WIFI_PASSWORD "xxxxxx"
      
      // Enable UDP communication
      //#define MY_USE_UDP  // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS below
      
      // Set the hostname for the WiFi Client. This is the hostname
      // it will pass to the DHCP server if not static.
      //#define MY_HOSTNAME "sensor-gateway"
      
      // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
      //#define MY_IP_ADDRESS 192,168,1,102
      
      // If using static ip you can define Gateway and Subnet address as well
      //#define MY_IP_GATEWAY_ADDRESS 192,168,1,254
      //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
      
      // The port to keep open on node server mode
      #define MY_PORT 5003
      
      // How many clients should be able to connect to this gateway (default 1)
      #define MY_GATEWAY_MAX_CLIENTS 2
      
      // Controller ip address. Enables client mode (default is "server" mode).
      // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
      //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
      
      // Enable inclusion mode
      //#define MY_INCLUSION_MODE_FEATURE
      
      // Enable Inclusion mode button on gateway
      //#define MY_INCLUSION_BUTTON_FEATURE
      // Set inclusion mode duration (in seconds)
      //#define MY_INCLUSION_MODE_DURATION 60
      // Digital pin used for inclusion mode button
      //#define MY_INCLUSION_MODE_BUTTON_PIN D1
      
      // Set blinking period
      //#define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      // Flash leds on rx/tx/err
      // Led pins used if blinking feature is enabled above
      //#define MY_DEFAULT_ERR_LED_PIN 16  // Error led pin
      //#define MY_DEFAULT_RX_LED_PIN  16  // Receive led pin
      //#define MY_DEFAULT_TX_LED_PIN  16  // the PCB, on board LED
      
      #if defined(MY_USE_UDP)
      #include <WiFiUdp.h>
      #endif
      
      #include <ESP8266WiFi.h>
      #include <MySensors.h>
      
      #define CHILD_ID 30
      volatile uint32_t watt = 10;
      MyMessage msgContacteur(CHILD_ID, V_TRIPPED);
      //uint32_t SEND_FREQUENCY = 20000; // Minimum time between send (in milliseconds). We don't want to spam the gateway.
      
        MyMessage wattMsg(CHILD_ID,V_WATT);
        MyMessage kWhMsg(CHILD_ID,V_KWH);
        MyMessage pcMsg(CHILD_ID,V_VAR1);
        
      void setup()
      {
      	// Setup locally attached sensors
      }
      
      void presentation()
      {
      	sendSketchInfo("MySensors Watt", "1.0");
          present(CHILD_ID, S_POWER);
      
      }
      
      void loop()
      {
      	// Send locally attached sensors data here
        send(wattMsg.set(watt));  // Send watt value to gw
                    Serial.print("Watt:");
                  Serial.println(watt);
      }
      

      here are the errors:

      90 TSF:LRT:OK
      105 TSM:INIT
      119 TSF:WUR:MS=0
      142 !TSM:INIT:TSP FAIL
      166 TSM:FAIL:CNT=1
      scandone
      state: 0 -> 2 (b0)
      state: 2 -> 3 (0)
      state: 3 -> 5 (10)
      add 0
      aid 3
      cnt 
      
      connected with yyyyyyyyyy, channel 1
      dhcp client start...
      334 TSM:FAIL:DIS
      352 TSF:TDI:TSL
      ip:192.168.1.102,mask:255.255.255.0,gw:192.168.1.254
      10370 TSM:FAIL:RE-INIT
      10394 TSM:INIT
      10415 !TSM:INIT:TSP FAIL
      10441 TSM:FAIL:CNT=2
      10463 TSM:FAIL:DIS
      10483 TSF:TDI:TSL
      

      do you have an idea about the problem?

      cordially

      Y Offline
      Y Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @sam85 said in ESP8266 CH340 Error on gateway:

      10415 !TSM:INIT:TSP FAIL

      Hi and welcome to the forum!

      TSP FAIL indicates a problem with the radio communication. Triple check your wiring or try with a different radio.

      http://yveaux.blogspot.nl

      1 Reply Last reply
      1
      • mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        or add // before #define MY_RADIO_NRF24 if you don't plan to use a radio.

        1 Reply Last reply
        1
        • S SAm85

          Hello,
          I use a esp8266 de type CH340 NodeMcu V3 .

          here is my code:

          // Enable debug prints to serial monitor
          #define MY_DEBUG
          
          // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
          #define MY_BAUD_RATE 9600
          
          // Enables and select radio type (if attached)
          #define MY_RADIO_NRF24
          //#define MY_RADIO_RFM69
          //#define MY_RADIO_RFM95
          
          #define MY_GATEWAY_ESP8266
          
          #define MY_WIFI_SSID "yyyyyyy"
          #define MY_WIFI_PASSWORD "xxxxxx"
          
          // Enable UDP communication
          //#define MY_USE_UDP  // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS below
          
          // Set the hostname for the WiFi Client. This is the hostname
          // it will pass to the DHCP server if not static.
          //#define MY_HOSTNAME "sensor-gateway"
          
          // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
          //#define MY_IP_ADDRESS 192,168,1,102
          
          // If using static ip you can define Gateway and Subnet address as well
          //#define MY_IP_GATEWAY_ADDRESS 192,168,1,254
          //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
          
          // The port to keep open on node server mode
          #define MY_PORT 5003
          
          // How many clients should be able to connect to this gateway (default 1)
          #define MY_GATEWAY_MAX_CLIENTS 2
          
          // Controller ip address. Enables client mode (default is "server" mode).
          // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
          //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
          
          // Enable inclusion mode
          //#define MY_INCLUSION_MODE_FEATURE
          
          // Enable Inclusion mode button on gateway
          //#define MY_INCLUSION_BUTTON_FEATURE
          // Set inclusion mode duration (in seconds)
          //#define MY_INCLUSION_MODE_DURATION 60
          // Digital pin used for inclusion mode button
          //#define MY_INCLUSION_MODE_BUTTON_PIN D1
          
          // Set blinking period
          //#define MY_DEFAULT_LED_BLINK_PERIOD 300
          
          // Flash leds on rx/tx/err
          // Led pins used if blinking feature is enabled above
          //#define MY_DEFAULT_ERR_LED_PIN 16  // Error led pin
          //#define MY_DEFAULT_RX_LED_PIN  16  // Receive led pin
          //#define MY_DEFAULT_TX_LED_PIN  16  // the PCB, on board LED
          
          #if defined(MY_USE_UDP)
          #include <WiFiUdp.h>
          #endif
          
          #include <ESP8266WiFi.h>
          #include <MySensors.h>
          
          #define CHILD_ID 30
          volatile uint32_t watt = 10;
          MyMessage msgContacteur(CHILD_ID, V_TRIPPED);
          //uint32_t SEND_FREQUENCY = 20000; // Minimum time between send (in milliseconds). We don't want to spam the gateway.
          
            MyMessage wattMsg(CHILD_ID,V_WATT);
            MyMessage kWhMsg(CHILD_ID,V_KWH);
            MyMessage pcMsg(CHILD_ID,V_VAR1);
            
          void setup()
          {
          	// Setup locally attached sensors
          }
          
          void presentation()
          {
          	sendSketchInfo("MySensors Watt", "1.0");
              present(CHILD_ID, S_POWER);
          
          }
          
          void loop()
          {
          	// Send locally attached sensors data here
            send(wattMsg.set(watt));  // Send watt value to gw
                        Serial.print("Watt:");
                      Serial.println(watt);
          }
          

          here are the errors:

          90 TSF:LRT:OK
          105 TSM:INIT
          119 TSF:WUR:MS=0
          142 !TSM:INIT:TSP FAIL
          166 TSM:FAIL:CNT=1
          scandone
          state: 0 -> 2 (b0)
          state: 2 -> 3 (0)
          state: 3 -> 5 (10)
          add 0
          aid 3
          cnt 
          
          connected with yyyyyyyyyy, channel 1
          dhcp client start...
          334 TSM:FAIL:DIS
          352 TSF:TDI:TSL
          ip:192.168.1.102,mask:255.255.255.0,gw:192.168.1.254
          10370 TSM:FAIL:RE-INIT
          10394 TSM:INIT
          10415 !TSM:INIT:TSP FAIL
          10441 TSM:FAIL:CNT=2
          10463 TSM:FAIL:DIS
          10483 TSF:TDI:TSL
          

          do you have an idea about the problem?

          cordially

          J Offline
          J Offline
          JPe4619
          wrote on last edited by
          #4

          @sam85 #if defined(MY_USE_UDP) // is it defined somewhere?

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          14

          Online

          12.1k

          Users

          11.2k

          Topics

          113.4k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular