Author Topic: Real time RSSI measurement broken RFM69CW?  (Read 47289 times)

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: Real time RSSI measurement broken RFM69CW?
« Reply #120 on: April 10, 2016, 02:57:38 PM »
It says that the battery powered moteino receives a packet from a remote battery powered moteino with an RSSI during reception of -121. The local battery powered moteino then sends the !RSSI: xxx log request to the espgw which logs it using syslog to my server.

So yes as I said and it's hard to believe: packet reception at a signal level of -121 dBm.

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Real time RSSI measurement broken RFM69CW?
« Reply #121 on: April 10, 2016, 04:05:43 PM »
Ever wonder why the data sheet quotes the receiver sensitivity at 5khz Fdev? Now we know:

Apr 10 06:54:49 espgw.fritz.box  246:1 247:5

Another 5dBm improvement over the 1260hz Fdev setting. Increasing from there makes things worse.

This is nice - less of a need of AFC, particularly when using temp correction. I think I'll do a range test today with these settings:

         RF_BITRATEMSB_1200, RF_BITRATELSB_1200,
         RF_FDEVMSB_5000, RF_FDEVLSB_5000,
         RF_RXBW_DCCFREQ_000 | RF_RXBW_MANT_24 | RF_RXBW_EXP_5

Note that I increased DccFreq to 16% given the high modulation index.

I suppose it's no accident that the chip powers up to a default setting of FDEV=5Khz.   ;)

TomWS

  • Hero Member
  • *****
  • Posts: 1930
Re: Real time RSSI measurement broken RFM69CW?
« Reply #122 on: April 10, 2016, 08:28:58 PM »
It says that the battery powered moteino receives a packet from a remote battery powered moteino with an RSSI during reception of -121. The local battery powered moteino then sends the !RSSI: xxx log request to the espgw which logs it using syslog to my server.

So yes as I said and it's hard to believe: packet reception at a signal level of -121 dBm.
Now what would be REALLLLLLLY cool is if we could get these kind of numbers with the Nifty(R) device!

Nice work!

Tom

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: Real time RSSI measurement broken RFM69CW?
« Reply #123 on: April 11, 2016, 02:47:46 AM »
Quote
Now what would be REALLLLLLLY cool is if we could get these kind of numbers with the Nifty(R) device!

It's as if you could read my mind  ;)

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Real time RSSI measurement broken RFM69CW?
« Reply #124 on: April 13, 2016, 01:11:15 AM »
This is too cool not to share. Packet reception at an RSSI of -121. That's why you need low noise receivers:
Code: [Select]
Apr 10 19:47:12 espgw.lx  [254] [RX_RSSI:-56,1,8,45]
Apr 10 19:47:12 espgw.lx  !RSSI:-121

The issue I have with the high sensitivity setting is that, in the general case, it seems to require that my code be prescient as to when it needs to be turned on.  I do see  that it might help at the margin for statically mounted devices that communicate on a known timetable.

joelucid

  • Hero Member
  • *****
  • Posts: 868
Re: Real time RSSI measurement broken RFM69CW?
« Reply #125 on: April 13, 2016, 01:53:25 AM »
Quote
The issue I have with the high sensitivity setting is that, in the general case, it seems to require that my code be prescient as to when it needs to be turned on.  I do see  that it might help at the margin for statically mounted devices that communicate on a known timetable.

True. But there are some scenarios that ONLY work with these settings so they are necessary.

Since one usually has multiple clients you either have to have one gw per setting you use. Or several settings share one radio. In the second case you have to manage which setting gets used when. That requires synchronized clients, so an RTC of some sort or at least a calibrated WDT (haven't tried that yet).

One thing I liked about the esp8266 gateway idea is that it's so cheap you can just have one for each setting your environment requires. The clients could automatically talk to the right one similar to Tom's tx power code.

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Real time RSSI measurement broken RFM69CW?
« Reply #126 on: April 22, 2016, 03:13:08 PM »
I decided to revisit an earlier sketch, but this time I set the RSSI threshhold to 180 (-90db) instead of 255, because 255 was when I was trying to measure anything that was in the air from one moment to the next.

Surprisingly, once the first RSSI threshhold is met, further RSSI measurements seem to just keep rolling along, irrespective of the higher threshhold.  In one of the cases (below), it even seems to continue ignoring the higher RSSI threshhold past one of the restarts of Rx.  But then on the next cycle it waits for RSSI to pass the threshhold again.  Surprisingly inconsistent!


http://pastebin.com/TKTpv1Kj
« Last Edit: April 22, 2016, 03:34:14 PM by WhiteHare »

ChemE

  • Sr. Member
  • ****
  • Posts: 419
  • Country: us
Re: Real time RSSI measurement broken RFM69CW?
« Reply #127 on: March 20, 2018, 07:23:39 AM »
Necropost warning!  I just reread this thread in great detail but I'm curious if anyone ever got anywhere with RSSI.  Felix's library seems to sample RSSI in the interrupt routine just after PacketReady goes high and triggers INT0 and seems to give pretty stable results from packet to packet.  Oddly, when I do the same in my own interrupt handler I will get -27dBm on one packet and -85dBm on the next.  This is from two RFM69W Motes with 1/4 wave antennas sitting 4" from each other and one broadcasting at +13dB.  My own radio library is inching ever closer to version 1.0 and this is something I need to nail before it will be of much use to anyone.

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: Real time RSSI measurement broken RFM69CW?
« Reply #128 on: March 20, 2018, 05:01:49 PM »
In my code which is written from scratch and doesn't use any libraries as such I read the RSSI immediately I get a PayloadReady indication as the very first thing it does, i.e. before I read the data out of the FIFO, because as soon as the data is read out the RX can restart and the RSSI can get overridden. I don't have any trouble with that at all. Maybe worth moving the RSSI read to much earlier on in the ISR, it appears to be read after the FIFO is emptied and the device put back into RX mode in the library. It maybe a timing issue with your code compared to Felix's.

Mark.

ChemE

  • Sr. Member
  • ****
  • Posts: 419
  • Country: us
Re: Real time RSSI measurement broken RFM69CW?
« Reply #129 on: March 20, 2018, 10:14:03 PM »
Thanks Mark, it helps to know you've also got consistent results using the same ISR flow and interrupt.  It may very well be because my "network" right now is 2 motes on a USB hub 4" from each other.  Surely there are plenty of noise paths between the two.  I'll move one to battery power and see if that doesn't resolve my issue.  I did spend some time fooling with entering the ISR on SyncAddress and I've even been able to pull data out of the FIFO as it is filling but that made things even more complicated!