rfm69 and atc
-
both in mysensors.h ? I will try. I need to understand well how it is organized I think.
-
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``` -
yep. thank you very much
good night :) -
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...
-
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 :)
-
@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.
-
@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 :) -
@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 :) -
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
-
: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 ;)