Receiving but !TSM:UPL:FAIL and no communication? 2.1.1 issue?



  • Hi there,

    I want to get started with mysensors but it doesn't want to work. GW is a Nodemcu with MQTT, Client is a Pro Mini clone. Radio is Adafruit 433Mhz breakout board.

    Gateway log:

    1384, room 16 
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGE--,VER=2.1.1
    0;255;3;0;9;TSF:LRT:OK
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    scandone
    f 0, .0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    ...scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 3
    cnt 
    
    connected with wlanbt, channel 1
    dhcp client start...
    .0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    ....ip:192.168.1.57,mask:255.255.255.0,gw:192.168.1.1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    .IP: 192.168.1.57
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    IP: 192.168.1.57
    0;255;3;0;9;Attempting MQTT connection...
    0;255;3;0;9;MQTT connected
    0;255;3;0;9;Sending message on topic: mygateway1-out/0/255/0/0/18
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    pm open,type:2 0
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    0;255;3;0;9;!TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
    0;255;3;0;9;TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=1,HP=1
    

    Client log:

    MCO:BGN:INIT NODE,CP=RRNNA--,VER=2.1.1
    10 TSM:INIT
    12 TSF:WUR:MS=0
    16 TSM:INIT:TSP OK
    18 TSM:INIT:STATID=1
    20 TSF:SID:OK,ID=1
    22 TSM:FPAR
    22 TSM:FPAR:STATP=0
    26 TSM:ID
    26 TSM:ID:OK
    28 TSM:UPL
    161 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    2168 TSM:UPL
    2299 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=NACK:1
    4308 TSM:UPL
    4440 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=2,st=NACK:1
    6447 TSM:UPL
    6578 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=3,st=NACK:1
    8585 !TSM:UPL:FAIL
    8587 TSM:FPAR
    8587 TSM:FPAR:STATP=0
    8589 TSM:ID
    8591 TSM:ID:OK
    8593 TSM:UPL
    8726 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=4,st=NACK:1
    10733 TSM:UPL
    10864 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=5,st=NACK:1
    12871 TSM:UPL
    13004 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=6,st=NACK:1
    15011 TSM:UPL
    15142 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=7,st=NACK:1
    17152 !TSM:UPL:FAIL
    17154 TSM:FPAR
    17154 TSM:FPAR:STATP=0
    17158 TSM:ID
    17158 TSM:ID:OK
    17160 TSM:UPL
    17295 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=8,st=NACK:1
    19302 TSM:UPL
    19435 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=9,st=NACK:1
    21442 TSM:UPL
    21573 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=10,st=NACK:1
    23580 TSM:UPL
    23711 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=11,st=NACK:1
    25718 !TSM:UPL:FAIL
    25720 TSM:FPAR
    25720 TSM:FPAR:STATP=0
    25724 TSM:ID
    25724 TSM:ID:OK
    25726 TSM:UPL
    

    It seems the GW receives data, but something fails. Can anyone tell me what causes this?
    Maybe a 2.1.1 issue?

    GW and Client code is here: https://gist.github.com/solars/8644c5e310c63cecf93d86dc76955d68



  • You issue is on GW. Node ping GW, GW recieve ping but pong response is never recieve by node.
    NodeMCU and especially Chinese clone doesn't have a good 3.3V regulator. Try to power your radio module with external 3.3V (but connect GND together).
    I highly recommand you to use another device like Wemos for GW



  • Thanks for the reply @Fabien

    I'm using this breakout board: https://www.adafruit.com/product/3071 - as far as I understood it has a regulator, is this not sufficient?


  • Mod

    In case of communication problems with wireless modules, adding a cap on vcc it is always a good thing to try



  • Forget the cap with RFM69 modules. Did you put a one wire antenna (164.7 mm) ?
    Regulator on breakout board is ok. And what about your VIN power ? Is it sufficient ?
    Can you post photo of your GW ?



  • @Fabien, thanks for your help!

    The antenna is 164.7mm yes.
    Regarding VIN - what's ideal to use here? I'm not sure how much power it needs, I've got a bunch of USB power supplies
    that I tried.

    Pictures of the GW and RFM69 Module:
    https://www.dropbox.com/sh/txuqvkk1di9awj9/AABpvof5jKt2nq5Vd2rvFrn4a?dl=0

    I would really appreciate if anyone could help me get this to run 😕



  • Actually you are powering your RFM69 with your 3V from your NodeMCU. It cannot work because you have a 3.3V regulator on the RFM69 board AND 3.3V on NodeMCU is not very good.
    First you can try to move your red wire from 3V to VIN on the NodeMCU side. It can works f you use a good USB power supply (1A min).
    Just another tip : check in your gateway sketch you have #define MY_IS_RFM69HW



  • VIN on the Nodemcu produces WDT resets, not sure why.

    I've now connected the RFM69 to the 5V output of a Wemos D1 Mini, and the board via USB.
    I'm still getting the same results: https://gist.github.com/solars/7ed4541372f37166910ca4d1842d8c32

    Trying to use a regulator I have for the breadboard if I find a suitable power supply.

    This is really frustrating.
    I tried with a Wemos D1 Mini earlier - only produces WDT resets.
    Then tried with Arduino Uno + W5100 Ethernet shield, only to find out it's quite complicated
    to get this to run with an RFM69 due to soft spi.

    All I want is get this communication to work..



  • Very strange, I have a wemos mini gateway working fine (With nodeMCU i have a lot of commmunication probelms because of regulator). Do you have other radios for testing ? With your wemos+nodemcu did you connect GND together ?
    Wdt resets probably occurs because your usb power supply isn't sufficent.



  • @Fabien I have now used a second power supply for the RFM69 (5V), USB for the Nodemcu, connected grounds together. But it's still the same..

    I also tried a different radio.

    Do you maybe have a picture how you connected the Wemos D1 Mini and sketch used? I guess I just had a wiring problem with the wemos.
    I would like to try again.



  • I just build a new one because I bought a sensebender Gateway !
    So my new setup :

    RFM69 -> Wemos Mini D1
    SS -> GPIO16 (D0)
    SCK -> GPIO14 (D5)
    MISO -> GPIO12 (D6)
    MOSI -> GPIO13 (D7)
    IRQ -> GPIO15 (D8)
    

    Connect GND and 5V power (in my case I Don't use breakout board but direct connection to RFM69

    Sketch :

    #define MY_DEBUG
    
    // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
    #define MY_BAUD_RATE 9600
    
    #define MY_RADIO_RFM69
    #define MY_RF69_IRQ_PIN 15
    #define MY_RF69_SPI_CS 16
    #define MY_RF69_IRQ_NUM 15
    
    #define MY_GATEWAY_ESP8266
    #define MY_ESP8266_SSID "Fab-WLAN"
    #define MY_ESP8266_PASSWORD "password"
    
    #define MY_PORT 5003
    #define MY_GATEWAY_MAX_CLIENTS 2
    
    #include <ESP8266WiFi.h>
    #include <MySensors.h>
    
    void setup() {
    }
    void presentation() {
    }
    void loop() {
    }
    

    With your Breakout board you must add : #define MY_IS_RFM69HW

    And now the log with some testing sensors :

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGE--,VER=2.1.0-beta
    0;255;3;0;9;TSF:LRT:OK
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 5
    cnt
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    īŋŧ
    f r0,
    connected with Fab-WLAN, channel 1
    dhcp client start...
    scandone
    ..ip:192.168.1.55,mask:255.255.255.0,gw:192.168.1.1
    .IP: 192.168.1.55
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    pm open,type:2 0
    0;255;3;0;9;TSF:MSG:READ,15-15-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
    0;255;3;0;9;TSF:MSG:READ,15-15-0,s=3,c=1,t=16,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:READ,15-15-0,s=3,c=1,t=16,pt=1,l=1,sg=0:0
    


  • @Fabien thanks a lot!

    I've set it up like you now, but now the GW doesn't seem to read any messages... damn
    https://gist.github.com/solars/823bc62306909efd3fbb1a66b5211b31

    Any idea what's wrong again now?



  • @chbla I gave up on the 2.1.1 library, and tried with 2.0.0. Then everything start working 😄



  • In your gateway your don't #define MY_RFM69_FREQUENCY RF69_433MHZ . By default it sets to RF69_868MHZ



  • @Fabien said in Receiving but !TSM:UPL:FAIL and no communication? 2.1.1 issue?:

    In your gateway your don't #define MY_RFM69_FREQUENCY RF69_433MHZ . By default it sets to RF69_868MHZ

    Oh my god! What an incredible stupid mistake!
    I wasted all this time trying to get the NodeMCU to work only because I forgot that setting in my initial Wemos Sketch...
    It's finally working now.. haha. Let me know when you're in Austria @Fabien you deserve a beer 🙂

    @Johannes-Hodne thanks for the suggestion but it's finally working now 🙂



  • Great! I might have to give the 2.1.1 library another try.



  • @chbla Good news ! Now you can play with sensors !


Log in to reply
 

Suggested Topics

10
Online

11.4k
Users

11.1k
Topics

112.7k
Posts