Issue after updating from 1.5 to 2.1.1

  • Hi all,

    in my house i have a set of 10 sensors that work on aruino nano's with a custom pinout for the sensor. It works in combination with the NRF24L01 (a expensive one for my gateway and the sensor in the barn) rest are just cheap ones to messure temperate and control relays.

    Lately i am having some issues with relays turning on and off without a signal from my gateway. So i wanted to update my firmware before i spend a lot of time debugging and checking why i have these issues.

    I use a custom pinout as i have the radio soldered directly onto the nano to save space.

    so in my sketch of the gateway.

    * The MySensors Arduino library handles the wireless radio link and protocol
    * between your home built sensors/actuators and HA controller of choice.
    * The sensors forms a self healing radio network with optional repeaters. Each
    * repeater and gateway builds a routing tables in EEPROM which keeps track of the
    * network topology allowing messages to be routed to nodes.
    * Created by Henrik Ekblad <>
    * Copyright (C) 2013-2015 Sensnology AB
    * Full contributor list:
    * Documentation:
    * Support Forum:
    * This program is free software; you can redistribute it and/or
    * modify it under the terms of the GNU General Public License
    * version 2 as published by the Free Software Foundation.
    * The ArduinoGateway prints data received from sensors on the serial link.
    * The gateway accepts input on seral which will be sent out on radio network.
    * The GW code is designed for Arduino Nano 328p / 16MHz
    * Wire connections (OPTIONAL):
    * - Inclusion button should be connected between digital pin 3 and GND
    * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
    * LEDs (OPTIONAL):
    * - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs
    * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
    * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
    * - ERR (red) - fast blink on error during transmission error or recieve crc error
    // Enable debug prints to serial monitor
    #define MY_DEBUG
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    // Set LOW transmit power level as default, if you have an amplified NRF-module and
    // power your radio separately with a good regulator you can turn up PA level.
    #define MY_RF24_PA_LEVEL RF24_PA_MAX
    // Enable serial gateway
    // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
    //#if F_CPU == 8000000L
    //#define MY_BAUD_RATE 38400
    // Enable inclusion mode
    // Enable Inclusion mode button on gateway
    // Inverses behavior of inclusion button (if using external pullup)
    // Set inclusion mode duration (in seconds)
    // Digital pin used for inclusion mode button
    // Set blinking period
    // Inverses the behavior of leds
    //10 irq  11 mosi  12 csn  7 ce  8 sck  9 miso 
    #define MY_RF24_CE_PIN 7
    #define MY_RF24_CS_PIN 12
    #define MY_SOFT_SPI_SCK_PIN 8
    #define MY_SOFT_SPI_MOSI_PIN 11
    #define MY_SOFT_SPI_MISO_PIN 9
    //#define MY_RF24_IRQ_PIN 10
    #include <MySensors.h>
    void setup()
    	// Setup locally attached sensors
    void presentation()
    	// Present locally attached sensors
    void loop()
    	// Send locally attached sensor data here

    I have added a custom pinout that used to work with version 1.5 but when i startup it gives the following error.

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
    0;255;3;0;9;!TSM:INIT:TSP FAIL

    Is it possible that i am using a pin that i'm not allowed to use or should i add more configuration to get this to work.

    Any help is welcome.

    Thanks in advance.

  • After adding the following param to my sketch i get a bit more debugging data.

    #define MY_DEBUG_VERBOSE_RF24
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
    0;255;3;0;9;RF24:write register, reg=0, value=14
    0;255;3;0;9;RF24:write register, reg=3, value=3
    0;255;3;0;9;RF24:write register, reg=4, value=95
    0;255;3;0;9;RF24:write register, reg=5, value=76
    0;255;3;0;9;RF24:write register, reg=6, value=39
    0;255;3;0;9;RF24:write register, reg=16, value=115
    0;255;3;0;9;RF24:write register, reg=29, value=6
    0;255;3;0;9;RF24:read register, reg=6, value=255
    0;255;3;0;9;RF24:read register, reg=5, value=255
    0;255;3;0;9;!RF24:INIT:SANCHK FAIL
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;RF24:write register, reg=0, value=12

  • Any luck? I got the same error. Sitting debugging now, but can't seem to figure it out.

  • Admin


    @tekka optimized the NRF driver significantly between release 1.5.1 and 2.1.1 allowing the driver to push the radio a bit harder resulting in higher current-draw spikes. I experienced the same issue with nodes that had been running for several years but failing miserably after simply upgrading to the newer library. What I had to do was ensure that I had an adequate current supply for the radio to cope with the larger current-draw spikes. This included adding a 47uf capacitor across the NRF VCC and GND pin (actually @tekka recommended 100uf) and in one case swapping out a 3.3v LDO for a higher current LDO. So I would suggest that you first eliminate NRF power/current supply issues first. Additional background about NRF power needs are available here -

    By the way, the new MySensors Gateway that @tbowmo developed has no problem driving an NRF24L01+ PL/NA+ radio at high power.

  • I'm Having The Identical Problem Too....

    I upgraded my gateway (ESP8266) ok and was communicating ok with my ver 1.5 sensors.

    However, all eleven sensor nodes produce the dreaded "!TSM:INIT:TSP FAIL".

    My sensor nodes are a mix of Arduino 2011, Pro, Pro-Mini (3.3v and 5v). The RF24's are 4 by Sparkfun, 3 by quality radios with SMA antennas and the rest are low cost RF24's. All nodes have been running fine for two years.

    Suspecting a software issue, I setup Arduino on a new laptop, installed the latest Ver 2 MySensors library and tried compiling and uploading several examples from the new library folder. This clean install, plus using library examples eliminated software / configuration issues, so I looked into the hardware...

    As for power issues, three of my nodes run on 5 Amp Lipo batteries dropped to 3.3v via a 2 Amp on EACH node. I had 4.7 uf caps on them, and have now tried 47uf, 100uf and 220uf caps, but no change.

    For the record, I have made nodes by selecting all 'the best bits' to produce two nodes of the best combination of radios, cpu's and power supply, but the error persists.

    My key point is:
    Every comment I have found re this problem indicates a power issue, but having three nodes each having their own solid 2 Amp, clean power supply, I must conclude there is another problem causing this error.

    Would appreciate any advice...



  • Admin

    @AffordableTech Which version of the Arduino IDE and AVR Boards version are you using? There have been issues due to a gcc compiler bug that could be worked-around by downgrading the AVR boards version. If you are using the latest Arduino IDE and AVR Boards revision, then that is not your root cause.

  • Admin

    @AffordableTech said in Issue after updating from 1.5 to 2.1.1:

    However, all eleven sensor nodes produce the dreaded "!TSM:INIT:TSP FAIL".

    This indicates a wiring/configuration error rather than a power issue. Please post your sketch and describe your HW setup/radio wiring.

  • Thanks @blacey, my Arduino IDE is 1.8.2 and AVR Boards is 1.6.18

    I will try downgading one or two versions and see how it goes. Failing that, I will try a fresh install of everything again.



  • Hi @tekka ,

    As stated, "All nodes have been running fine for two years" and were/are wired as per MySensors web wiring instructions. If I upload sketches again from my PC with MySensors 1.5 and Arduino 1.65, they init fine and work reliable as before (without any changes to wiring).

    When you say "describe your HW setup", I'm not quite sure what your require? Do you need the specific configuration/wiring of the various eleven nodes, or are your referring to the development PC which the Arduino IDE is running on?

    As all eleven nodes work fine when sketches are compiled with MySensors 1.5 using IDE 1.65, I'll assume you need the PC hardware config.

    It's a Dell Vestro, running Win 10 - 64 bit, with 4 Gig memory. I can upload a detailed SystemInfo report if you need more info, please let me know.

    As mentioned, I installed latest Arduino (1.8.2) and MySensors 2.1.1 library onto a new (virgin) laptop and got the same errors as that config produced on my main development PC.

    My understanding is the wiring is the same for MySensors 1.5 and 2.x.x, is this1 incorrect?

    I'm going to return the laptop to factory state with the recovery DVD and try d/loading latest 'development' branch and see if that helps.



  • Admin

    @AffordableTech said in Issue after updating from 1.5 to 2.1.1:

    Hi @tekka ,

    When you say "describe your HW setup", I'm not quite sure what your require? Do you need the specific configuration/wiring of the various eleven nodes, or are your referring to the development PC which the Arduino IDE is running on?

    Paul, @tekka was asking about your node h/w configuration; in particular how the radio is wired. The Arduino IDE and Boards Manager that you are using should be fine.

Log in to reply

Suggested Topics

  • 5
  • 11
  • 6
  • 2
  • 33
  • 2
  • 7
  • 2