rfm69hw or rfm69hcw and adjusting power



  • Hello,

    Does anyone know how I can turn down the power on my rfm69hw please?
    I have found this thread:
    https://lowpowerlab.com/forum/rf-range-antennas-rfm69-library/standardise-mote-configuration-using-rfm69hw-only/

    The most appropriate power mode that is compatible with the RFM69W is the mode 1.
    To achieve this configuration, the following register should be set as:

    RegPaLevel 0x11 0x5F (+13dBm)
    RegOcp 0x13 0x1A (95mA overload protection)
    RegTestPa1 0x5A 0x55 (no 20dBm PA_BOOST on PA1)
    RegTestPa2 0x5C 0x70 (no 20bBm PA_BOOST on PA2)

    I can set a high power by #define MY_IS_RFM69HW, but how can I adjust it?
    This does not work in the MySensors environment:

    radio.writeReg (0x11, 0x5F);     
     radio.writeReg (0x13, 0x1A);      
     radio.writeReg (0x5A, 0x55);     
     radio.writeReg (0x5C, 0x70); 
    

    @scalz @hek - any ideas please?



  • Have you made this declaration: RFM69 radio ?

    You need to do that directly above or under the MyMessage msg.... declarations. Otherwise the compiler does not know where to send the commands.

    Either that, or you can substitute radio with RFM69, that should do the same...



  • @DavidZH yes I did but it does not work



  • @DavidZH It did compile. I included rfm96.h, which is not needed given the driver already exists under MySensors. I'll report later on if I am successful in establishing rfm69hw to run on a low power


  • Hardware Contributor

    @alexsh1
    actually there are two implementations for rfm69 driver:

    • old : by Lowpowerlab lib, the default driver enabled in Mysensors actually. For this one, to access to your radio instance, you need to use "_radio" instead of "radio". Then you should be able to get the howto working.
    • new : by Mysensors. C code, refactored with more settings. Need to be enabled through a define.
      Important note : it is not compatible yet with the old driver protocol as the packet header has been "revisited". So this driver needs to have the network updated else it won't work.
      For this one, there are two functions available:
    bool transportSetTxPowerLevel(const uint8_t powerLevel)
    bool transportSetTxPowerPercent(const uint8_t powerPercent)
    

    Or it is also possible to use ATC. Depends on your usecase.

    I hope this helps.



  • @scalz when you say the Mysensors driver is not compatible, it means all GW and nodes must use it?
    You are talking about #define MY_RFM69_NEW_DRIVER, right?
    Is it available in 2.1.1 or dev ver?

    I understand stand my setup for rfm69hw should be like this:

    #define MY_RADIO_RFM69
    #define MY_RFM69_FREQUENCY RFM69_868MHZ
    #define MY_RFM69_NEW_DRIVER
    #define MY_IS_RFM69HW

    And then

    #define MY_RFM69_ATC_MODE_ENABLED
    #define MY_RFM69_TX_POWER_DBM 20

    Or

    #define MY_RFM69_ATC_TARGET_RSSI_DBM -80

    Unfortunately, I was not able to find API for this, I suppose this is still being developed.

    Thanks
    Alex


  • Hardware Contributor

    @alexsh1
    Yes the new driver is in dev branch. No api docs yet. It won't be default driver until a major rev.
    Like i said, you need to update your rfm69 gw and nodes, for using it. Else, new and old nodes won't see each other because msg header is different.
    You can take a look in myconfig.h for settings, and for functions in MyTransportRFM69.cpp or driver.


Log in to reply
 

Suggested Topics

  • 87
  • 2
  • 7
  • 10
  • 5
  • 8

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts