Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. rfm69 and atc

rfm69 and atc

Scheduled Pinned Locked Moved Development
49 Posts 13 Posters 15.5k Views 12 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • scalzS Offline
    scalzS Offline
    scalz
    Hardware Contributor
    wrote on last edited by
    #6

    both in mysensors.h ? I will try. I need to understand well how it is organized I think.

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #7

      Yes, include both .cpps, looks like the new class inits the old:

      https://github.com/LowPowerLab/RFM69/blob/master/RFM69_ATC.cpp#L48

      1 Reply Last reply
      0
      • scalzS Offline
        scalzS Offline
        scalz
        Hardware Contributor
        wrote on last edited by scalz
        #8

        yes I kept the too. but if I remove rfm69.cpp or not, it still have these new errors I'm looking after

        In file included from C:\Users\scalz\Documents\Arduino\libraries\MySensors/MySensor.h:265:0,
        
                         from C:\Users\scalz\AppData\Local\Temp\arduino_modified_sketch_741351\SensebenderMicro.ino:65:
        
        C:\Users\scalz\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69_ATC.cpp: In member function 'void RFM69_ATC::sendFrame(uint8_t, const void*, uint8_t, bool, bool, bool, int16_t)':
        
        C:\Users\scalz\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69_ATC.cpp:111:18: error: 'RFM69_CTL_SENDACK' was not declared in this scope
        
             SPI.transfer(RFM69_CTL_SENDACK | (sendRSSI?RFM69_CTL_RESERVE1:0));  // TomWS1  TODO: Replace with EXT1
        
                          ^
        
        C:\Users\scalz\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69_ATC.cpp:118:32: error: 'RFM69_CTL_REQACK' was not declared in this scope
        
             SPI.transfer(_targetRSSI ? RFM69_CTL_REQACK | RFM69_CTL_RESERVE1 : RFM69_CTL_REQACK);
        
                                        ^
        
        C:\Users\scalz\Documents\Arduino\libraries\MySensors/drivers/RFM69/RFM69_ATC.cpp:129:66: error: 'RF69_TX_LIMIT_MS' was not declared in this scope
        
           while (digitalRead(_interruptPin) == 0 && millis() - txStart < RF69_TX_LIMIT_MS); // wait for DIO0 to turn HIGH signalling transmission finish
        
                                                                          ^
        
        exit status 1```
        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #9

          Too much for my brain at this hour. You should probably start looking for the missing RFM69_CTL_REQACK define.

          Good night :zzz:

          1 Reply Last reply
          0
          • scalzS Offline
            scalzS Offline
            scalz
            Hardware Contributor
            wrote on last edited by scalz
            #10

            yep. thank you very much
            good night :)

            1 Reply Last reply
            0
            • scalzS Offline
              scalzS Offline
              scalz
              Hardware Contributor
              wrote on last edited by scalz
              #11

              cool it compiles after updated rfm69 lib. I do some define and tests, and I will try my first PR ;) I also need to check what are all diff between old and new lib. can't wait to try listenmode now...

              1 Reply Last reply
              1
              • D Offline
                D Offline
                DavidZH
                wrote on last edited by
                #12

                I will keep a very close eye on this!
                Listen mode is very interesting, but also the possible prolonged battery life from the other sensors!!!

                Big thumbs up! :+1:

                1 Reply Last reply
                0
                • scalzS Offline
                  scalzS Offline
                  scalz
                  Hardware Contributor
                  wrote on last edited by scalz
                  #13

                  thx. so far so good ;)
                  I had a little bit time last night...I think I will rename this topic "improvements for our mysensors rfm69 lib" lol :)

                  I diff checked with mysensors rfm69 driver lib: latest lowpowerlab rfm69 lib (master+spi transaction version) + few others variant I found to see if something could be missing. So I started from mysensors rfm69 driver one and added step by step the changes, and of course not forgot to keep boards define (atsam, esp, 328...) + checked the purpose of these changes.

                  The list of improvements I noticed:

                  • ATC, Automatic Transfer Power Control : merged, working (not the biggest part)
                  • small improvements on spi transaction part : merged but not full tested. I don't use ethernet shield, so just tested with eeprom but I think this change was mostly made for things like w5100 shield...if I have time I will try to make more tests on this..
                  • ListenMode : still, in progress but in a good way I think :) Almost merged but not tested yet (was too late!!). For the moment it compiles. It will need some tests I think to see if all properly works, power consumption..At lowpowerlab they get very few ua (1-2ua order) in listenmode. sounds great I hope to have same success. I need register to their forum at least to thx them. not done. booo :flushed:
                  • with this listenmode, I plan to use gammon sketch J. I already did tests and noticed a better low consumption than lowpowerlab sleep of mysensors. but I will check if it's still the same case
                  • still about sleep mode, I will look if it's possible to improve wakeup time, I read interesting things.
                  • when all this will be ok, I will try to see if it's interesting to use sort of WDT Listenmode : a wdt done by rssi using listenmode. but that's at the end of the list! and needs to see then if it's better or not than common wdt power consumption. but that looks tempting because common wdt don't do listenmode...

                  Files impacted for those interested to know:

                  • rfm69 libs updated
                  • rfm69_atc added
                  • myTransportRFM69 updated
                  • one cpp include in mysensor.h
                  • few define in myconfig.h
                  • mysensorscore, transport, hw..to add a SleepWithListenMode method ...For the moment I add my own sleep method to not break anything and keep mysensors archi...

                  Some stuff, I hope I will have everything ok! But I'm very happy doing this as now I am a lot lot more confident with mysensors archi. very cool :)

                  see you soon :)

                  1 Reply Last reply
                  3
                  • F Offline
                    F Offline
                    Fabien
                    wrote on last edited by
                    #14

                    very good work ! especially for ATC and Listenmode.

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      lafleur
                      wrote on last edited by
                      #15

                      Is the code mods on Github for us to look at??

                      Thanks

                      1 Reply Last reply
                      0
                      • FrancoisF Offline
                        FrancoisF Offline
                        Francois
                        wrote on last edited by
                        #16

                        @scalz how is atc working on the rfm69?

                        1 Reply Last reply
                        0
                        • scalzS Offline
                          scalzS Offline
                          scalz
                          Hardware Contributor
                          wrote on last edited by scalz
                          #17

                          @Francois sorry this work is still in progress, I will work on it this week.
                          This is handled in the rfm69 lib. And lowpowerlab explains this well: copied from Lowpowerlab

                          • "The basic idea behind this extension is to allow your nodes to dial down transmission power based on the received signal strength indicator (RSSI)."
                          • "with RFM69_ATC this is done automatically for you, you just need to indicate a target RSSI. On each packet sent and ACK received (using sendWithRetry(…) is required), the node analyzes the actual RSSI and continuously adjusts its own transmission power level of the RFM69 transceiver to attempt to match the target RSSI (+ or -)"

                          Require some small changes in libs, but for the moment I have to check/think few things for the listenmode to have everything well packaged with mysensors..not finished yet.

                          1 Reply Last reply
                          0
                          • L Offline
                            L Offline
                            lafleur
                            wrote on last edited by
                            #18

                            have you tested the code enough to release it for our use and testing??

                            Thanks

                            1 Reply Last reply
                            0
                            • scalzS Offline
                              scalzS Offline
                              scalz
                              Hardware Contributor
                              wrote on last edited by
                              #19

                              @lafleur
                              no, not yet. sorry for delay. I have no time actually..and I think perhaps lowpowerlab team is preparing few changes in their lib. so I am delaying a bit to finish other things in the mean time, and to see if they add new features. then, if nothing new, I will finish this if someone didn't beat me on this ;)
                              but I will try to do my best :)

                              L 1 Reply Last reply
                              0
                              • scalzS scalz

                                @lafleur
                                no, not yet. sorry for delay. I have no time actually..and I think perhaps lowpowerlab team is preparing few changes in their lib. so I am delaying a bit to finish other things in the mean time, and to see if they add new features. then, if nothing new, I will finish this if someone didn't beat me on this ;)
                                but I will try to do my best :)

                                L Offline
                                L Offline
                                lafleur
                                wrote on last edited by lafleur
                                #20

                                @scalz
                                I have it working to some extent, send me what you have and I will add your changes to what I've done to make sure I did not miss anything...

                                Then I will post the changes to the development branch

                                Thanks

                                tom --at-- lafleur --.-- us

                                1 Reply Last reply
                                0
                                • L Offline
                                  L Offline
                                  lafleur
                                  wrote on last edited by
                                  #21

                                  I have all this working now and have 7 devices on it to a serial gateway...
                                  Using new RFM69 driver and RFM69_ATC...

                                  Its interesting to see the power levels change as packets flow...

                                  If I can figure out how to do a PULL request, I will make it happen to 2.0b development branch...

                                  tom

                                  1 Reply Last reply
                                  1
                                  • scalzS Offline
                                    scalzS Offline
                                    scalz
                                    Hardware Contributor
                                    wrote on last edited by
                                    #22

                                    :thumbsup:
                                    sorry for delayed answer, a bit busy, I have actually no time to look at/share my experiments :confused:
                                    I found this interesting too, seeing powerlevels change. btw I didn't finish the listenmode part, I'm on other things for the moment, so that's great if your are doing the job :)
                                    thx ;)

                                    1 Reply Last reply
                                    0
                                    • scalzS Offline
                                      scalzS Offline
                                      scalz
                                      Hardware Contributor
                                      wrote on last edited by scalz
                                      #23

                                      hi guys.

                                      just a little update to say that I'm back on this :blush:
                                      it's still a wip so I will share/release a bit later ;)
                                      I have this working in mysensors dev for the moment.

                                      • I can get rssi value.
                                      • atc power mode.
                                      • listenmode : an mqtt esp8266 GW is peridocially waking up a proto node which is in deepsleep (the node is woken up by INT0 triggered by the radio of course). I will mainly use this for sort of remote watchdog for some of my nodes etc..
                                      1 Reply Last reply
                                      2
                                      • F Offline
                                        F Offline
                                        Fabien
                                        wrote on last edited by
                                        #24

                                        @scalz, good work ! Nice features.

                                        1 Reply Last reply
                                        0
                                        • alexsh1A Offline
                                          alexsh1A Offline
                                          alexsh1
                                          wrote on last edited by
                                          #25

                                          @scalz As you noticed I have just started with rfm69 and thanks for your help in the other thread. Really looking forward to your work as ATC is something I am missing in MySensors.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          10

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular