!TSM:FPAR:FAIL



  • Hi- I created a simple DHT22 node and an ethernet gateway. It worked well for a few weeks... until I moved the gateway and the sensor.

    The sensor log shows:

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT

    The gateway log shows:

    0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    0;255;3;0;9;TSM:READY
    IP: 192.168.1.20
    0;255;3;0;9;No registration required
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
    IP: 192.168.1.20
    0;255;3;0;9;Attempting MQTT connection...
    0;255;3;0;9;MQTT connected

    ...so this implies the problem is on the sensor side, correct? Using that logic, I rebuilt the sensor with an Easy PCB board, a new radio, and new arduino and get the exact same error!

    I've got a 10uf cap on the radio power. I've switched out the power supply several times... it's currently on a 5v 2a supply. I've also switched out the supply on the gw side, but that's about all I've done there.

    The code (on both sides) is the example code.

    Ideas? Thanks!



  • Have you tried hardcoding the sensor node ID? I've had a same issue and after hardcoding the ID the node was able to communicate with GW. Not sure why, maybe a bug?

    #define MY_NODE_ID <node ID here>
    

    ex) #define MY_NODE_ID 11



  • Thanks for the reply! It didn't seem affect much... I changed the code to look like this:

    ...
    
    #define MY_NODE_ID 5
    #define CHILD_ID_HUM 0
    #define CHILD_ID_TEMP 1
    
    ...
    

    Which caused the compiler to throw this warning:

    ^

    In file included from C:\Users\Michael\Documents\Arduino\libraries\MySensors/core/MySensorsCore.h:25:0,
    from C:\Users\Michael\Documents\Arduino\libraries\MySensors/MySensors.h:28,
    from C:\Users\Michael\Documents\Arduino\MysensorsDHT22Node\MysensorsDHT22Node.ino\MysensorsDHT22Node.ino.ino:43:
    C:\Users\Michael\Documents\Arduino\libraries\MySensors/MyConfig.h:136:0: note: this is the location of the previous definition
    #define MY_NODE_ID AUTO
    ^

    ...it still compiled, but the serial monitor still shows the same errors.



  • Open this file:

    C:\Users\Michael\Documents\Arduino\libraries\MySensors/MyConfig.h

    ...and comment out this line.

    #define MY_NODE_ID AUTO
    

    Compiler is complaining about "MY_NODE_ID" being defined multiple times (AUTO and 5). Actually, if you want to be absolutely sure, check other libraries (all .h files listed in your error msg) and comment out the same line if found.



  • Thanks again for your time!

    The change caused an error:

    In file included from C:\Users\Michael\Documents\Arduino\libraries\MySensors/MySensors.h:253:0,
    from C:\Users\Michael\Documents\Arduino\MysensorsDHT22Node\MysensorsDHT22Node.ino\MysensorsDHT22Node.ino.ino:43:
    C:\Users\Michael\Documents\Arduino\libraries\MySensors/core/MyTransport.cpp: In function 'void stInitTransition()':
    C:\Users\Michael\Documents\Arduino\libraries\MySensors/core/MyTransport.cpp:72:8: error: 'MY_NODE_ID' was not declared in this scope
    if (MY_NODE_ID != AUTO) {
    ^

    Here is the altered code:

    /**
     * @def MY_NODE_ID
     * @brief Node id defaults to AUTO (tries to fetch id from controller).
     */
    #ifndef MY_NODE_ID
    //#define MY_NODE_ID AUTO
    #endif
    


  • Sorry, looks like some of the other files may actually need the MY_NODE_ID declared in order to function properly. Just comment it out from this file only and see what happens.

    C:\Users\Michael\Documents\Arduino\libraries\MySensors/MyConfig.h



  • That was the only file I had edited. 🙂


  • Plugin Developer

    @mnelson

    You should not comment lines in MyConfig.h. The library has been designed to be able to override all settings in the config file from the sketch.

    You get an issue when compiling cause you've added the setting MY_NODE_ID after including MySensors.h. All defines that start with MY should come before including MySensors.h.


  • Plugin Developer

    Regarding the comm issue, I think you are correct in assuming it might be power related. Follow the troubleshooting schema here:
    https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help.

    I'd continue by trying a higher value cap, maybe 100 uF, by the radio. Change power level of radio in defines. Then exchange radio for another one. Then move the node farther and closer from the gateway etc. If you don't get any replies from the node on the gateway side, the issue is probably on the node side. But if you don't solve problems after trying everything on node side, check gateway side too.



  • Thanks! I resolved it last night... the problem turned out to be on the gateway side, I think.

    I disconnected and reconnected all of the wires and when it came back up, the debug log showed signs that they were talking. 🙂

    You are correct, the MY_NODE_ID line was too far down in the code... I made a lucky guess and moved it up higher and then it started working.

    Thanks for your help!!


Log in to reply
 

Suggested Topics

13
Online

11.4k
Users

11.1k
Topics

112.7k
Posts