Making a sensor node to work even when the gateway is not available?



  • I have built the secret knock sensor as per the example in the home page. The only differences are that I'm using an Arduino Nano instead of a Mini; and I'm planning on using claps to turn lights on/off (instead of controlling a lock through knocks as in the example).

    When I start the sensor for testing, it displays the following messages in the serial monitor and then stops.
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    sensor started, id 255
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    open lock
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:

    Would you please help me to identify what could be wrong so I can try to solve it? While wiring the radio, I used the instructions in the home page.

    Thanks in advance.


  • Hero Member

    What controller do you have?



  • Sorry, the title is wrong. The correct would be "troubleshooting knock sensor".
    The title of this thread as it is now is for another thread that I would post just after I figure out what is happening now.

    I'm using a Python script as a simple controller for now. Do these failed messages have any relation with the controller? I thought they were coming before the node can reach the gateway.


  • Hero Member

    well, your node is requesting an id ,

    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
    req node id
    

    but the packet is not reaching its destination ( gateway radio attached to the controller )

    st=fail:
    

    hope it helps somehow.



  • @rvendrame said:

    well, your node is requesting an id ,

    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
    req node id
    

    but the packet is not reaching its destination ( gateway radio attached to the controller )

    st=fail:
    

    hope it helps somehow.

    Yes it helps a lot!
    Does it mean that the node itself is being able to send the message via the radio attached to it, or I may have a problem with the connection on the sensor node itself, perhaps between the arduino nano and the radio?

    Btw, is there a way to certify the nano is connected right to the radio on a sensor node?


  • Hero Member

    Yes, your arduino is talking properly to the attached radio, otherwise you would see the infamous "check wires" at the serial monitor 😉

    But it is talking to no one --- Or better, nobody is answering ...



  • It sounds like maybe you are trying to create a sensor but you currently dont have a gateway setup. Your sensor is asking the gateway for a node id, but the request fails. If you want to get around this you can specify a node id in your sketch.

    gw.begin(NULL, 1, FALSE);

    This will initialize your sensor with node id 1. ID 0 is reserved for the gateway.



  • Thank you guys for your help. I've been able to figure out what was happening. Basically, the delivered example doesn't work as is in the Arduino Nano because some of the digital ports defined in the sketch conflict with digital ports used on the connection from the Nano to the radio. Hence an abnormal behavior was occurring.
    I've fixed these ports and added an additional relay (not an additional child id because I want the 2 relays to be controlled as a single on/off control).

    I also changed the type of sensor to be a light, not a lock.

    Thanks for the help!



  • And for the record, I've fixed a node ID for this sensor and it works locally, turning the lights on/off through the relay, even when the gateway is not reachable (out of range).

    I will open another thread to check what are the possible issues with this behavior.


Log in to reply
 

Suggested Topics

  • 3
  • 6
  • 6
  • 2
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts