How to connect Sensebender with serial gateway?



  • Hi all,

    A few weeks ago I got some packages in the mail, including 4 Sensebenders, and some other parts. I wanted to start on a small scale and try to connect a node with a serial gateway, since everything is new for me!

    I uploaded the (example) serial gateway sketch to an Uno clone, with a NRF24L01 attached to it, and also the (example) SensebenderMicro sketch to the Sensebender (with a Foca FTDI serial adapter), also with a NRF24L01 attached.

    Looking at the serial monitor of the gateway, this is the output:

    u�jI�0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    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
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.1.0
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    

    Looking at the Sensebenders output:

    4 TSM:INIT
    4 TSF:WUR:MS=0
    12 TSM:INIT:TSP OK
    14 TSM:FPAR
    16 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2025 !TSM:FPAR:NO REPLY
    2027 TSM:FPAR
    2029 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4038 !TSM:FPAR:NO REPLY
    

    Did I miss a simple setting to do in the sketches? It took a while until I am this point, to ask this question 😃 My wife asked me again why I don't have a simple hobby like playing tennis.


  • Admin

    Welcome here @Madhias!

    Looks like you attached the radio correctly to your nodes (no warning). The Sensebender is searching for a parent and for some reason it can't seem to find it.

    Is that the full gateway log? Nothing else shows up when you (re)start the sensebender?
    What kind of NRF modules did you get?
    Any difference if you increase the distance between gw/node (2-3 meter at least)?



  • Thanks for your reply!

    In the gateway log nothing else shows up. I got these NRF modules.

    My next step was - which I wanted to try out later - to hook up an IBoard (version 1.1), and use it as Ethernet gateway. I uploaded the sketch found here from TimO, and put some batteries in the node, and got this output - is this the sensor talking with the gateway? This MSG:READ makes me happy somehow...

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    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
    IP: 10.20.30.4
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    

    I only have one FTDI adapter, so I can't see right now the serial monitor of the node. Later I will connect the ethernet gateway to the LAN.

    Another question: is it possible to see a local time in the serial monitor?



  • I have attached the ethernet gateway (Itead IBoard), to the LAN and PC, and the serial monitor output of the gateway looks like this when batteries are in the Sensebender node (unfortunately I have only one FTDI adapter):

    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    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
    
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=255
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    

    It looks good?

    I also tried the next possible gateway I could build: an ethernet gateway with a W5100 shield attached to the Uno. But with this combination I get this output:

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;!TSM:INIT:TSP FAIL
    0;255;3;0;9;TSM:FAIL:CNT=1
    0;255;3;0;9;TSM:FAIL:PDT
    0;255;3;0;9;TSM:FAIL:RE-INIT
    

    But this is another story, and could it be that this Uno clone is the problem part - since it also did not work with the serial setup?



  • I have tried different setups now, next one will be with an original Genuino Uno Rev 3 board as a gateway. Also I'll have later another USB serial adapter. Store is closed today. Argh. So it will be next week then.

    I tried a long range NRF24 too.
    I have also reset the EEPROM on the Sensebender, and on the Arduino clone.

    For now I do not know what to do except to change all remaining parts.

    I already dreamed of !TSM:FPAR:NO REPLY !TSM:FPAR:NO REPLY !TSM:FPAR:NO REPLY Ahhh! 😥



  • What is the difference between the Sensebender example sketch at Github (https://github.com/mysensors/SensebenderMicro/blob/master/Arduino/SensebenderMicro/SensebenderMicro.ino) and the preloaded sketch on the Sensebender?

    With the preloaded sketch the serial monitor output looks like this (I have deleted some lines in between to see the T / H values are also there):

    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    sensor started, id 255
     - Online!
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    T: 23.10
    H: 63
    

    And with the sketch from Github I have the output as seen in my first post of this thread.


  • Admin

    The preloaded sketch is pretty old... I think it still is 1.5 (@tbowmo ?).

    It's really weird that you cannot seem to get any connection between your nodes. Almost as there's something wrong with the NRF modules you've received (unless your PCs USB power is behaving really strange...).



  • I will try to find other NRF24L01+ modules. The long range versions I got were from the same seller. However next weekend I will make a restart with new parts 🙂

    I am still wondering if it is really more or less easy to setup and thinking that I must have forgotten something. But I have to admit in the beginning it looked for me like a fast job, connecting some dupont cables, load up some sketches, and voila.


  • Admin

    Yes, it should be easy to get things working... Especially with the sensebender were things usually can't go wrong (with stable battery powering).

    So either the radios is misbehaving or the gateway have some powering problem of the radio which usually is solved by adding a capacitor near the radio.



  • Adding a capacitor at the radio solved my issues... Sorry for not trying that from the very beginning, today I bought some capacitors, and now it looks good!

    Happy now!

    33804 TSF:MSG:SEND,3-3-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:24.0
    33818 TSF:MSG:SEND,3-3-0-0,s=2,c=1,t=1,pt=2,l=2,sg=0,ft=0,st=OK:62
    34127 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
    34134 MCO:SLP:TPD
    34136 MCO:SLP:WUP=-1
    Sending initial value
    34154 TSF:MSG:SEND,3-3-0-0,s=1,c=1,t=0,pt=2,l=2,sg=0,ft=0,st=OK:1
    Requesting initial value from controller
    34164 TSF:MSG:SEND,3-3-0-0,s=1,c=2,t=2,pt=0,l=0,sg=0,ft=0,st=OK:
    TempDiff :1.01
    HumDiff  :1.50
    T: 23.00
    H: 65
    

Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 10
  • 2
  • 3
  • 4

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts