Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
joaoabsJ

joaoabs

@joaoabs
About
Posts
97
Topics
24
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Is MySensors RPI GW 32bit only?
    joaoabsJ joaoabs

    @joaoabs Got it. It doesn't compile if we don't replace the RFM69_MAX_PACKET_LEN (0x40ul) :)

    And I can confirm that the procedure above worked. Compiled directly in a RPI4 with 64bit OS.

    pi@raspberrypi:~ $ file /usr/local/bin/mysgw
    /usr/local/bin/mysgw: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=beb479db20a0f93b0fc004832e06c8213d779bb6, for GNU/Linux 3.7.0, with debug_info, not stripped
    
    
    Troubleshooting

  • Is MySensors RPI GW 32bit only?
    joaoabsJ joaoabs

    @Dragos-Pascale said in Is MySensors RPI GW 32bit only?:

    in hal/transport/RFM69/driver/new/RFM69_new.h you must also replace
    #define RFM69_MAX_PACKET_LEN (0x40u) with
    #define RFM69_MAX_PACKET_LEN (0x40ul)
    if you are using RFM69 radio

    @Dragos-Pascale Why that change? What is the behavior if you don't do it?

    Troubleshooting

  • 💬 Relay
    joaoabsJ joaoabs

    Hi,
    Trying to go deep on the API and come this this doubt: The second example (with button) the child seems to be declared as "S_LIGHT" and the receiving messages are "V_LIGHT", while the first example seems better suitable for a relay (child as "S_BINNARY" and requests as "V_STATUS").
    I haven't found any "S_LIGHT" or "V_LIGHT" in the API, only "S_LIGHT_LEVEL" and "V_LIGHT_LEVEL". What is the most suitable type for a relay node with a local button?

    Announcements

  • [Solved] How to check RFM69 is a HW model ?
    joaoabsJ joaoabs

    Hi,

    By the PCB silk I was wrongly thinking that the module could be on of "RFM69" or "RFM69H" or "RFM69W" and "RFM69HW".

    Now if I understood correctly the diagram, the module can only be either the "RFM69W" (low power 13dBm) or the "RFM69HW" (high power 20dBm).

    Since this module has the "H" marked it should be "RFM69HW" and that is confirmed by the other side of it, because it has the two additional black ICs.

    Thanks!

    rfm69-2.jpg

    Hardware

  • [Solved] How to check RFM69 is a HW model ?
    joaoabsJ joaoabs

    Resuscitating this old post...

    Not sure which type is my RFM69.

    It isn't marked as "RFM69HW" neither simply as "RFM69". It seems it is a "RFM69H" (no W).

    Is there any flag like "MY_IS_RFM69H" (without "W") ? :grinning:

    What should I use for this one? I'm getting erratic behavior in both flag options (with "MY_IS_RFM69HW")....

    rfm69.jpg

    Hardware

  • Is it possible to request sensor status (via MQTT)?
    joaoabsJ joaoabs

    Hi,

    I'm testing a dual-SSR node connected to 220v (therefore, never sleeping).
    The node data is the following:

    Node ID: 80
    Childs:
    * HTU21 TEMP: 20
    * HTU21 HUM: 40
    * SSR1: 10
    * SSR2: 11
    

    Following the MySensors API structure

    Node-ID   /   Child-ID   /  Command   /  Ack   / Type  / Payload
    

    I believe I'm able to set a relay via MQTT with the command line command:

    mosquitto_pub -d -h 192.168.2.180 -u myuser -P mypass -t mysensors-in/80/10/1/1/2 -m "0"
    

    and get (what I believe its the confirmation):

    pi@raspberrypi:~ $ mosquitto_sub -h 192.168.2.180 -p 1883 -u myuser -P mypass -t mysensors-out/80/# -d
    Client mosqsub|5920-raspberryp sending CONNECT
    Client mosqsub|5920-raspberryp received CONNACK (0)
    Client mosqsub|5920-raspberryp sending SUBSCRIBE (Mid: 1, Topic: mysensors-out/80/#, QoS: 0)
    Client mosqsub|5920-raspberryp received SUBACK
    Subscribed (mid: 1): 0
    
    
    Client mosqsub|5920-raspberryp received PUBLISH (d0, q0, r0, m0, 'mysensors-out/80/10/1/1/2', ... (1 bytes))
    0
    

    I don't have at the moment anything connected to the relay to confirm if its switching or not, so I was trying to use the "request" command to request the child statuses.

    Something like:

    mosquitto_pub -d -h 192.168.2.180 -u myuser -P mypass -t mysensors-in/80/10/2/1/2 -m ""
    
    

    Even trying to request temperature statuses:

    pi@raspberrypi:~/mysensors-back $ mosquitto_pub -d -h 192.168.2.180 -u myuser -P mypass -t mysensors-in/80/20/2/1/0 -m ""
    
    

    but I'm not getting anything:

    Client mosqsub|6459-raspberryp received PUBLISH (d0, q0, r0, m0, 'mysensors-out/80/20/2/1/0', ... (0 bytes))
    Client mosqsub|6459-raspberryp received PUBLISH (d0, q0, r0, m0, 'mysensors-out/80/10/2/1/2', ... (0 bytes))
    

    I've read in the API documentation that the "request" command is "usually from an actuator destined for controller" so I'm wondering if it would be just "usually" or definitely "uniquelly" :blush: . Would there be any way of "asking" the sensors their statuses (via MQTT)?

    Cheers

    Troubleshooting

  • MQTT GW with RFM69 on RPi
    joaoabsJ joaoabs

    @Yveaux Hello, Any update if this is an issue or just a cosmetic log thing? Cheers

    Troubleshooting

  • Soldering a coax cable to RFM69
    joaoabsJ joaoabs

    Hi,

    What do you think about this?
    Wanted to increase the GW range so trying to use a bigger 433MHz antenna.
    Would this be the correct way to make it?

    alt text

    Comment/suggestions will be welcomed

    My Project

  • Can a node request a status from other node?
    joaoabsJ joaoabs

    Hello,

    I'd like to have a "6 button node" that will control lights (in other nodes). Since some lights are far away (not visible), I'm thinking in putting there a led just to signal if the light is currently on or off.

    For this to happen, I guess I'll have to request the status of each light every time a button is pressed (or pool it every 10m or so).

    Is this possible? How?

    Thanks

    Feature Requests

  • 💬 My Slim 2AA Battery Node
    joaoabsJ joaoabs

    Hi @m26872

    Congrats for the great and simple design.
    I've been troubleshooting this slimnode with RFM69 radios and realized that a shunt between RFM69's DIO0 and Mega328's INT0 is required, otherwise the node will not "hear" the gateway. Even if the nrf2rmf69 board is used this shunt is required.
    It seems this is a re-current issue. Although this may be solved in the PCB2.0 could it be mentioned somewhere in the page above?

    Thanks and cheers!

    OpenHardware.io arduino mysensors low power battery enclosure nrf24l01

  • Can't receive parent answer
    joaoabsJ joaoabs

    @frits I think you are right!

    I admit initially I didn't thought it could be that because I have a slim node working 100%, but after your comment, I checked it and there is in fact a shunt between INT0 and DIO0 (I must have done it last year or so and didn't remember). The other nodes I've been trying don't have it, so that's likely the case.

    Maybe the slim node page could have some reference to this?

    I'll solder some shunts and will re-try this evening, but I'm sure that was the problem.

    My slim nodes PCB's are red, but were ordered in 2018. Not sure what PCB release they are, though.

    Thank you very much!

    Troubleshooting

  • Can't receive parent answer
    joaoabsJ joaoabs

    Hi,

    Trying to integrate a basic node but it seems it isn't "hearing" the GW.
    It boots up nicely, starts the signing backend and radio encryption. Then, it tries to find a parent, the gateway answers but it seems it isn't "heard" by the node.

    The node is 2m away from the gateway, I've tried different RFM69HW modules and different PCBs (slim node PCB).
    The node is a slimnode with internal 8MHz clock. Other nodes are working fine with the GW.

    Any idea what can be wrong?

     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RPNNAS-X,FQ=8,REL=255,VER=2.3.2
    40 SGN:PER:OK
    75 SGN:INI:BND OK
    77 TSM:INIT
    79 TSF:WUR:MS=0
    81 TSM:INIT:TSP OK
    83 TSM:INIT:STATID=34
    86 TSF:SID:OK,ID=34
    88 TSM:FPAR
    90 SGN:SGN:NREQ=255
    2095 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4102 !TSM:FPAR:NO REPLY
    4104 TSM:FPAR
    4106 SGN:SGN:NREQ=255
    6109 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8116 !TSM:FPAR:NO REPLY
    8118 TSM:FPAR
    8120 SGN:SGN:NREQ=255
    10123 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    12130 !TSM:FPAR:NO REPLY
    12132 TSM:FPAR
    12134 SGN:SGN:NREQ=255
    14139 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    16146 !TSM:FPAR:FAIL
    16148 TSM:FAIL:CNT=1
    16150 TSM:FAIL:DIS
    16152 TSF:TDI:TSL
    26155 TSM:FAIL:RE-INIT
    26157 TSM:INIT
    26159 TSM:INIT:TSP OK
    26161 TSM:INIT:STATID=34
    26165 TSF:SID:OK,ID=34
    26167 TSM:FPAR
    26169 SGN:SGN:NREQ=255
    28174 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    30181 !TSM:FPAR:NO REPLY
    30183 TSM:FPAR
    30185 SGN:SGN:NREQ=255
    32190 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    34197 !TSM:FPAR:NO REPLY
    34199 TSM:FPAR
    34201 SGN:SGN:NREQ=255
    36206 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    38213 !TSM:FPAR:NO REPLY
    
    Dec 06 19:28:25 DEBUG TSF:MSG:READ,34-34-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Dec 06 19:28:25 DEBUG TSF:MSG:BC
    Dec 06 19:28:25 DEBUG TSF:MSG:FPAR REQ,ID=34
    Dec 06 19:28:25 DEBUG TSF:CKU:OK,FCTRL
    Dec 06 19:28:25 DEBUG TSF:MSG:GWL OK
    Dec 06 19:28:26 DEBUG SGN:SGN:NREQ=34
    Dec 06 19:28:30 DEBUG !TSF:MSG:SEND,0-0-34-34,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    Dec 06 19:28:33 DEBUG TSF:MSG:READ,34-34-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    Dec 06 19:28:33 DEBUG TSF:MSG:BC
    Dec 06 19:28:33 DEBUG TSF:MSG:FPAR REQ,ID=34
    Dec 06 19:28:33 DEBUG TSF:CKU:OK,FCTRL
    Dec 06 19:28:33 DEBUG TSF:MSG:GWL OK
    Dec 06 19:28:34 DEBUG SGN:SGN:NREQ=34
    Dec 06 19:28:38 DEBUG !TSF:MSG:SEND,0-0-34-34,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
    
    
    #define MY_DEBUG //!< Enable debug prints to serial monitor
    
    // RADIO STUFF
    #define MY_RADIO_RFM69 //!< RFM69 radio driver
    #define MY_RFM69_NEW_DRIVER
    #define MY_RFM69_FREQUENCY RFM69_433MHZ 
    #define MY_IS_RFM69HW  
    #define MY_RFM69_ENABLE_ENCRYPTION
    //#define MY_DEBUG_VERBOSE_RFM69
    
    // SIGNING STUFF
    // Select soft/hardware signing method
    #define MY_SIGNING_SOFT //!< Software signing
    //#define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A
    
    // Enable node whitelisting
    //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = 
    #define MY_SIGNING_REQUEST_SIGNATURES //!< destination node signs all messages sent to this node
    
    // SETTINGS FOR MY_SIGNING_SOFT
    //#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed
    
    // SETTINGS FOR MY_SIGNING_ATSHA204
    #ifndef MY_SIGNING_ATSHA204_PIN
    #define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached
    #endif
    #define MY_DEBUG_VERBOSE_SIGNING //!< Enable signing related debug prints to serial monitor
    
    
    
    
    #define MY_NODE_ID 34
    #include <MySensors.h>
    
    #define LOCK_1  3     //!< Arduino Digital I/O pin number for first lock (second on pin+1 etc)
    #define NOF_LOCKS 2   //!< Total number of attached locks
    #define LOCK_LOCK 1   //!< GPIO value to write to lock attached lock
    #define LOCK_UNLOCK 0 //!< GPIO value to write to unlock attached lock
    
    void setup()
    {
    	for (int lock=1, pin=LOCK_1; lock<=NOF_LOCKS; lock++, pin++) {
    		// Set lock pins in output mode
    		pinMode(pin, OUTPUT);
    		// Set lock to last known state (using eeprom storage)
    		digitalWrite(pin, loadState(lock)?LOCK_LOCK:LOCK_UNLOCK);
    	}
    }
    
    void presentation()
    {
    	// Send the sketch version information to the gateway and Controller
    	sendSketchInfo("Secure Lock", "1.0");
    
    	// Fetch lock status
    	for (int lock=1, pin=LOCK_1; lock<=NOF_LOCKS; lock++, pin++) {
    		// Register all locks to gw (they will be created as child devices)
    		present(lock, S_LOCK, "SecureActuator", false);
    	}
    }
    
    /** @brief Sketch execution code */
    void loop()
    {
    }
    
    /**
     * @brief Incoming message handler
     *
     * @param message The message to handle.
     */
    void receive(const MyMessage &message)
    {
    	// We only expect one type of message from controller. But we better check anyway.
    	// And echoed messages are not accepted as control messages
    	if (message.getType()==V_LOCK_STATUS && message.getSensor()<=NOF_LOCKS && !message.isEcho()) {
    		// Change relay state
    		digitalWrite(message.getSensor()-1+LOCK_1, message.getBool()?LOCK_LOCK:LOCK_UNLOCK);
    		// Store state in eeprom
    		saveState(message.getSensor(), message.getBool());
    		// Write some debug info
    		Serial.print("****\n\nIncoming change for lock:");
    		Serial.print(message.getSensor());
    		Serial.print(", New status: ");
    		Serial.println(message.getBool());
        Serial.print("\n\n****\n");
    	}
    }
    
    Troubleshooting

  • How to req actuator status?
    joaoabsJ joaoabs

    Hi,

    I currently have an actuator node working fine with MySensors MQTT Gateway. It is based on the Mysensors Example "SecureActuator".
    I'm able to turn on/off a LED via the commands:

    mosquitto_pub -h 192.168.2.180 -p 1883 -u mysensorsuser -P mysensorspassword -t mysensors-in/33/2/1/1/36 -m "1"
    mosquitto_pub -h 192.168.2.180 -p 1883 -u mysensorsuser -P mysensorspassword -t mysensors-in/33/2/1/1/36 -m "0"
    

    (pretty cool, also integrated with Google Home via NodeRed/NORA - I can say "Hey Google, turn on switch" and it turns on :blush: )

    Anyway, now, I want to request the status of the actuator. According to the Serial API documentation, the request string/topic should be something like 33/2/2/1/36/? where:

    33 - Node ID
    2 - Child ID
    2 - Req command
    1 - Ack required
    36 - V_LOCK_STATUS
    ? - Not sure what payload to specify in a REQ message. Putting it blank.

    This translates to the following MQTT command:

    mosquitto_pub -h 192.168.2.180 -p 1883 -u mysensorsuser -P mysensorspassword -t mysensors-in/33/2/2/1/36 -m "0"
    

    And I'm listening for the answer on mysensors-out/33/2/#:

    mosquitto_sub -h 192.168.2.180 -p 1883 -u mysensorsuser -P mysensorspassword -t mysensors-out/33/2/# -m ""
    

    I can see the node successfully receives the request and answers it, but it seems the payload goes empty:

    1551798 TSF:MSG:READ,0-0-33,s=2,c=3,t=16,pt=0,l=0,sg=1:
    1551804 SGN:SKP:MSG CMD=3,TYPE=16
    1551884 SGN:SKP:MSG CMD=3,TYPE=17
    1552144 TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    1552152 SGN:NCE:XMT,TO=33
    1552211 TSF:MSG:READ,0-0-33,s=2,c=2,t=36,pt=0,l=0,sg=1:
    1552218 SGN:BND:NONCE=C00217CFDA07E9004AFB50A82FDBF9DF70694D160C143A7FFCAAAAAAAAAAAAAA
    1552338 SGN:BND:HMAC=34A3A557133449E969F16377121ECFCCDA8CDD7A86DD4A74B5B482F3A15623F7
    1552347 SGN:VER:OK
    1552349 TSF:MSG:ECHO REQ
    1552353 SGN:SKP:ECHO CMD=2,TYPE=36
    1552588 TSF:MSG:SEND,33-33-0-0,s=2,c=2,t=36,pt=0,l=0,sg=0,ft=0,st=OK:
    

    So, any idea what am I missing here?

    Cheers

    Troubleshooting

  • Anyone using Slimnode (RFM69) with MySensors 2.3.2?
    joaoabsJ joaoabs

    After much tentative-error, found a working setup.
    The drawback is that the node cannot be more that 4m away from the gateway in order to communication flow normally. Could this be bad quality RFM69's?

    I mean, isn't supposed that 433MHz range would be higher than this? I was expecting it to cross walls and so...

    The Slim node is currently powered by a USB/serial adapter (not battery) connected to the laptop so it shouldn't be a low power issue. All nrf2rfm69 modules have a bought 433MHz spiral antenna (like the picture), including the GW and I have also soldered a 10uF SMD tantalum capacitor (smd code 106A) in the back side.

    Antennas picture
    SMD capacitor picture

    Troubleshooting

  • MQTT GW with RFM69 on RPi
    joaoabsJ joaoabs

    @frits

    Don't think so, unless it is set by default.
    The code corresponding to the log:

    /*
     * 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 <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2019 Sensnology AB
     * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * 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.
     *
     *******************************
     */
    /**
     * @ingroup MySigninggrp
     * @{
     * @file SecureActuator.ino
     * @brief Example sketch showing how to securely control locks.
     *
     * This example will remember lock state even after power failure.
     *
     * REVISION HISTORY
     *  - See git log (git log libraries/MySensors/examples/SecureActuator/SecureActuator.ino)
     */
    
    /**
     * @example SecureActuator.ino
     * This example implements a secure actuator in the form of a IO controlled electrical lock.<br>
     * Multiple locks are supported as long as they are on subsequent IO pin indices. The first lock pin
     * is defined by @ref LOCK_1. The number of locks is controlled by @ref NOF_LOCKS .<br>
     * The sketch will require incoming messages to be signed and the use of signing backend is selected
     * by @ref MY_SIGNING_ATSHA204 or @ref MY_SIGNING_SOFT. Hard or soft ATSHA204 signing is supported.<br>
     * Whitelisting can be enabled through @ref MY_SIGNING_NODE_WHITELISTING in which case a single entry
     * is provided in this example which typically should map to the gateway of the network.
     */
    
    #define MY_DEBUG //!< Enable debug prints to serial monitor
    //#define MY_NODE_LOCK_FEATURE //!< Enable lockdown of node if suspicious activity is detected
    
    // RADIO STUFF
    #define MY_RADIO_RFM69 //!< RFM69 radio driver
    #define MY_RFM69_NEW_DRIVER
    #define MY_RFM69_FREQUENCY RFM69_433MHZ 
    //#define MY_IS_RFM69HW  
    #define MY_RFM69_ENABLE_ENCRYPTION
    //#define MY_DEBUG_VERBOSE_RFM69
    
    // SIGNING STUFF
    // Select soft/hardware signing method
    //#define MY_SIGNING_SOFT //!< Software signing
    #define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A
    
    // Enable node whitelisting
    //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
    // Enable this if you want destination node to sign all messages sent to this node.
    #define MY_SIGNING_REQUEST_SIGNATURES //!< destination node signs all messages sent to this node
    
    // SETTINGS FOR MY_SIGNING_SOFT
    //#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed
    
    // SETTINGS FOR MY_SIGNING_ATSHA204
    #ifndef MY_SIGNING_ATSHA204_PIN
    #define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached
    #endif
    #define MY_DEBUG_VERBOSE_SIGNING //!< Enable signing related debug prints to serial monitor
    
    
    #define MY_NODE_ID 33
    
    #include <MySensors.h>
    
    
    #define LOCK_1  3     //!< Arduino Digital I/O pin number for first lock (second on pin+1 etc)
    #define NOF_LOCKS 2   //!< Total number of attached locks
    #define LOCK_LOCK 1   //!< GPIO value to write to lock attached lock
    #define LOCK_UNLOCK 0 //!< GPIO value to write to unlock attached lock
    
    void setup()
    {
    	for (int lock=1, pin=LOCK_1; lock<=NOF_LOCKS; lock++, pin++) {
    		// Set lock pins in output mode
    		pinMode(pin, OUTPUT);
    		// Set lock to last known state (using eeprom storage)
    		digitalWrite(pin, loadState(lock)?LOCK_LOCK:LOCK_UNLOCK);
    	}
    }
    
    void presentation()
    {
    	// Send the sketch version information to the gateway and Controller
    	sendSketchInfo("Secure Lock", "1.0");
    
    	// Fetch lock status
    	for (int lock=1, pin=LOCK_1; lock<=NOF_LOCKS; lock++, pin++) {
    		// Register all locks to gw (they will be created as child devices)
    		present(lock, S_LOCK, "SecureActuator", false);
    	}
    }
    
    /** @brief Sketch execution code */
    void loop()
    {
    }
    
    /**
     * @brief Incoming message handler
     *
     * @param message The message to handle.
     */
    void receive(const MyMessage &message)
    {
    	// We only expect one type of message from controller. But we better check anyway.
    	// And echoed messages are not accepted as control messages
    	if (message.getType()==V_LOCK_STATUS && message.getSensor()<=NOF_LOCKS && !message.isEcho()) {
    		// Change relay state
    		digitalWrite(message.getSensor()-1+LOCK_1, message.getBool()?LOCK_LOCK:LOCK_UNLOCK);
    		// Store state in eeprom
    		saveState(message.getSensor(), message.getBool());
    		// Write some debug info
    		Serial.print("Incoming change for lock:");
    		Serial.print(message.getSensor());
    		Serial.print(", New status: ");
    		Serial.println(message.getBool());
    	}
    }
    
    Troubleshooting

  • MQTT GW with RFM69 on RPi
    joaoabsJ joaoabs

    Also happening in nodes:

     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RPNNAA-X,FQ=8,REL=255,VER=2.3.2
    40 SGN:PER:OK
    69 SGN:INI:BND OK
    71 TSM:INIT
    71 TSF:WUR:MS=0
    75 TSM:INIT:TSP OK
    77 TSM:INIT:STATID=33
    79 TSF:SID:OK,ID=33
    81 TSM:FPAR
    83 SGN:SGN:NREQ=255
    90 ?TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    212 TSF:MSG:READ,0-0-33,s=255,c=3,t=8,pt=1,l=1,sg=1:0
    219 SGN:SKP:MSG CMD=3,TYPE=8
    221 TSF:MSG:FPAR OK,ID=0,D=1
    2099 TSM:FPAR:OK
    2099 TSM:ID
    2101 TSM:ID:OK
    2103 TSM:UPL
    2105 SGN:SKP:MSG CMD=3,TYPE=24
    3133 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    3811 TSF:MSG:READ,0-0-33,s=255,c=3,t=25,pt=1,l=1,sg=1:1
    3817 SGN:SKP:MSG CMD=3,TYPE=25
    3821 TSF:MSG:PONG RECV,HP=1
    3823 TSM:UPL:OK
    3825 TSM:READY:ID=33,PAR=0,DIS=1
    3829 SGN:PRE:SGN REQ
    3831 SGN:PRE:WHI NREQ
    3833 SGN:SKP:MSG CMD=3,TYPE=15
    3872 TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
    3880 SGN:PRE:XMT,TO=0
    3883 SGN:PRE:WAIT GW
    4837 TSF:MSG:READ,0-0-33,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
    4843 SGN:SKP:MSG CMD=3,TYPE=15
    4847 SGN:PRE:SGN REQ,FROM=0
    4851 SGN:SKP:MSG CMD=3,TYPE=16
    4925 TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
    4933 SGN:SGN:NCE REQ,TO=0
    6141 TSF:MSG:READ,0-0-33,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
    6148 SGN:SKP:MSG CMD=3,TYPE=17
    6152 SGN:NCE:FROM=0
    6154 SGN:BND:NONCE=F1D60B20DB00FF5950A64E8FFA7DEDE90956E7505DA37EF4DBAAAAAAAAAAAAAA
    6273 SGN:BND:HMAC=FC296959CE1E51BF6EB60BD781CF1C003FA4E32AF2160D0F813160CCBF1B7095
    6283 SGN:SGN:SGN
    6404 TSF:MSG:SEND,33-33-0-0,s=255,c=0,t=17,pt=0,l=5,sg=1,ft=0,st=OK:2.3.2
    6412 SGN:SKP:MSG CMD=3,TYPE=16
    7460 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
    7467 !SGN:SGN:NCE REQ,TO=0 FAIL
    7471 !TSF:MSG:SIGN FAIL
    8058 TSF:MSG:READ,0-0-33,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
    8065 SGN:SKP:MSG CMD=3,TYPE=17
    8069 SGN:NCE:FROM=0
    8071 SGN:BND:NONCE=DE60142AA1B91F73CB35274D2B050BB8B51D4578E9F32D75CBAAAAAAAAAAAAAA
    8189 SGN:BND:HMAC=AC6BCA42658012BFD9A118AC2F347756D6EB2B3BB5EDB9D6CEE5E5271A136ACB
    8513 TSF:MSG:READ,0-0-33,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
    8519 SGN:SKP:MSG CMD=3,TYPE=17
    8523 SGN:NCE:FROM=0
    8525 SGN:BND:NONCE=DE60142AA1B91F73CB35274D2B050BB8B51D4578E9F32D75CBAAAAAAAAAAAAAA
    8644 SGN:BND:HMAC=AC6BCA42658012BFD9A118AC2F347756D6EB2B3BB5EDB9D6CEE5E5271A136ACB
    9474 SGN:SKP:MSG CMD=3,TYPE=16
    10524 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=2,st=NACK:
    10530 !SGN:SGN:NCE REQ,TO=0 FAIL
    10534 !TSF:MSG:SIGN FAIL
    10536 SGN:SKP:MSG CMD=3,TYPE=16
    11587 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=4,st=NACK:
    11593 !SGN:SGN:NCE REQ,TO=0 FAIL
    11597 !TSF:MSG:SIGN FAIL
    11599 SGN:SKP:MSG CMD=3,TYPE=16
    12650 !TSF:MSG:SEND,33-33-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=6,st=NACK:
    12656 !SGN:SGN:NCE REQ,TO=0 FAIL
    12660 !TSF:MSG:SIGN FAIL
    12662 SGN:SKP:MSG CMD=3,TYPE=16
    13713 !TSF:MSG:SEND,33-33-0-0,s=2,c=3,t=16,pt=0,l=0,sg=1,ft=8,st=NACK:
    13719 !SGN:SGN:NCE REQ,TO=0 FAIL
    13723 !TSF:MSG:SIGN FAIL
    13725 MCO:REG:REQ
    13727 SGN:SKP:MSG CMD=3,TYPE=26
    14467 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=10,st=NACK:2
    14475 !TSM:READY:UPL FAIL,SNP
    14477 TSM:FPAR
    14479 SGN:SGN:NREQ=255
    14487 ?TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=11,st=OK:
    15235 TSF:MSG:READ,0-0-33,s=255,c=3,t=16,pt=0,l=0,sg=1:
    15241 SGN:SKP:MSG CMD=3,TYPE=16
    15321 !TSF:SND:TNR
    15323 !SGN:NCE:XMT,TO=33 FAIL
    16476 !TSF:SND:TNR
    16496 !TSM:FPAR:NO REPLY
    16498 TSM:FPAR
    16500 SGN:SGN:NREQ=255
    16508 ?TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    16805 TSF:MSG:READ,0-0-33,s=255,c=3,t=8,pt=1,l=1,sg=1:0
    16812 SGN:SKP:MSG CMD=3,TYPE=8
    16816 TSF:MSG:FPAR OK,ID=0,D=1
    18479 !TSF:SND:TNR
    18518 TSM:FPAR:OK
    18520 TSM:ID
    18520 TSM:ID:OK
    18522 TSM:UPL
    18524 SGN:SKP:MSG CMD=3,TYPE=24
    19552 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    20289 TSF:MSG:READ,0-0-33,s=255,c=3,t=25,pt=1,l=1,sg=1:1
    20295 SGN:SKP:MSG CMD=3,TYPE=25
    20297 TSF:MSG:PONG RECV,HP=1
    20301 TSM:UPL:OK
    20303 TSM:READY:ID=33,PAR=0,DIS=1
    20307 SGN:PRE:SGN REQ
    20310 SGN:PRE:WHI NREQ
    20312 SGN:SKP:MSG CMD=3,TYPE=15
    20416 TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
    20424 SGN:PRE:XMT,TO=0
    20426 SGN:PRE:WAIT GW
    20430 !MCO:WAI:RC=1
    20432 !MCO:PRO:RC=1
    20434 !MCO:PRO:RC=1
    20436 !MCO:PRO:RC=1
    20439 !MCO:PRO:RC=1
    20441 !MCO:PRO:RC=1
    20443 !MCO:PRO:RC=1
    20445 !MCO:PRO:RC=1
    20447 !MCO:PRO:RC=1
    20449 !MCO:PRO:RC=1
    20451 !MCO:PRO:RC=1
    20455 !MCO:PRO:RC=1
    20457 !MCO:PRO:RC=1
    20459 !MCO:PRO:RC=1
    20461 !MCO:PRO:RC=1
    20463 !MCO:PRO:RC=1
    20465 !MCO:PRO:RC=1
    20467 !MCO:PRO:RC=1
    20469 !MCO:PRO:RC=1
    20471 !MCO:PRO:RC=1
    20473 !MCO:PRO:RC=1
    20477 !MCO:PRO:RC=1
    20480 !MCO:PRO:RC=1
    20482 !MCO:PRO:RC=1
    20484 !MCO:PRO:RC=1
    20486 !MCO:PRO:RC=1
    20488 !MCO:PRO:RC=1
    20490 !MCO:PRO:RC=1
    20492 !MCO:PRO:RC=1
    20494 !MCO:PRO:RC=1
    20496 !MCO:PRO:RC=1
    20498 !MCO:PRO:RC=1
    20502 !MCO:PRO:RC=1
    20504 !MCO:PRO:RC=1
    20506 !MCO:PRO:RC=1
    20508 !MCO:PRO:RC=1
    20510 !MCO:PRO:RC=1
    20512 !MCO:PRO:RC=1
    20514 !MCO:PRO:RC=1
    20516 !MCO:PRO:RC=1
    20518 !MCO:PRO:RC=1
    20520 !MCO:PRO:RC=1
    20523 !MCO:PRO:RC=1
    20527 !MCO:PRO:RC=1
    20529 !MCO:PRO:RC=1
    20531 !MCO:PRO:RC=1
    20533 !MCO:PRO:RC=1
    20535 !MCO:PRO:RC=1
    20537 !MCO:PRO:RC=1
    20539 !MCO:PRO:RC=1
    20541 !MCO:PRO:RC=1
    20543 !MCO:PRO:RC=1
    20545 !MCO:PRO:RC=1
    20549 !MCO:PRO:RC=1
    20551 !MCO:PRO:RC=1
    20553 !MCO:PRO:RC=1
    20555 !MCO:PRO:RC=1
    20557 !MCO:PRO:RC=1
    20559 !MCO:PRO:RC=1
    20561 !MCO:PRO:RC=1
    20563 !MCO:PRO:RC=1
    20566 !MCO:PRO:RC=1
    20568 !MCO:PRO:RC=1
    20570 !MCO:PRO:RC=1
    20574 !MCO:PRO:RC=1
    20576 !MCO:PRO:RC=1
    20578 !MCO:PRO:RC=1
    20580 !MCO:PRO:RC=1
    20582 !MCO:PRO:RC=1
    20584 !MCO:PRO:RC=1
    20586 !MCO:PRO:RC=1
    20588 !MCO:PRO:RC=1
    20590 !MCO:PRO:RC=1
    20592 !MCO:PRO:RC=1
    20594 !MCO:PRO:RC=1
    20598 !MCO:PRO:RC=1
    20600 !MCO:PRO:RC=1
    20602 !MCO:PRO:RC=1
    20604 !MCO:PRO:RC=1
    20606 !MCO:PRO:RC=1
    20609 !MCO:PRO:RC=1
    20611 !MCO:PRO:RC=1
    20613 !MCO:PRO:RC=1
    20615 !MCO:PRO:RC=1
    20617 !MCO:PRO:RC=1
    20621 !MCO:PRO:RC=1
    20623 !MCO:PRO:RC=1
    20625 !MCO:PRO:RC=1
    20627 !MCO:PRO:RC=1
    20629 !MCO:PRO:RC=1
    20631 !MCO:PRO:RC=1
    20633 !MCO:PRO:RC=1
    20635 !MCO:PRO:RC=1
    20637 !MCO:PRO:RC=1
    20639 !MCO:PRO:RC=1
    20641 !MCO:PRO:RC=1
    20645 !MCO:PRO:RC=1
    20647 !MCO:PRO:RC=1
    20649 !MCO:PRO:RC=1
    20652 !MCO:PRO:RC=1
    20654 !MCO:PRO:RC=1
    20656 !MCO:PRO:RC=1
    20658 !MCO:PRO:RC=1
    20660 !MCO:PRO:RC=1
    20662 !MCO:PRO:RC=1
    20664 !MCO:PRO:RC=1
    20666 !MCO:PRO:RC=1
    20670 !MCO:PRO:RC=1
    20672 !MCO:PRO:RC=1
    20674 !MCO:PRO:RC=1
    20676 !MCO:PRO:RC=1
    20678 !MCO:PRO:RC=1
    20680 !MCO:PRO:RC=1
    20682 !MCO:PRO:RC=1
    20684 !MCO:PRO:RC=1
    20686 !MCO:PRO:RC=1
    20688 !MCO:PRO:RC=1
    20692 !MCO:PRO:RC=1
    20695 !MCO:PRO:RC=1
    20697 !MCO:PRO:RC=1
    20699 !MCO:PRO:RC=1
    20701 !MCO:PRO:RC=1
    20703 !MCO:PRO:RC=1
    20705 !MCO:PRO:RC=1
    20707 !MCO:PRO:RC=1
    20709 !MCO:PRO:RC=1
    20711 !MCO:PRO:RC=1
    20713 !MCO:PRO:RC=1
    20717 !MCO:PRO:RC=1
    20719 !MCO:PRO:RC=1
    20721 !MCO:PRO:RC=1
    20723 !MCO:PRO:RC=1
    20725 !MCO:PRO:RC=1
    20727 !MCO:PRO:RC=1
    20729 !MCO:PRO:RC=1
    20731 !MCO:PRO:RC=1
    20733 !MCO:PRO:RC=1
    20736 !MCO:PRO:RC=1
    20738 !MCO:PRO:RC=1
    20742 !MCO:PRO:RC=1
    20744 !MCO:PRO:RC=1
    20746 !MCO:PRO:RC=1
    20748 !MCO:PRO:RC=1
    20750 !MCO:PRO:RC=1
    20752 !MCO:PRO:RC=1
    20754 !MCO:PRO:RC=1
    20756 !MCO:PRO:RC=1
    20758 !MCO:PRO:RC=1
    20760 !MCO:PRO:RC=1
    20764 !MCO:PRO:RC=1
    20766 !MCO:PRO:RC=1
    20768 !MCO:PRO:RC=1
    20770 !MCO:PRO:RC=1
    20772 !MCO:PRO:RC=1
    20774 !MCO:PRO:RC=1
    20776 !MCO:PRO:RC=1
    20779 !MCO:PRO:RC=1
    20781 !MCO:PRO:RC=1
    20783 !MCO:PRO:RC=1
    20785 !MCO:PRO:RC=1
    20789 !MCO:PRO:RC=1
    20791 !MCO:PRO:RC=1
    20793 !MCO:PRO:RC=1
    20795 !MCO:PRO:RC=1
    20797 !MCO:PRO:RC=1
    20799 !MCO:PRO:RC=1
    20801 !MCO:PRO:RC=1
    20803 !MCO:PRO:RC=1
    20805 !MCO:PRO:RC=1
    20807 !MCO:PRO:RC=1
    20809 !MCO:PRO:RC=1
    20813 !MCO:PRO:RC=1
    20815 !MCO:PRO:RC=1
    20817 !MCO:PRO:RC=1
    20819 !MCO:PRO:RC=1
    20822 !MCO:PRO:RC=1
    20824 !MCO:PRO:RC=1
    20826 !MCO:PRO:RC=1
    20828 !MCO:PRO:RC=1
    20830 !MCO:PRO:RC=1
    20832 !MCO:PRO:RC=1
    20836 !MCO:PRO:RC=1
    20838 !MCO:PRO:RC=1
    20840 !MCO:PRO:RC=1
    20842 !MCO:PRO:RC=1
    20844 !MCO:PRO:RC=1
    20846 !MCO:PRO:RC=1
    20848 !MCO:PRO:RC=1
    20850 !MCO:PRO:RC=1
    20852 !MCO:PRO:RC=1
    20854 !MCO:PRO:RC=1
    20856 !MCO:PRO:RC=1
    20860 !MCO:PRO:RC=1
    20862 !MCO:PRO:RC=1
    20865 !MCO:PRO:RC=1
    20867 !MCO:PRO:RC=1
    20869 !MCO:PRO:RC=1
    20871 !MCO:PRO:RC=1
    20873 !MCO:PRO:RC=1
    20875 !MCO:PRO:RC=1
    20877 !MCO:PRO:RC=1
    20879 !MCO:PRO:RC=1
    20881 !MCO:PRO:RC=1
    20885 !MCO:PRO:RC=1
    20887 !MCO:PRO:RC=1
    20889 !MCO:PRO:RC=1
    20891 !MCO:PRO:RC=1
    20893 !MCO:PRO:RC=1
    20895 !MCO:PRO:RC=1
    20897 !MCO:PRO:RC=1
    20899 !MCO:PRO:RC=1
    20901 !MCO:PRO:RC=1
    20903 !MCO:PRO:RC=1
    20908 !MCO:PRO:RC=1
    20910 !MCO:PRO:RC=1
    20912 !MCO:PRO:RC=1
    20914 !MCO:PRO:RC=1
    20916 !MCO:PRO:RC=1
    20918 !MCO:PRO:RC=1
    20920 !MCO:PRO:RC=1
    20922 !MCO:PRO:RC=1
    20924 !MCO:PRO:RC=1
    20926 !MCO:PRO:RC=1
    20928 !MCO:PRO:RC=1
    20932 !MCO:PRO:RC=1
    20934 !MCO:PRO:RC=1
    20936 !MCO:PRO:RC=1
    20938 !MCO:PRO:RC=1
    20940 !MCO:PRO:RC=1
    20942 !MCO:PRO:RC=1
    20944 !MCO:PRO:RC=1
    20946 !MCO:PRO:RC=1
    20948 !MCO:PRO:RC=1
    20951 !MCO:PRO:RC=1
    20953 !MCO:PRO:RC=1
    20957 !MCO:PRO:RC=1
    20959 !MCO:PRO:RC=1
    20961 !MCO:PRO:RC=1
    20963 !MCO:PRO:RC=1
    20965 !MCO:PRO:RC=1
    20967 !MCO:PRO:RC=1
    20969 !MCO:PRO:RC=1
    20971 !MCO:PRO:RC=1
    20973 !MCO:PRO:RC=1
    20975 !MCO:PRO:RC=1
    20979 !MCO:PRO:RC=1
    20981 !MCO:PRO:RC=1
    20983 !MCO:PRO:RC=1
    20985 !MCO:PRO:RC=1
    20987 !MCO:PRO:RC=1
    20989 !MCO:PRO:RC=1
    20992 !MCO:PRO:RC=1
    20994 !MCO:PRO:RC=1
    20996 !MCO:PRO:RC=1
    20998 !MCO:PRO:RC=1
    21000 !MCO:PRO:RC=1
    21004 !MCO:PRO:RC=1
    21006 !MCO:PRO:RC=1
    21008 !MCO:PRO:RC=1
    21010 !MCO:PRO:RC=1
    21012 !MCO:PRO:RC=1
    21014 !MCO:PRO:RC=1
    21016 !MCO:PRO:RC=1
    21018 !MCO:PRO:RC=1
    21020 !MCO:PRO:RC=1
    21022 !MCO:PRO:RC=1
    21024 !MCO:PRO:RC=1
    21028 !MCO:PRO:RC=1
    21030 !MCO:PRO:RC=1
    21032 !MCO:PRO:RC=1
    21035 !MCO:PRO:RC=1
    21037 !MCO:PRO:RC=1
    21039 !MCO:PRO:RC=1
    21041 !MCO:PRO:RC=1
    21043 !MCO:PRO:RC=1
    21045 !MCO:PRO:RC=1
    21047 !MCO:PRO:RC=1
    21051 !MCO:PRO:RC=1
    21053 !MCO:PRO:RC=1
    21055 !MCO:PRO:RC=1
    21057 !MCO:PRO:RC=1
    21059 !MCO:PRO:RC=1
    21061 !MCO:PRO:RC=1
    21063 !MCO:PRO:RC=1
    21065 !MCO:PRO:RC=1
    21067 !MCO:PRO:RC=1
    21069 !MCO:PRO:RC=1
    21071 !MCO:PRO:RC=1
    21075 !MCO:PRO:RC=1
    21078 !MCO:PRO:RC=1
    21080 !MCO:PRO:RC=1
    21082 !MCO:PRO:RC=1
    21084 !MCO:PRO:RC=1
    21086 !MCO:PRO:RC=1
    21088 !MCO:PRO:RC=1
    21090 !MCO:PRO:RC=1
    21092 !MCO:PRO:RC=1
    21094 !MCO:PRO:RC=1
    21096 !MCO:PRO:RC=1
    21100 !MCO:PRO:RC=1
    21102 !MCO:PRO:RC=1
    21104 !MCO:PRO:RC=1
    21106 !MCO:PRO:RC=1
    21108 !MCO:PRO:RC=1
    21110 !MCO:PRO:RC=1
    21112 !MCO:PRO:RC=1
    21114 !MCO:PRO:RC=1
    21116 !MCO:PRO:RC=1
    21118 !MCO:PRO:RC=1
    21123 !MCO:PRO:RC=1
    21125 !MCO:PRO:RC=1
    21127 !MCO:PRO:RC=1
    21129 !MCO:PRO:RC=1
    21131 !MCO:PRO:RC=1
    21133 !MCO:PRO:RC=1
    21135 !MCO:PRO:RC=1
    21137 !MCO:PRO:RC=1
    21139 !MCO:PRO:RC=1
    21141 !MCO:PRO:RC=1
    21143 !MCO:PRO:RC=1
    21147 !MCO:PRO:RC=1
    21149 !MCO:PRO:RC=1
    21151 !MCO:PRO:RC=1
    21153 !SGN:BND:TMR
    21161 TSF:MSG:READ,0-0-33,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
    21168 SGN:SKP:MSG CMD=3,TYPE=15
    21170 SGN:PRE:SGN REQ,FROM=0
    21174 SGN:SKP:MSG CMD=3,TYPE=16
    22130 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
    22136 !SGN:SGN:NCE REQ,TO=0 FAIL
    22140 !TSF:MSG:SIGN FAIL
    22142 SGN:SKP:MSG CMD=3,TYPE=16
    23193 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=2,st=NACK:
    23199 !SGN:SGN:NCE REQ,TO=0 FAIL
    23203 !TSF:MSG:SIGN FAIL
    23205 !MCO:WAI:RC=1
    23207 !MCO:PRO:RC=1
    23212 !MCO:PRO:RC=1
    23214 !MCO:PRO:RC=1
    23216 !MCO:PRO:RC=1
    23218 !MCO:PRO:RC=1
    23220 !MCO:PRO:RC=1
    23222 !MCO:PRO:RC=1
    23224 !MCO:PRO:RC=1
    23226 !MCO:PRO:RC=1
    23228 !MCO:PRO:RC=1
    23230 !MCO:PRO:RC=1
    23234 !MCO:PRO:RC=1
    23236 !MCO:PRO:RC=1
    23238 !MCO:PRO:RC=1
    23240 !MCO:PRO:RC=1
    23242 !MCO:PRO:RC=1
    23244 !MCO:PRO:RC=1
    23246 !MCO:PRO:RC=1
    23248 !MCO:PRO:RC=1
    23250 !MCO:PRO:RC=1
    23252 !MCO:PRO:RC=1
    23255 !MCO:PRO:RC=1
    23259 !MCO:PRO:RC=1
    23261 !MCO:PRO:RC=1
    23263 !MCO:PRO:RC=1
    23265 !MCO:PRO:RC=1
    23267 !MCO:PRO:RC=1
    23269 !MCO:PRO:RC=1
    23271 !MCO:PRO:RC=1
    23273 !MCO:PRO:RC=1
    23275 !MCO:PRO:RC=1
    23277 !MCO:PRO:RC=1
    23279 !MCO:PRO:RC=1
    23283 !MCO:PRO:RC=1
    23285 !MCO:PRO:RC=1
    23287 !MCO:PRO:RC=1
    23289 !MCO:PRO:RC=1
    23291 !MCO:PRO:RC=1
    23293 !MCO:PRO:RC=1
    23296 !MCO:PRO:RC=1
    23298 !MCO:PRO:RC=1
    23300 !MCO:PRO:RC=1
    23302 !MCO:PRO:RC=1
    23306 !MCO:PRO:RC=1
    23308 !MCO:PRO:RC=1
    23310 !MCO:PRO:RC=1
    23312 !MCO:PRO:RC=1
    23314 !MCO:PRO:RC=1
    23316 !MCO:PRO:RC=1
    23318 !MCO:PRO:RC=1
    23320 !MCO:PRO:RC=1
    23322 !MCO:PRO:RC=1
    23324 !MCO:PRO:RC=1
    23326 !MCO:PRO:RC=1
    23330 !MCO:PRO:RC=1
    23332 !MCO:PRO:RC=1
    23334 !MCO:PRO:RC=1
    23336 !MCO:PRO:RC=1
    23339 !MCO:PRO:RC=1
    23341 !MCO:PRO:RC=1
    23343 !MCO:PRO:RC=1
    23345 !MCO:PRO:RC=1
    23347 !MCO:PRO:RC=1
    23349 !MCO:PRO:RC=1
    23353 !MCO:PRO:RC=1
    23355 !MCO:PRO:RC=1
    23357 !MCO:PRO:RC=1
    23359 !MCO:PRO:RC=1
    23361 !MCO:PRO:RC=1
    23363 !MCO:PRO:RC=1
    23365 !MCO:PRO:RC=1
    23367 !MCO:PRO:RC=1
    23369 !MCO:PRO:RC=1
    23371 !MCO:PRO:RC=1
    23373 !MCO:PRO:RC=1
    23377 !MCO:PRO:RC=1
    23379 !MCO:PRO:RC=1
    23382 !MCO:PRO:RC=1
    23384 !MCO:PRO:RC=1
    23386 !MCO:PRO:RC=1
    23388 !MCO:PRO:RC=1
    23390 !MCO:PRO:RC=1
    23392 !MCO:PRO:RC=1
    23394 !MCO:PRO:RC=1
    23396 !MCO:PRO:RC=1
    23398 !MCO:PRO:RC=1
    23402 !MCO:PRO:RC=1
    23404 !MCO:PRO:RC=1
    23406 !MCO:PRO:RC=1
    23408 !MCO:PRO:RC=1
    23410 !MCO:PRO:RC=1
    23412 !MCO:PRO:RC=1
    23414 !MCO:PRO:RC=1
    23416 !MCO:PRO:RC=1
    23418 !MCO:PRO:RC=1
    23420 !MCO:PRO:RC=1
    23425 !MCO:PRO:RC=1
    23427 !MCO:PRO:RC=1
    23429 !MCO:PRO:RC=1
    23431 !MCO:PRO:RC=1
    23433 !MCO:PRO:RC=1
    23435 !MCO:PRO:RC=1
    23437 !MCO:PRO:RC=1
    23439 !MCO:PRO:RC=1
    23441 !MCO:PRO:RC=1
    23443 !MCO:PRO:RC=1
    23445 !MCO:PRO:RC=1
    23449 !MCO:PRO:RC=1
    23451 !MCO:PRO:RC=1
    23453 !MCO:PRO:RC=1
    23455 !MCO:PRO:RC=1
    23457 !MCO:PRO:RC=1
    23459 !MCO:PRO:RC=1
    23461 !MCO:PRO:RC=1
    23463 !MCO:PRO:RC=1
    23465 !MCO:PRO:RC=1
    23468 !MCO:PRO:RC=1
    23470 !MCO:PRO:RC=1
    23474 !MCO:PRO:RC=1
    23476 !MCO:PRO:RC=1
    23478 !MCO:PRO:RC=1
    23480 !MCO:PRO:RC=1
    23482 !MCO:PRO:RC=1
    23484 !MCO:PRO:RC=1
    23486 !MCO:PRO:RC=1
    23488 !MCO:PRO:RC=1
    23490 !MCO:PRO:RC=1
    23492 !MCO:PRO:RC=1
    23496 !MCO:PRO:RC=1
    23498 !MCO:PRO:RC=1
    23500 !MCO:PRO:RC=1
    23502 !MCO:PRO:RC=1
    23504 !MCO:PRO:RC=1
    23506 !MCO:PRO:RC=1
    23508 !MCO:PRO:RC=1
    23511 !MCO:PRO:RC=1
    23513 !MCO:PRO:RC=1
    23517 !MCO:PRO:RC=1
    23519 !MCO:PRO:RC=1
    23521 !MCO:PRO:RC=1
    23523 !MCO:PRO:RC=1
    23525 !MCO:PRO:RC=1
    23527 !MCO:PRO:RC=1
    23529 !MCO:PRO:RC=1
    23531 !MCO:PRO:RC=1
    23533 !MCO:PRO:RC=1
    23535 !MCO:PRO:RC=1
    23537 !MCO:PRO:RC=1
    23541 !MCO:PRO:RC=1
    23543 !MCO:PRO:RC=1
    23545 !MCO:PRO:RC=1
    23547 !MCO:PRO:RC=1
    23549 !MCO:PRO:RC=1
    23552 !MCO:PRO:RC=1
    23554 !MCO:PRO:RC=1
    23556 !MCO:PRO:RC=1
    23558 !MCO:PRO:RC=1
    23560 !MCO:PRO:RC=1
    23564 !MCO:PRO:RC=1
    23566 !MCO:PRO:RC=1
    23568 !MCO:PRO:RC=1
    23570 !MCO:PRO:RC=1
    23572 !MCO:PRO:RC=1
    23574 !MCO:PRO:RC=1
    23576 !MCO:PRO:RC=1
    23578 !MCO:PRO:RC=1
    23580 !MCO:PRO:RC=1
    23582 !MCO:PRO:RC=1
    23584 !MCO:PRO:RC=1
    23588 !MCO:PRO:RC=1
    23590 !MCO:PRO:RC=1
    23592 !MCO:PRO:RC=1
    23595 !MCO:PRO:RC=1
    23597 !MCO:PRO:RC=1
    23599 !MCO:PRO:RC=1
    23601 !MCO:PRO:RC=1
    23603 !MCO:PRO:RC=1
    23605 !MCO:PRO:RC=1
    23607 !MCO:PRO:RC=1
    23611 !MCO:PRO:RC=1
    23613 !MCO:PRO:RC=1
    23615 !MCO:PRO:RC=1
    23617 !MCO:PRO:RC=1
    23619 !MCO:PRO:RC=1
    23621 !MCO:PRO:RC=1
    23623 !MCO:PRO:RC=1
    23625 !MCO:PRO:RC=1
    23627 !MCO:PRO:RC=1
    23629 !MCO:PRO:RC=1
    23631 !MCO:PRO:RC=1
    23635 !MCO:PRO:RC=1
    23638 !MCO:PRO:RC=1
    23640 !MCO:PRO:RC=1
    23642 !MCO:PRO:RC=1
    23644 !MCO:PRO:RC=1
    23646 !MCO:PRO:RC=1
    23648 !MCO:PRO:RC=1
    23650 !MCO:PRO:RC=1
    23652 !MCO:PRO:RC=1
    23654 !MCO:PRO:RC=1
    23656 !MCO:PRO:RC=1
    23660 !MCO:PRO:RC=1
    23662 !MCO:PRO:RC=1
    23664 !MCO:PRO:RC=1
    23666 !MCO:PRO:RC=1
    23668 !MCO:PRO:RC=1
    23670 !MCO:PRO:RC=1
    23672 !MCO:PRO:RC=1
    23674 !MCO:PRO:RC=1
    23676 !MCO:PRO:RC=1
    23678 !MCO:PRO:RC=1
    23683 !MCO:PRO:RC=1
    23685 !MCO:PRO:RC=1
    23687 !MCO:PRO:RC=1
    23689 !MCO:PRO:RC=1
    23691 !MCO:PRO:RC=1
    23693 !MCO:PRO:RC=1
    23695 !MCO:PRO:RC=1
    23697 !MCO:PRO:RC=1
    23699 !MCO:PRO:RC=1
    23701 !MCO:PRO:RC=1
    23703 !MCO:PRO:RC=1
    23707 !MCO:PRO:RC=1
    23709 !MCO:PRO:RC=1
    23711 !MCO:PRO:RC=1
    23713 !MCO:PRO:RC=1
    23715 !MCO:PRO:RC=1
    23717 !MCO:PRO:RC=1
    23719 !MCO:PRO:RC=1
    23721 !MCO:PRO:RC=1
    23724 !MCO:PRO:RC=1
    23726 !MCO:PRO:RC=1
    23730 !MCO:PRO:RC=1
    23732 !MCO:PRO:RC=1
    23734 !MCO:PRO:RC=1
    23736 !MCO:PRO:RC=1
    23738 !MCO:PRO:RC=1
    23740 !MCO:PRO:RC=1
    23742 !MCO:PRO:RC=1
    23744 !MCO:PRO:RC=1
    23746 !MCO:PRO:RC=1
    23748 !MCO:PRO:RC=1
    23750 !MCO:PRO:RC=1
    23754 !MCO:PRO:RC=1
    
    Troubleshooting

  • Anyone using Slimnode (RFM69) with MySensors 2.3.2?
    joaoabsJ joaoabs

    Indeed, this doesn't seem to be RAM related. It's a simple sketch that does nothing but presenting himself.

    RAM usage is 52%.

    Sketch uses 21402 bytes (66%) of program storage space. Maximum is 32256 bytes.
    Global variables use 1068 bytes (52%) of dynamic memory, leaving 980 bytes for local variables. Maximum is 2048 bytes.
    

    My issue here is that this is such a simple setup and somehow is failing.
    The bootloader was re burned fresh, the SHA024 is now well personalized, the RFM69's are soldered into the nrf2rfm69 modules (and I've tried 3 different so far), and the sketch is really basic. What am I missing here? :face_with_rolling_eyes:

    Troubleshooting

  • Anyone using Slimnode (RFM69) with MySensors 2.3.2?
    joaoabsJ joaoabs

    Hi,

    Thanks for getting back.

    I didn't think it was related with signing. Before signing, I believe the node needs to ask for a parent, receive an answer and then starts the signing negotiations. In the logs there is no answer what so ever, so I suspect it is more radio (and maybe timing) related.

    Nevertheless, I've re-personalized a node so we can take that signing "tampered" out of the way.
    The signing startup is now fine, but the problem remains. Nothing is received.

     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RPNNAA-X,FQ=8,REL=255,VER=2.3.2
    40 SGN:PER:OK
    69 SGN:INI:BND OK
    71 TSM:INIT
    71 TSF:WUR:MS=0
    75 TSM:INIT:TSP OK
    77 TSM:INIT:STATID=99
    79 TSF:SID:OK,ID=99
    81 TSM:FPAR
    83 SGN:SGN:NREQ=255
    108 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2117 !TSM:FPAR:NO REPLY
    2119 TSM:FPAR
    2121 SGN:SGN:NREQ=255
    2158 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4167 !TSM:FPAR:NO REPLY
    4169 TSM:FPAR
    4171 SGN:SGN:NREQ=255
    4179 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    6187 !TSM:FPAR:NO REPLY
    6189 TSM:FPAR
    6191 SGN:SGN:NREQ=255
    6197 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8206 !TSM:FPAR:FAIL
    8208 TSM:FAIL:CNT=1
    8210 TSM:FAIL:DIS
    8212 TSF:TDI:TSL
    18214 TSM:FAIL:RE-INIT
    18216 TSM:INIT
    18219 TSM:INIT:TSP OK
    18223 TSM:INIT:STATID=99
    18225 TSF:SID:OK,ID=99
    18227 TSM:FPAR
    18229 SGN:SGN:NREQ=255
    18241 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    20250 !TSM:FPAR:NO REPLY
    20252 TSM:FPAR
    20254 SGN:SGN:NREQ=255
    

    Since there is a warning from the creator that "There have been reported issues with MySensors 2.x freezing on SlimNodes running at 1MHz, which I've confirmed. Recommended solution when using MyS 2.x, is to use 8MHz (internal) instead." I'm using the 8MHz internal clock.

    And the MiniCore page has the following comment for 8MHz frequency: "You might experience upload issues when using the internal oscillator. It's factory calibrated but may be a little "off" depending on the calibration, ambient temperature and operating voltage." Not sure if this would also affect RFM69.

    Any idea?

    Troubleshooting

  • Anyone using Slimnode (RFM69) with MySensors 2.3.2?
    joaoabsJ joaoabs

    Hi,

    I'm re-using some slim nodes I had laying around, but I'm not being able to make them "talk" with the MySensorsGW.
    I've re-burned the MiniCore bootloader to load and test successfully basic arduino sketches, but when it comes to MySensors communication it seems it's not working. Tried several slimnode boards and several RFM69 modules.

    Steps I've made:

    1. Install MiniCore bootlader with USBasp. Installed it as explained here.
      Parameters:

      Board: ATMega328
      Variant: 328p / 328pa
      Bootloader: Yes (UART0)
      EEPROM: EEPROM not retained
      BOD: BOD Disabled
      Clock: Internal 8MHz
      CompilerLTO: LTO Enabled

    avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch
    
             System wide configuration file is "C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf"
    
             Using Port                    : usb
             Using Programmer              : usbasp
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :
    
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
    
             Programmer Type : usbasp
             Description     : USBasp, http://www.fischl.de/usbasp/
    
    avrdude: auto set sck period (because given equals null)
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.01s
    
    avrdude: Device signature = 0x1e950f (probably m328p)
    avrdude: erasing chip
    avrdude: auto set sck period (because given equals null)
    avrdude: reading input file "0x3f"
    avrdude: writing lock (1 bytes):
    
    C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\hardware\tools\avr/bin/avrdude -CC:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf -v -patmega328p -cusbasp -Pusb -Uflash:w:C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:i -Ulock:w:0x0f:m 
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 1 bytes of lock written
    avrdude: verifying lock memory against 0x3f:
    avrdude: load data lock data from input file 0x3f:
    avrdude: input file 0x3f contains 1 bytes
    avrdude: reading on-chip lock data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of lock verified
    avrdude: reading input file "0b11111111"
    avrdude: writing efuse (1 bytes):
    
    Writing | ################################################## | 100% 0.01s
    
    avrdude: 1 bytes of efuse written
    avrdude: verifying efuse memory against 0b11111111:
    avrdude: load data efuse data from input file 0b11111111:
    avrdude: input file 0b11111111 contains 1 bytes
    avrdude: reading on-chip efuse data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of efuse verified
    avrdude: reading input file "0b11011110"
    avrdude: writing hfuse (1 bytes):
    
    Writing | ################################################## | 100% 0.02s
    
    avrdude: 1 bytes of hfuse written
    avrdude: verifying hfuse memory against 0b11011110:
    avrdude: load data hfuse data from input file 0b11011110:
    avrdude: input file 0b11011110 contains 1 bytes
    avrdude: reading on-chip hfuse data:
    
    Reading | ################################################## | 100% 0.01s
    
    avrdude: verifying ...
    avrdude: 1 bytes of hfuse verified
    avrdude: reading input file "0xe2"
    avrdude: writing lfuse (1 bytes):
    
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 1 bytes of lfuse written
    avrdude: verifying lfuse memory against 0xe2:
    avrdude: load data lfuse data from input file 0xe2:
    avrdude: input file 0xe2 contains 1 bytes
    avrdude: reading on-chip lfuse data:
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: verifying ...
    avrdude: 1 bytes of lfuse verified
    
    avrdude done.  Thank you.
    
    
    avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch
    
             System wide configuration file is "C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf"
    
             Using Port                    : usb
             Using Programmer              : usbasp
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :
    
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
    
             Programmer Type : usbasp
             Description     : USBasp, http://www.fischl.de/usbasp/
    
    avrdude: auto set sck period (because given equals null)
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.01s
    
    avrdude: Device signature = 0x1e950f (probably m328p)
    avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
    avrdude: erasing chip
    avrdude: auto set sck period (because given equals null)
    avrdude: reading input file "C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex"
    avrdude: writing flash (32768 bytes):
    
    Writing | ################################################## | 100% 0.00s
    
    avrdude: 32768 bytes of flash written
    avrdude: verifying flash memory against C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
    avrdude: load data flash data from input file C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
    avrdude: input file C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex contains 32768 bytes
    avrdude: reading on-chip flash data:
    
    Reading | ################################################## | 100% -0.00s
    
    avrdude: verifying ...
    avrdude: 32768 bytes of flash verified
    avrdude: reading input file "0x0f"
    avrdude: writing lock (1 bytes):
    
    Writing | ################################################## | 100% 0.02s
    
    avrdude: 1 bytes of lock written
    avrdude: verifying lock memory against 0x0f:
    avrdude: load data lock data from input file 0x0f:
    avrdude: input file 0x0f contains 1 bytes
    avrdude: reading on-chip lock data:
    
    Reading | ################################################## | 100% 0.01s
    
    avrdude: verifying ...
    avrdude: 1 bytes of lock verified
    
    avrdude done.  Thank you.
    
    1. Upload the ASCII example sketch with the AVRISP MKII programmer.
      The objective is to test if the bootloader was successfully installed and if the UART is working fine. I can see the ASCII chars in Serial monitor, so I assume everything is OK.
    avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch
    
             System wide configuration file is "C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf"
    
             Using Port                    : COM5
             Using Programmer              : arduino
             Overriding Baud Rate          : 38400
             AVR Part                      : ATmega328P
             Chip Erase delay              : 9000 us
             PAGEL                         : PD7
             BS2                           : PC2
             RESET disposition             : dedicated
             RETRY pulse                   : SCK
             serial program mode           : yes
             parallel program mode         : yes
             Timeout                       : 200
             StabDelay                     : 100
             CmdexeDelay                   : 25
             SyncLoops                     : 32
             ByteDelay                     : 0
             PollIndex                     : 3
             PollValue                     : 0x53
             Memory Detail                 :
    
                                      Block Poll               Page                       Polled
               Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
               ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
               eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
               flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
               lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
               calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
               signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
    
             Programmer Type : Arduino
             Description     : Arduino
             Hardware Version: 3
             Firmware Version: 8.0
             Vtarget         : 0.3 V
             Varef           : 0.3 V
             Oscillator      : 28.800 kHz
             SCK period      : 3.3 us
    
    avrdude: AVR device initialized and ready to accept instructions
    
    Reading | ################################################## | 100% 0.00s
    
    avrdude: Device signature = 0x1e950f (probably m328p)
    avrdude: reading input file "C:\Users\sepjsil\AppData\Local\Temp\arduino_build_486510/ASCIITable.ino.hex"
    avrdude: writing flash (1876 bytes):
    
    Writing | ################################################## | 100% 0.72s
    
    avrdude: 1876 bytes of flash written
    avrdude: verifying flash memory against C:\Users\sepjsil\AppData\Local\Temp\arduino_build_486510/ASCIITable.ino.hex:
    avrdude: load data flash data from input file C:\Users\sepjsil\AppData\Local\Temp\arduino_build_486510/ASCIITable.ino.hex:
    avrdude: input file C:\Users\sepjsil\AppData\Local\Temp\arduino_build_486510/ASCIITable.ino.hex contains 1876 bytes
    avrdude: reading on-chip flash data:
    
    Reading | ################################################## | 100% 0.60s
    
    avrdude: verifying ...
    avrdude: 1876 bytes of flash verified
    
    avrdude done.  Thank you.
    
    1. Load a simple MySensors test sketch to the node:
    // Encryption & Signing stuff - Testado e a funcionar
    #define MY_DEBUG
    #define MY_DEBUG_VERBOSE_SIGNING
    //#define MY_SIGNING_SOFT
    #define MY_SIGNING_ATSHA204
    #define MY_SIGNING_REQUEST_SIGNATURES
    
    #ifndef MY_SIGNING_ATSHA204_PIN
    #define MY_SIGNING_ATSHA204_PIN 17  // D17=A3
    #endif
    #define MY_RADIO_RFM69  // Define for using RFM69 radio
    #define MY_RFM69_FREQUENCY RFM69_433MHZ 
    #define MY_RFM69_NEW_DRIVER
    #define MY_IS_RFM69HW  
    #define MY_RFM69_ENABLE_ENCRYPTION
    //#define MY_DEBUG_VERBOSE_RFM69
    
    #define MY_NODE_ID 99
    
    #include <MySensors.h>
    
    #define CHILD_ID_TEM 20 // Id of the sensor child for temperature (SHT21)
    #define CHILD_ID_DEW 21 // Id of the sensor child for dew point (SHT21)
    #define CHILD_ID_HUM 40 // Id of the sensor child for Humidity (SHT21)
    
    // Source of state change (used when printing debug information)
    #define CHANGE_STATE_SOURCE_RADIO 0
    #define CHANGE_STATE_SOURCE_SWITCH 1
    
    MyMessage msg_TEM(CHILD_ID_TEM, V_TEMP);
    MyMessage msg_HUM(CHILD_ID_HUM, V_HUM);
    MyMessage msg_DEW(CHILD_ID_DEW, V_TEMP);
    
    void presentation() {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("TEST_SLIMNODE", "V1.1");
      // Register all sensors to gw (they will be created as child devices)
      present(CHILD_ID_TEM, S_TEMP);
      present(CHILD_ID_HUM, S_HUM);
      present(CHILD_ID_DEW, S_TEMP);
    
    #ifdef MY_DEBUG
    Serial.println("finished presentation");
    #endif
    }
    
    void setup()
    {
    //#ifdef MY_DEBUG
    Serial.println("finished setup ");
    //#endif
    }
    
    

    No answers from GW:

     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RPNNAA-X,FQ=8,REL=255,VER=2.3.2
    40 !SGN:PER:TAMPERED
    143 !SGN:BND:INIT FAIL
    147 !SGN:INI:BND FAIL
    149 TSM:INIT
    149 TSF:WUR:MS=0
    153 TSM:INIT:TSP OK
    155 TSM:INIT:STATID=99
    157 TSF:SID:OK,ID=99
    159 TSM:FPAR
    161 SGN:SGN:NREQ=255
    2199 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4206 !TSM:FPAR:NO REPLY
    4208 TSM:FPAR
    4210 SGN:SGN:NREQ=255
    6258 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8265 !TSM:FPAR:NO REPLY
    8267 TSM:FPAR
    8269 SGN:SGN:NREQ=255
    10295 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    12302 !TSM:FPAR:NO REPLY
    12304 TSM:FPAR
    12306 SGN:SGN:NREQ=255
    14348 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    16355 !TSM:FPAR:FAIL
    16357 TSM:FAIL:CNT=1
    16359 TSM:FAIL:DIS
    16361 TSF:TDI:TSL
    

    Might be related with the 8MHz internal clock? What am I missing here? The RFM69's are soldered to the nrf2rfm69 modules, so I'm attaching it as a NRF24 would...
    Any idea?
    Thanks,

    Troubleshooting

  • Is MySensors RPI GW 32bit only?
    joaoabsJ joaoabs

    So I managed to successfully run MySensorsGW in a RPI4 with 64bit OS, based on the theoretical premise that a 32bit binary can run in a 64bit system.

    My project idea is to have a central device running my house automation. For that, I use and RPI4 4GB with IoT stack witch is a set of docker images each one with a specific function. This way, I'll be running MQTT Mosquito, NodeRed, zigbee2MQTT, inFluxDB and Graphana, each one in its own docker container. IoT stack also includes other images like transmission torrent, nextcloud, PiHole, etc. I might also use some of it later on.
    Anyway, all of this requires a lot of effort from the little RPI4 so it is important to be able to use all of its resources. Using a 64bit OS is one way to have a more performant system and to be able to address all the RAM (4GB in my case).

    So, having mysgw in this RPI was crucial to maintain a small footprint. It would be great to have the MySensors GW as a docker container as well, but for now this workaround would have to sufice.

    Compiling mswg in RPI 64bit OS is not working (as per the above), but compiling it in a 32bit RPI OS and then copying a couple of files to the RPI 64bit OS it works, at least in my case. My msgw is configured as a MQTT GW, so if yours is different, your millenage may vary.

    ./configure --my-gateway=mqtt --my-controller-ip-address=192.168.2.180 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=MySensorsGW --my-transport=rfm69 --my-signing=software --my-signing-request-signatures --my-rfm69-frequency=433 --my-is-rfm69hw --my-signing-debug --my-rfm69-encryption-enabled --my-mqtt-user=mysensorsuser --my-mqtt-password=mysensorspassword
    

    (Now I can change the --my-controller-ip-address to 127.0.0.1. This way, if for some reason I want to change the controller IP address, I'll not need to re-compile)

    Anyway, so the process is basically compiling everything in the 32bit RPI OS, (configure, make, sudo make install), configure the /etc/sensors.conf accordingly and then coping these files to the same path in the 64bit RPI OS:

    /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
    /etc/mysensors.conf
    /etc/systemd/system/mysgw.service
    /usr/local/bin/mysgw 
    

    Run it as normal:

    sudo systemctl start mysgw.service
    

    Enjoy :)

    Dec 04 12:34:57 INFO  Starting gateway...
    Dec 04 12:34:57 INFO  Protocol version - 2.3.2
    Dec 04 12:34:57 DEBUG MCO:BGN:INIT GW,CP=RPNGLS-X,FQ=NA,REL=255,VER=2.3.2
    Dec 04 12:34:57 DEBUG SGN:PER:OK
    Dec 04 12:34:57 DEBUG SGN:INI:BND OK
    Dec 04 12:34:57 DEBUG TSF:LRT:OK
    Dec 04 12:34:57 DEBUG TSM:INIT
    Dec 04 12:34:57 DEBUG TSF:WUR:MS=0
    Dec 04 12:34:57 DEBUG TSM:INIT:TSP OK
    Dec 04 12:34:57 DEBUG TSM:INIT:GW MODE
    Dec 04 12:34:57 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
    Dec 04 12:34:57 DEBUG MCO:REG:NOT NEEDED
    Dec 04 12:34:57 DEBUG MCO:BGN:STP
    Dec 04 12:34:57 DEBUG MCO:BGN:INIT OK,TSP=1
    Dec 04 12:34:57 DEBUG GWT:RMQ:CONNECTING...
    Dec 04 12:34:57 DEBUG connected to 192.168.2.180
    Dec 04 12:34:57 DEBUG GWT:RMQ:OK
    Dec 04 12:34:57 DEBUG GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
    Dec 04 12:34:57 DEBUG TSM:READY:NWD REQ
    Dec 04 12:34:57 DEBUG SGN:SGN:NREQ=255
    Dec 04 12:34:57 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    Dec 04 12:44:37 DEBUG TSF:MSG:READ,80-80-255,s=255,c=3,t=7,pt=0,l=0,sg=1:
    Dec 04 12:44:37 DEBUG TSF:MSG:BC
    Dec 04 12:44:37 DEBUG TSF:MSG:FPAR REQ,ID=80
    Dec 04 12:44:37 DEBUG TSF:PNG:SEND,TO=0
    Dec 04 12:44:37 DEBUG TSF:CKU:OK
    Dec 04 12:44:37 DEBUG TSF:MSG:GWL OK
    Dec 04 12:44:37 DEBUG SGN:SKP:MSG CMD=3,TYPE=8
    Dec 04 12:44:38 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    Dec 04 12:44:41 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=24,pt=1,l=1,sg=1:1
    Dec 04 12:44:41 DEBUG SGN:SKP:MSG CMD=3,TYPE=24
    Dec 04 12:44:41 DEBUG TSF:MSG:PINGED,ID=80,HP=1
    Dec 04 12:44:41 DEBUG SGN:SKP:MSG CMD=3,TYPE=25
    Dec 04 12:44:41 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    Dec 04 12:45:40 DEBUG TSF:MSG:READ,80-80-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
    Dec 04 12:45:40 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
    Dec 04 12:45:40 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
    Dec 04 12:45:41 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    Dec 04 12:45:41 DEBUG SGN:NCE:XMT,TO=0
    Dec 04 12:45:41 DEBUG TSF:MSG:READ,80-80-0,s=20,c=1,t=0,pt=7,l=5,sg=1:14.0
    Dec 04 12:45:41 DEBUG SGN:BND:NONCE=607CD378A13D593F9957DAC6077B64FEDC18063A8A3FC7EA50AAAAAAAAAAAAAA
    Dec 04 12:45:41 DEBUG SGN:BND:HMAC=F0DA2FBCD8AED09526D29E9C6AF7873076303A8E6F6F0FAB258BE29031DA29EB
    Dec 04 12:45:41 DEBUG SGN:VER:OK
    Dec 04 12:45:41 DEBUG GWT:TPS:TOPIC=mysensors-out/80/20/1/0/0,MSG SENT
    Dec 04 12:45:42 DEBUG TSF:MSG:READ,80-80-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
    Dec 04 12:45:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
    Dec 04 12:45:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
    Dec 04 12:45:42 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
    Dec 04 12:45:42 DEBUG SGN:NCE:XMT,TO=0
    Dec 04 12:45:43 DEBUG TSF:MSG:READ,80-80-0,s=40,c=1,t=1,pt=7,l=5,sg=1:64.0
    Dec 04 12:45:43 DEBUG SGN:BND:NONCE=AB465A4A24BDDF89CC30C3F30F4F4B519ECDDC2843FF725874AAAAAAAAAAAAAA
    Dec 04 12:45:43 DEBUG SGN:BND:HMAC=62C90515061BA556B4CF4F7ECB3FE224E54BE1ED8A2522AB8E8A1FA192B738C4
    Dec 04 12:45:43 DEBUG SGN:VER:OK
    Dec 04 12:45:43 DEBUG GWT:TPS:TOPIC=mysensors-out/80/40/1/0/1,MSG SENT
    
    pi@raspberrypi:~/MySensors $ uname -a
    Linux raspberrypi 5.4.79-v8+ #1373 SMP PREEMPT Mon Nov 23 13:32:41 GMT 2020 aarch64 GNU/Linux
    

    Cheers

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular