ESP8266 failing with pm open,type:2 0

  • The GW has been working just fine for that last few days, but when I rebooted it today, I now get the "pm open,type:2 0" from the ESP8266. When this happen, the GW stops working... Re building and loading of new code has same problem.
    I have tried 3 different ESP8266

    Any ideas on what is the root cause??


    GatewayESP8266MQTTClient with RFM95 radio
    Using beta 2.1. as of 1Dec2016
    IDE 1.6.13

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RLNGE--,VER=2.1.0-beta
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 2
    connected with lafleur, channel 1
    dhcp client start...
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    pm open,type:2 0       <-----------------------------
    0;255;3;0;9;!TSM:INIT:TSP FAIL
     * TRL Ver 1 01 Dec 2016
     * MySensor 2.1b as of 23 Nov 2016
    #include <ESP8266WiFi.h>
    // Enable debug prints to serial monitor
    #define MY_DEBUG
    //#define MY_SPECIAL_DEBUG
    #define MY_DEBUG_VERBOSE_RFM95
    #if defined(ARDUINO_ARCH_ESP8266)
    #error This program requires an ESP8266 CPU
    //#define MY_DEFAULT_RX_LED_PIN   16
    #define MY_DEFAULT_TX_LED_PIN     16
    //#define MY_DEFAULT_ERR_LED_PIN  26
    // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
    #define MY_BAUD_RATE 115200
    // Enables and select radio type (if attached)
    #define MY_RADIO_RFM95
    // Pin's defined below are for ESP8266
    //#define MY_RFM95_RST_PIN RFM95_RST_PIN
    #define MY_RFM95_IRQ_PIN                15
    #define MY_RFM95_SPI_CS                 2
    #define MY_RFM95_TX_POWER               23  // max is 23
    //#define MY_RFM95_ATC_MODE_DISABLED
    #define MY_RFM95_ATC_TARGET_RSSI        (-60)
    #define MY_RFM95_FREQUENCY              (915.0f)
    #define MY_GATEWAY_ESP8266
    // Set this node's subscribe and publish topic prefix
    #define MY_MQTT_PUBLISH_TOPIC_PREFIX   "MG1-out"
    // Set MQTT client id
    #define MY_MQTT_CLIENT_ID "mysensors-2"
    // Enable these if your MQTT broker requires usenrame/password
    //#define MY_MQTT_USER "username"
    //#define MY_MQTT_PASSWORD "password"
    // Set WIFI SSID and password
    #define MY_ESP8266_SSID "test"
    #define MY_ESP8266_PASSWORD ""
    // Set the hostname for the WiFi Client. This is the hostname
    // it will pass to the DHCP server if not static.
    // #define MY_ESP8266_HOSTNAME "mqtt-sensor-gateway"
    // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
    #define MY_IP_ADDRESS 192, 94, 167, 42
    // If using static ip you need to define Gateway and Subnet address as well
    #define MY_IP_GATEWAY_ADDRESS 192, 94, 167, 4
    #define MY_IP_SUBNET_ADDRESS 255,255,255,0
    // MQTT broker ip address.
    #define MY_CONTROLLER_IP_ADDRESS 192, 94, 167, 32
    // The MQTT broker port to to open
    #define MY_PORT 1883
    #define MY_PARENT_NODE_ID   0
    // Enable inclusion mode
    // Enable Inclusion mode button on gateway
    // Set inclusion mode duration (in seconds)
    // Digital pin used for inclusion mode button
    // Set blinking period
    // Flash leds on rx/tx/err
    #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
    /* ************************************************************************************** */
    // All #define above need to be prior to #include <MySensors.h> below
    #include <MySensors.h>
     // this is part of MySensor core 
    void before() 
      Serial.println ("In before");
      //WiFi.mode(WIFI_AP);    // : set mode to WIFI_AP, WIFI_STA, or WIFI_AP_STA or WIFI_OFF
    void setup() 
      Serial.println("In Setup");
    void presentation() 
      // Present locally attached sensors here
    void loop() 
      // Send locally attach sensors data here

  • @lafleur I am having almost an identical problem. Did you ever find a solution for this?

  • @lafleur I also see "pm open,type:2 0". Did you happen to install the ping pong sketch?

    probably not related but I'm using an RFM69 with the ESP8266.

    0;255;3;0;9;No registration required
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
    0;255;3;0;9;Attempting MQTT connection...
    0;255;3;0;9;MQTT connected
    pm open,type:2 0

  • I am also experiencing this using Sonoff relay sketch for ESP8266, any news on how to fix it?

  • Mod

    I had a similar problem with MySensors >= 2.1.0. Switching to 2.0.0 made it go away. Maybe worth trying, at least to verify if 2.1 has a problem.

    The gateway rebooted every time a node sent a message.

    0;255;3;0;9;332 MCO:BGN:INIT GW,CP=RNNGE---,VER=2.2.0-beta
    0;255;3;0;9;338 TSF:LRT:OK
    0;255;3;0;9;341 TSM:INIT
    0;255;3;0;9;343 TSF:WUR:MS=0
    0;255;3;0;9;351 TSM:INIT:TSP OK
    0;255;3;0;9;354 TSM:INIT:GW MODE
    0;255;3;0;9;357 TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;361 MCO:REG:NOT NEEDED
    0;255;3;0;14;Gateway startup complete.
    0;255;3;0;9;364 MCO:BGN:STP
    force slp enable,type: 2
    fpm open,type:2 0
    0;255;3;0;9;4902 MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;38508 TSF:MSG:READ,1-1-0,s=5,c=1,t=16,pt=1,l=1,sg=0:1
    Fatal exception 3(LoadStoreErrorCause):
    epc1=0x4021dca2, epc2=0x00000000, epc3=0x00000000, excvaddr=0x40234734, depc=0x00000000
    Exception (3):
    epc1=0x4021dca2 epc2=0x00000000 epc3=0x00000000 excvaddr=0x40234734 depc=0x00000000
    ctx: cont 
    sp: 3ffefc00 end: 3ffeff70 offset: 01a0

  • Mod

    @mfalkvidd MySensors has a dependency for ESP8266 on the ESP Arduino version, as it duplicates the startup code.
    I'd suggest to try with MySensors 2.1.x and ESP8266 2.3.0 board support and fix any issues we run into.

  • I have tried to use 2.0 but still get the same response: pm open,type:2 0 in serial monitor. strangely I get no other serial responses, just that. Do I have to set debug on in the board settings?
    I can ping the sonoff so I know it's connected. What am I missing?

  • See this remark:

    @tekka said in MySensors 2.0.0 Released:

    @mpp said in MySensors 2.0.0 Released:

    pm open,type:2 0

    This is a message emitted by the ESP8266 core, not MySensors related.

    I suggest you add the following to enable debugging on the serial interface:

    #define MY_DEBUG

    Also tripple check your wiring, it seems to make the ESP very unstable if there's a loose/bad connection. TSM:FAIL:CNT could indicate a problem with the radio/transmission.

Log in to reply

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.