LowPowerLab Forum

Hardware support => Moteino => Topic started by: mwei1us on June 05, 2014, 08:29:00 PM

Title: RSSI value and RFM69 encryption
Post by: mwei1us on June 05, 2014, 08:29:00 PM
I'd like to save some power with setPowerLevel() at the sender side. At the receiver side I checked the RSSI value it is -60. My question is what value is considered a "good" signal? Or is there a relationship between signal strength and bandwidth?

Actually, second question - Can I use RFM69 chip to decrypt / encrypt data (not transmitting)?
Title: Re: RSSI value
Post by: Felix on June 06, 2014, 08:28:57 AM
Yes you can tweak the output power with the setPowerLevel() but for the HW version it is not linear, and that was discussed here in the forum. I may patch the library to make it more linear and equivalent to the RFM69W. So essentially to set lower power for the W you just go in 32 steps from 0 to 31 (min to max). For the HW you go from 0 to 15 (min to max) and the same is repeated from 16 to 31 (same min to max).

I suppose you could encrypt data with the RFM chips. You can modify the library to make the chip do mostly everything it does now, but stop short of turning ON the TX mode which will shift out the bits into the air, and instead read back the contents of the FIFO. I haven't tried it but I think it should work. Does that make any sense?

Also since the encryption will use 4 byte blocks (if I recall) you will need to calculate how many bytes to read back. Ie if your message is 13 bytes, the encrypted output will be 16 bytes. If it's 17 bytes it will be 20. Then decryption would work backwards.
Title: Re: RSSI value and RFM69 encryption
Post by: mwei1us on June 06, 2014, 09:00:18 AM
The following site shows that encrypting / decrypting 176 bytes payload takes 21k / 39k cycles with a C implementation (about 1-3ms on Moteino). I need to decrypt some data from the cloud - Do you think it makes sense to offload that work to the RFM69 chip (in terms of speed & power consumption)?

http://www.das-labor.org/wiki/AVR-Crypto-Lib/en

Title: Re: RSSI value and RFM69 encryption
Post by: Felix on June 06, 2014, 09:11:40 AM
I don't know how much data you have but it may not be worth it. First you'd have to implement the changes to accomplish what you need, maybe a considerable effort to get it right, maybe just a few changes in my library. I suspect the hardware AES encryption will be much faster than a software implementation in C. But then there's the SPI communication which adds some lag (not much). Its hard to guesstimate what is more worth it. You'd really have to try it for real.
Title: Re: RSSI value and RFM69 encryption
Post by: mwei1us on June 06, 2014, 09:19:54 AM
Regarding RSSI - one of the online articles mentioned that -60 dbm is very good signal, while anything below -100dmb is weak and noisy. I think I will do a binary search until the receiver sees -100 RSSI.