Node not being assigned an ID.



  • Hello again,
    I've got past the issues with the ISR not in IRAM error as in my last thread.

    I'm now using a gateway with ESP8266 firmware ver 2.5.0, as per the workaround in the last thread. The node is a Moteino (using an RFM69 radio).
    I am using the new RFM69 driver.
    However, the node is not managing to get an ID from the gateway. Below, I have included the logs & scripts from the gateway and node.
    If I define a static node ID using #MY_NODE_ID, it works perfectly, but I would quite like the dynamic assigning to work.
    I have been using the EEPROM clear sketch in between tests on both the gateway and the node, so I don't think thats at fault.

    Gateway (ESP8266):

    // 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
    
    
    // For RFM69
    #define MY_RADIO_RFM69
    #define MY_RFM69_NEW_DRIVER
    
    #define MY_RFM69_FREQUENCY RFM69_868MHZ // Set your frequency here
    #define MY_RFM69_IRQ_PIN 4
    #define MY_RFM69_IRQ_NUM MY_RFM69_IRQ_PIN
    #define MY_RFM69_CS_PIN 5 // NSS. Use MY_RFM69_SPI_CS for older versions (before 2.2.0)
    
    #define MY_GATEWAY_ESP8266
    
    #define MY_WIFI_SSID "<snip>"
    #define MY_WIFI_PASSWORD "<snip>"
    
    // 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
    
    #include <ESP8266WiFi.h>
    #include <MySensors.h>
    
    void setup()
    {
    	// Setup locally attached sensors
    }
    
    void presentation()
    {
    	// Present locally attached sensors here
    }
    
    void loop()
    {
    	// Send locally attached sensors data here
    }
    
    52 MCO:BGN:INIT GW,CP=RPNGE---,REL=255,VER=2.3.1
    103 TSF:LRT:OK
    119 TSM:INIT
    133 TSF:WUR:MS=0
    151 TSM:INIT:TSP OK
    172 TSM:INIT:GW MODE
    194 TSM:READY:ID=0,PAR=0,DIS=0
    227 MCO:REG:NOT NEEDED
    scandone
    255 TSM:READY:NWD REQ
    290 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    755 GWT:TIN:CONNECTING...
    1282 GWT:TIN:CONNECTING...
    1810 GWT:TIN:CONNECTING...
    2338 GWT:TIN:CONNECTING...
    2866 GWT:TIN:CONNECTING...
    scandone
    state: 0 -> 2 (b0)
    state: 2 -> 3 (0)
    state: 3 -> 5 (10)
    add 0
    aid 10
    cnt 
    
    connected with <snip>, channel 9
    dhcp client start...
    ip:192.168.43.133,mask:255.255.255.0,gw:192.168.43.1
    3394 GWT:TIN:CONNECTING...
    3422 GWT:TIN:IP: 192.168.43.133
    3456 MCO:BGN:STP
    3474 MCO:BGN:INIT OK,TSP=1
    pm open,type:2 0
    14074 TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    14137 TSF:MSG:BC
    14155 TSF:MSG:FPAR REQ,ID=255
    14186 TSF:PNG:SEND,TO=0
    14212 TSF:CKU:OK
    14229 TSF:MSG:GWL OK
    15195 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    16143 TSF:MSG:READ,255-255-0,s=0,c=3,t=3,pt=0,l=0,sg=0:
    18209 TSF:MSG:READ,255-255-0,s=20,c=3,t=3,pt=0,l=0,sg=0:
    20276 TSF:MSG:READ,255-255-0,s=41,c=3,t=3,pt=0,l=0,sg=0:
    22342 TSF:MSG:READ,255-255-0,s=62,c=3,t=3,pt=0,l=0,sg=0:
    

    Node (Moteino R4):

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Enable and select radio type attached
    //#define MY_RADIO_RF24
    #define MY_RADIO_RFM69
    #define MY_RFM69_NEW_DRIVER
    //#define MY_RADIO_RFM95
    
    // Enabled repeater feature for this node
    #define MY_REPEATER_FEATURE
    
    #include <MySensors.h>
    
    void setup()
    {
    
    }
    
    void presentation()
    {
    	//Send the sensor node sketch version information to the gateway
    	sendSketchInfo("Repeater Node", "1.0");
    }
    
    void loop()
    {
    }
    
    16 MCO:BGN:INIT REPEATER,CP=RPNRA---,REL=255,VER=2.3.1
    26 TSM:INIT
    27 TSF:WUR:MS=0
    29 TSM:INIT:TSP OK
    31 TSM:FPAR
    36 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    1160 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    1165 TSF:MSG:FPAR OK,ID=0,D=1
    2045 TSM:FPAR:OK
    2046 TSM:ID
    2048 TSM:ID:REQ
    2108 TSF:MSG:SEND,255-255-0-0,s=0,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    4115 TSM:ID
    4116 TSM:ID:REQ
    4175 TSF:MSG:SEND,255-255-0-0,s=20,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    6184 TSM:ID
    6185 TSM:ID:REQ
    6245 TSF:MSG:SEND,255-255-0-0,s=41,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    8253 TSM:ID
    8254 TSM:ID:REQ
    8313 TSF:MSG:SEND,255-255-0-0,s=62,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    10322 !TSM:ID:FAIL
    10323 TSM:FAIL:CNT=1
    10326 TSM:FAIL:DIS
    10328 TSF:TDI:TSL
    

    Thanks again for your help!


  • Mod

    @adamant you need a controller to hand out dynamic id's. The gateway will only pass these id requests on to a controller.



  • Oh damn, I feel thick right now. Thanks, that is totally obvious in hindsight.


  • Mod

    @adamant this is a very common mistake. Not sure we can do anything useful with the log message itself (it needs to be kept compact to fit all debug messages in flash), but I have created a pull request to add a clearer message in the log parser.

    https://github.com/mysensors/MySensors/pull/1339



  • which controller do currently support the auto-id assignment?

    Is this meant by "node ID generation" in the Controller comparison table?


  • Mod

    @mkaiser yes, that's correct


Log in to reply
 

Suggested Topics

7
Online

11.4k
Users

11.1k
Topics

112.7k
Posts