Adafruit Feather RFM9X LoRa Radios



  • I'm trying to connect a Feather bord using the Lora radio to mysensors and i can't get any reception. I've looked through the forums and documentation but I can't see if it is actually supported by mysensors, any help appreciated in pointing me in the correct direction? or if anyone knows if it is compatiable ? thanks



  • @frank-c Could you send pictures of your board?
    Which Feather board are you using? I recommand you a Feather MO
    Adafruit Feather M0 Basic Proto
    Adafruit Feather M0 Adalogger
    Adafruit Feather M0 RFM69HCW

    with a such radio module?

    [https://www.adafruit.com/product/3072](Adafruit RFM95W LoRa Radio)

    I am looking for a web page which help me a lot, but unfortunately I can find it for the moment.

    But here is alink which may help
    Prepare the Device



  • Thanks very much @pierrot10, that is exactly what i was looking for :). I've got 2x Adafruit Feather 32u4 LoRa Radio, which has the the ATmega32u4 chipset. I believe the M0 model has the newer ATSAMD21G18 chipset. I think apart from the libraries, it should work the same.



  • @frank-c Hello. That's correct, MO has ATSAMD21.
    The main difference is the clock and first of all the Flash

    At the Feather M0's heart is an ATSAMD21G18 ARM Cortex M0 processor, clocked at 48 MHz and at 3.3V logic, the same one used in the new Arduino Zero. This chip has a whopping 256K of FLASH (8x more than the Atmega328 or 32u4) and 32K of RAM (16x as much)! This chip comes with built in USB so it has USB-to-Serial program & debug capability built in with no need for an FTDI-like chip.

    I am not sure but with the LMIC library you may just have enough space with Adafruit RFM95W LoRa Radio. With my project I using other library and the MO is necessary.

    Yes you code will work with MO.

    If you are a beginer, look at this .

    I use a Adafruit Feather M0 Adalogger with RFM95 but the connection is a bit tricky and I can not find the web page which helped me, some year ago but may this can help
    0_1569800354019_Screenshot 2019-09-30 at 01.38.47.png

    RFM95 => Feather MO board
    CS => 24
    RST => 29
    DIO_1 => 25
    DIO_2 => 28
    IRQ => 27
    MISO => MISO
    MOSI => MOSI
    SCK => SCK

    But if do not need to work with an SD car, you should bette user an MO radio board .

    Any way, look at this It should be a good start (look at Prepare the Device)

    Good luck



  • Thanks @pierrot10, that is fantastic!
    I actually have a dead feather 32u4 now, so will order more, but after reading what you say it sounds like the M0 model with the newer updated chipset is a better option.
    Just a question on running the base lora radio (feather M0) to a raspberry pi, i presume it will work okay using the standard serial/USB connection. I haven't tried it, as my radio is dead.
    Anyway I better order these new ones and getting making, thanks 🙂



  • @pierrot10 I've got my two new M0 ATSAMD21 boards talking, so the hardware is good :), i used the radioheads library. These definately sound a better chip than the 32u4, although I'll have to see how they go on battery comsumption.
    This might sound dumb but I can't compile mysensors scripts (serial gateway) with my boards, I'm using adafruits board defination. Looking at mysensors i can't see this board, except the Sensebender (ATSAMD21), but it has a completely different pin layout. Does that mean I need to map each ping to the correct reference in the code to get this to work with mysensors ?



  • Dear Frank,
    I do not know if I can help because I do not know mysensors script.
    If you can send pictures of your board and how you connected the wire it can help.

    From Arduino IDE, make sure, you select the correct board. Go to Tool -> Board and select the 'Adafruit Feather MO' board

    2 weeks ago, I sent you a picture of my connection. I do not think it will work for you, because I am using LoRaWAN with Arduino LMIC library.

    Apparently you do LoRa with a client and a server (radiohead). Thoses examples should help you



  • Yes, this works using the radiohead library and those sketches. I didn't need to connect any extra wires. I'm not looking at connecting to LoRaWAN at the moment, just mysensors.
    I read the board is similar to Arduino Zero also, so i will try using that as a base and try fixing forward so the feather M0 with lora can work with mysensors, if nobody has had this working yet? (mysensors with adafruit feather m0 LoRa RFM9*).
    Thanks 🙂



  • I got the two feather M0 RFM96 Lora 433Mhz (https://www.adafruit.com/product/3179) units running in MySensors, one as the GW and another using the MockMySensors sketch. They both seem to be running fine, I increased the timeouts as others have instructed. Although they units aren't communicating with each other.
    I've got the following setup in my sketches

    #define MY_RADIO_RFM95
    #define   MY_DEBUG_VERBOSE_RFM95
    #define   MY_RFM95_FREQUENCY (RFM95_434MHZ)
    #define   MY_RFM95_MODEM_CONFIGRUATION (RFM95_BW125CR45SF128)
    #define RFM95_RETRY_TIMEOUT_MS  (10000ul) 
    #define MY_TRANSPORT_STATE_TIMEOUT_MS (20*1000ul)
    #define   MY_RFM95_TX_TIMEOUT_MS (10000ul)
    
    //Adafruit M0 Feather Lora RFM95
    #define   MY_RFM95_IRQ_PIN 3
    #define   MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
    #define   MY_RFM95_CS_PIN 8
    #define   MY_RFM95_RST_PIN 4
    

    I'm still fairly new to this so I'll keep trying to get them talking. Any ideas or hints appreciated? 🙂


  • Mod

    @frank-c the debug logs from both nodes could be useful



  • hi @mfalkvidd, ah yes.
    It doesn't show any connection between the nodes, logs look okay.
    GW log:

    0;255;3;0;9;20830 MCO:BGN:INIT GW,CP=RLNGS---,REL=255,VER=2.3.1
    0;255;3;0;9;21071 TSF:LRT:OK
    0;255;3;0;9;21081 TSM:INIT
    0;255;3;0;9;21151 TSF:WUR:MS=0
    0;255;3;0;9;21161 RFM95:INIT
    0;255;3;0;9;21177 RFM95:INIT:PIN,CS=8,IQP=3,IQN=3,RST=4
    0;255;3;0;9;21197 RFM95:PTX:LEVEL=10
    0;255;3;0;9;21208 TSM:INIT:TSP OK
    0;255;3;0;9;21218 TSM:INIT:GW MODE
    0;255;3;0;9;21228 TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;21238 MCO:REG:NOT NEEDED
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.3.1
    0;255;3;0;9;21249 MCO:BGN:STP
    0;255;3;0;9;21259 MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;21270 TSM:READY:NWD REQ
    0;255;3;0;9;21280 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
    0;255;3;0;9;23430 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    

    and the sensor log:

    1764594 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    1784606 !TSM:FPAR:FAIL
    1784616 TSM:FAIL:CNT=7
    1784626 TSM:FAIL:DIS
    1784636 TSF:TDI:TSL
    1784646 RFM95:RSL
    1844657 TSM:FAIL:RE-INIT
    1844667 TSM:INIT
    1844704 RFM95:INIT
    1844719 RFM95:INIT:PIN,CS=8,IQP=3,IQN=3,RST=4
    1844740 RFM95:PTX:LEVEL=10
    1844750 TSM:INIT:TSP OK
    1844760 TSM:FPAR
    1844770 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0
    1846921 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    1866933 !TSM:FPAR:NO REPLY
    1866943 TSM:FPAR
    1866953 RFM95:SWR:SEND,TO=255,SEQ=1,RETRY=0
    1869103 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    1889115 !TSM:FPAR:NO REPLY
    1889125 TSM:FPAR
    1889135 RFM95:SWR:SEND,TO=255,SEQ=2,RETRY=0
    1891285 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    1911297 !TSM:FPAR:NO REPLY
    1911307 TSM:FPAR
    1911317 RFM95:SWR:SEND,TO=255,SEQ=3,RETRY=0
    1913467 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    1933479 !TSM:FPAR:FAIL
    1933489 TSM:FAIL:CNT=7
    1933499 TSM:FAIL:DIS
    1933509 TSF:TDI:TSL
    1933519 RFM95:RSL
    1993531 TSM:FAIL:RE-INIT
    1993541 TSM:INIT
    1993580 RFM95:INIT
    1993595 RFM95:INIT:PIN,CS=8,IQP=3,IQN=3,RST=4
    1993616 RFM95:PTX:LEVEL=10
    


  • I've been busy the last day or so..👨‍💻 and I've now got the radios communicating! 🙂

    i've used the pin config given by adafruit:
    0_1572016412188_featherM0-rfm9x.png
    https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module/pinouts

    i've read about timeouts for these lora boards, so i've upped the values in the both sketches.
    https://forum.mysensors.org/topic/8813/any-success-story-on-lora-rfm95-module-and-mysensors

    #define RFM95_RETRY_TIMEOUT_MS  (5000ul) 
    #define MY_TRANSPORT_STATE_TIMEOUT_MS (20*1000ul)
    #define   MY_RFM95_TX_TIMEOUT_MS (10000ul)
    

    I spaced the radios about a 1m apart and they now communicate 🙂 i'm not sure if distance helped.
    Also with the above timeouts they aren't needed at such a short distance.


 

249
Online

9.0k
Users

9.7k
Topics

101.3k
Posts