RFM69/95 won't run



  • Hi all,

    I am trying to read the soil moisture and send it via radio. Therefore I bought a SX1278 radio chip but can't get it run.

    It is connected to my 3.3V arduino pro mini like described in the documentation:

    SX1278 ->  Arduino Pro Mini 3.3V
    
    GND    ->  GND
    VCC    ->  VCC
    MISO   ->  MISO (D11)
    MOSI   ->  MOSI (D12)
    SLCK   ->  SCK (D13)
    NSS    ->  SS (D10)
    DIO0   ->  INT0 (D2)
    

    Everytime I fire the arduino up, I see the following messages (debug activated):

    208 MCO:BGN:INIT NODE,CP=RRNNA---,FQ=8,REL=255,VER=2.3.2
    335 TSM:INIT
    350 TSF:WUR:MS=0
    419 !TSM:INIT:TSP FAIL
    442 TSM:FAIL:CNT=1
    462 TSM:FAIL:DIS
    481 TSF:TDI:TSL
    

    What does that mean and how can I fix it?

    Thanks and regards!


  • Mod

    Welcome to the MySensors community @cYnd !

    The log parser is useful for interpreting the logs.

    https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help/ shows them most common problems and how to troubleshoot them efficiently.

    For init failed, the most common cause is a problem with the wiring. Triple-check the wiring. If you can't find any problem, post photos here and we'll try to spot what is wrong.


  • Mod

    @cYnd said in RFM69/95 won't run:

    RRNNA---

    This indicates that you have configured a rfm69 radio. Rfm69 does not have a sx1278 chip. You probably want to configure it as rfm95.



  • Hi mfalkvidd,

    thanks for the welcome 🙃

    You're right, I should use RFM95 and I changed it. However the same error:

    208 MCO:BGN:INIT NODE,CP=RLNNA---,FQ=8,REL=255,VER=2.3.2
    335 TSM:INIT
    350 TSF:WUR:MS=0
    378 !TSM:INIT:TSP FAIL
    401 TSM:FAIL:CNT=1
    421 TSM:FAIL:DIS
    440 TSF:TDI:TSL
    

    Also I tried the log parser earlier but it just tells me "Transport device initialization failed". I need to figure out why it can't initialize that device. I quadrouple-checked the wires and can't see any issues 😒

    However here are some pcitures of it, maybe you find an issue? (Sorry, wiring is a bit messy 👽 )

    IMG_20200322_120517.jpg IMG_20200322_120440.jpg



  • So do you see anything odd in my wiring or do you have any idea why this isn't working?


  • Mod

    @cYnd my guess would be insuffcient contact, or shorts between two or more pins. Learning to solder well takes some practice. You could use a multimeter to check if there are any shorts. Measuring good connectivity is trickier.



  • @mfalkvidd I tested shorts with my multimeter and didn't find any shorts. However I should receive next week some new of these chips and I will try to solder them new. Let's hope that that's the issue!



  • Is the SX1278 working with the RFM95 driver as well? All my boards are SX1276 and have a different pinout/PCB formfactor...



  • Have you set it up for 434mhz? I think the standard is 866 mhz if not redefined. Also delay is important for certain settings.

    I have the same chip working at home, I'll post code tomorrow.



  • #define MY_RADIO_RFM95
    #define MY_DEBUG_VERBOSE_RFM95
    #define MY_RFM95_FREQUENCY (RFM95_434MHZ)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR48SF4096
    #define RFM95_RETRY_TIMEOUT_MS (3000ul)
    #define MY_TRANSPORT_STATE_TIMEOUT_MS (3000ul)

    These are the defines I'm using. All done before including the MySensors.h.

    What do you get if you try the above?



  • And also:
    The fourth line (configuration) needs to be the same on both the node and the gateway in order to work.
    Be sure to set the frequncy to 434Mhz on both devices as well.



  • @niclas said in RFM69/95 won't run:

    #define MY_RFM95_FREQUENCY (RFM95_434MHZ)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR48SF4096
    #define RFM95_RETRY_TIMEOUT_MS (3000ul)
    #define MY_TRANSPORT_STATE_TIMEOUT_MS (3000ul)

    Hi Nicals,

    thanks for the hints with the defines. Currently I am using this sketch:

    #define MY_RADIO_RFM95
    #define MY_DEBUG_VERBOSE_RFM95
    #define MY_RFM95_FREQUENCY (RFM95_434MHZ)
    #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR48SF4096
    #define RFM95_RETRY_TIMEOUT_MS (3000ul)
    #define MY_TRANSPORT_STATE_TIMEOUT_MS (3000ul)
    #define MY_BAUD_RATE 9600
    
    #include <MySensors.h>
    #define CHILD_ID 1
    
    MyMessage msg(CHILD_ID, V_TRIPPED);
    
    void setup() {
    
    }
    
    void presentation()
    {
      present(CHILD_ID, S_MOISTURE);
    }
    
    void loop() {
      send(msg.set(12));
      sleep(10000);
    }
    

    So pretty basic I think. However I still get with your defines the error:

    208 RFM95:INIT
    292 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
    342 RFM95:PTX:LEVEL=13
    364 !RFM95:INIT:SANCHK FAIL
    395 RFM95:RSL
    

    Unfortunalety my replacement still didn't arrive (i guess due to the COVID-19 crisis....) so I can just work with the breakouts I got.

    What exactly do you mean with:

    @niclas said in RFM69/95 won't run:

    And also:
    The fourth line (configuration) needs to be the same on both the node and the gateway in order to work.
    Be sure to set the frequncy to 434Mhz on both devices as well.

    I can't get is running on one devices (Pro Mini) due to the above mentioned errors, so I didn't even tried it with a second device. What exactly do you mean with fourth line? And which are the "both devices"?



  • @cYnd Hi! Sorry for really late answer. I must have missed the e-mail notification. Have you solved the issue yet?

    I just read your first post and it says: MISO (D11), MOSI (D12). This is swapped according to for instance https://www.circuito.io/blog/arduino-uno-pinout/

    MOSI->MOSI and MISO->MISO is correct but the pin number on the pro mini seems wrong?



  • Hey niclas,

    no worries 🙂

    Got still no solution for this issue. On my first post I linked to the shop where i bought it and on the shops spec sheet, I find MOSI on D12. However on the official documentation I also find MOSI on D11. I switched these pins but still get the error:

    208 RFM95:INIT
    292 RFM95:INIT:PIN,CS=10,IQP=2,IQN=0
    342 RFM95:PTX:LEVEL=13
    364 !RFM95:INIT:SANCHK FAIL
    395 RFM95:RSL
    

    I also found this tool for testing LoRa devices. With MOSI on D12 I just got FF on all addresses but with the switched pins I got:

    Reg    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
    0x00  00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08 
    0x10  00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08 
    0x20  00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08 
    0x30  00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08 
    0x40  00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08 
    0x50  00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08 
    0x60  00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08 
    0x70  00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08 
    

    I don't know if it is a good sign that I see some other values with the test programm or not.
    Still any ideas how to get this working?



  • @cYnd hmm.. too bad..

    I guess I would start by downloading the Lora library by Sandeep Mistry in Arduino IDE and just run the example provided, I think one is called dump_registers. If that doesn't work I would start to suspect hardware failure or some problem with the wires.

    And also, check that all the gnd pads of the module are connected to each other. I used a Bluetooth module once that needed all the gnd pins connected.



  • @cYnd IMG_20200526_055536.jpg

    Found a picture of my node. I hooked up both the GND pads. Can't remember if it was necessary.

    Still no luck with your module?



  • @niclas Still no luck when connection both grounds. Also measured them and they are both connected, even without soldering an cable to it.
    I just ordered the RA AI02 modules so let's hope that these will arrive soon and will work (still didn't receive my replacements).

    A real pity that I can't get these to work 😞



  • @cYnd Well I'm out of ideas. Could be a hardware issue, perhaps you shorted something when handling the module or you exposed it to 5V?

    Is the VCC output from the Mini 5V or 3.3V? If you supply the mini board with 3.3V you should connect the module VCC to 'raw' if i remember correctly.

    I use the RA-01 and RA-02 all the time so hopefully you will be very pleased with them. Good luck!



  • Looking at the images, the wires might not be properly connected, a few wires look like they're just plugged in. In that case even the slightest movement could cause issues.



  • @Avamander The cables are solder from the other side and I just took a picture of the side with the writing so you can trace if it's correctly wired.



  • @cYnd I know, but the lack of proper solder flow (on at least two pins) and a cold joint should not happen even if soldered from the other side. I'd fix it just to be sure it doesn't cause any erratic issues.



  • FINALLY!

    My replacement arrived and I soldered it to my pro mini. This time I used a level converter for powering it directly from VCC and not the arduino's VCC. First no luck, but after switching MISO and MOSI it finally worked:

    LED Flash
    Checking LoRa Device
    
    LoRa Device Present
    LoRa device version 0x12
    LoRa Registers
    Reg    0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
    0x00  00 09 1A 0B 00 52 6C AA 99 4F 09 2B 20 08 02 0A 
    0x10  FF 70 15 0B 28 0C 12 47 32 3E 00 00 00 00 00 40 
    0x20  00 00 00 00 05 00 03 93 55 55 55 55 55 55 55 55 
    0x30  90 40 40 00 00 0F 00 00 00 F5 20 82 EF 02 80 40 
    0x40  00 00 12 24 2D 00 03 00 04 23 00 09 05 84 32 2B 
    0x50  14 00 00 11 00 00 00 0F E0 00 0C F0 07 00 5C 78 
    0x60  00 19 0C 4B CC 0E 7F 20 04 47 AF 3F 7A 00 3B 0B 
    0x70  D0 01 10 00 00 00 00 00 00 00 00 00 00 00 00 00 
     
    Current frequency 434.666MHz
    Write new frequency 434.400MHz
    Changed frequency 434.400MHz
    
    

    Seems like the diagram of the shop where I bought the arduino is switched. However I can now try to read the sensor and send the data via LoRa! Awesome!

    One final question (not related to this issue but maybe you can still answer that in this topic 😇 ) : I got a RXB6 runnign to read a radio rain sensor at 433MHz. Is this received able to recive also LoRa signals or do I need a dedicated LoRa chip to receive LoRa radio signals?


Log in to reply
 

Suggested Topics

  • 87
  • 2
  • 10
  • 6
  • 1
  • 7

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts