Having problems with RFM69HW in Raspberry Pi



  • Hello everyone, I've been using OpenHab for a while now, and I created a bunch of Arduino devices using MySensors to control some lights around the house.
    I am using a PI Model 3B v1.2 with an RFM69HW wired as described in https://www.mysensors.org/build/raspberry#wiring

    I am pulling version 2.3.2 from https://github.com/mysensors/MySensors/releases/tag/2.3.2 and compiling with these flags

    ./configure --my-transport=rfm69 --my-is-rfm69hw --my-rfm69-frequency=915 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=my_sensors_gw --my-mqtt-user=openhabian --my-mqtt-password=mqtt
    

    Then, for the sensors code, I am using the #define MY_RFM69_NEW_DRIVER as described in the documentation.

    This has been working perfectly so far, and I decided to stop using openhabian as the OS in the raspberry, and wanted to switch to the default Raspberry Pi OS and use docker to be able to switch openhab versions more easily... And this is where the problems started. I tried compiling the mysgw and while it does compile and run, I am not able to communicate properly between the sensors and the GW. Here's the log when I start mysgw:

    pi@openhab:~/MySensors $ sudo bin/mysgw                                                                                                                                             
    Jun 06 15:36:20 INFO  Starting gateway...                                                                                                                                           
    Jun 06 15:36:20 INFO  Protocol version - 2.3.2                                                                                                                                      
    Jun 06 15:36:20 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,FQ=NA,REL=255,VER=2.3.2                                                                                                           
    Jun 06 15:36:20 DEBUG TSF:LRT:OK                                                                                                                                                    
    Jun 06 15:36:20 DEBUG TSM:INIT                                                                                                                                                      
    Jun 06 15:36:20 DEBUG TSF:WUR:MS=0                                                                                                                                                  
    Jun 06 15:36:20 DEBUG TSM:INIT:TSP OK                                                                                                                                               
    Jun 06 15:36:20 DEBUG TSM:INIT:GW MODE                                                                                                                                              
    Jun 06 15:36:20 DEBUG TSM:READY:ID=0,PAR=0,DIS=0                                                                                                                                    
    Jun 06 15:36:20 DEBUG MCO:REG:NOT NEEDED                                                                                                                                            
    Jun 06 15:36:20 DEBUG MCO:BGN:STP                                                                                                                                                   
    Jun 06 15:36:20 DEBUG MCO:BGN:INIT OK,TSP=1                                                                                                                                         
    Jun 06 15:36:20 DEBUG GWT:RMQ:CONNECTING...                                                                                                                                         
    Jun 06 15:36:20 DEBUG connected to 127.0.0.1                                                                                                                                        
    Jun 06 15:36:20 DEBUG GWT:RMQ:OK                                                                                                                                                    
    Jun 06 15:36:20 DEBUG GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT                                                                                                             
    Jun 06 15:36:20 DEBUG TSM:READY:NWD REQ                                                                                                                                             
    Jun 06 15:36:22 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    

    While the log appears to be correct and the gw ready to communicate, when a sensor tries to speak to it:

    __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.3.2
    
    16 MCO:BGN:INIT NODE,CP=RPNNA---,FQ=8,REL=255,VER=2.3.2
    28 TSM:INIT
    28 TSF:WUR:MS=0
    32 TSM:INIT:TSP OK
    34 TSM:INIT:STATID=220
    36 TSF:SID:OK,ID=220
    38 TSM:FPAR
    45 ?TSF:MSG:SEND,220-220-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2054 !TSM:FPAR:NO REPLY
    2056 TSM:FPAR
    2062 ?TSF:MSG:SEND,220-220-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4071 !TSM:FPAR:NO REPLY
    4073 TSM:FPAR
    4079 ?TSF:MSG:SEND,220-220-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    6088 !TSM:FPAR:NO REPLY
    6090 TSM:FPAR
    6096 ?TSF:MSG:SEND,220-220-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8108 !TSM:FPAR:FAIL
    8110 TSM:FAIL:CNT=1
    8112 TSM:FAIL:DIS
    8114 TSF:TDI:TSL
    

    Any hint on what could it be going on? before I switched from openhabian to raspberry os, everything was working fine, so frequencies and configuration should be ok... I configured openhabian more than a year ago, almost about the time 2.3.2 came out, and that's when I last compiled mysgw, so I suspect I may not have documented some last minute change before it worked fine... I am noticing in https://www.mysensors.org/apidocs/group__RaspberryPiGateway.html that there are --my-rfm69-irq-pin and --my-rfm69-cs-pin I am not using, not sure if they are needed when the radio is connected in the suggested way, however I tried recompiling setting 24 for the cs-pin and 22 for the irq, but then when I run mysgw I see the exact same log... I am not sure what else to try, so asking here for suggestions?


Log in to reply
 

Suggested Topics

  • 11
  • 2
  • 5
  • 24
  • 11
  • 9
  • 9
  • 6

174
Online

10.2k
Users

10.6k
Topics

109.2k
Posts