Working with a CC2541 on a project that started as the SimpleBLECentral example project. In the simpleBLECentralEventCB callback, whenever a new tag is detected the GAP_DEVICE_INFO_EVENT event is fired. Although not used by the simpleBLEAddDeviceInfo function, and not stored in the gapDevRec_t structure that normally stores the list of discovered tags, within 'pEvent->deviceInfo.rssi' there is still a value on each GAP_DEVICE_INFO_EVENT event. I modified simpleBLEAddDeviceInfo and the gapDevRec_t structure so now both address and rssi information is stored for all tags found during discovery.
This I got from reading other similar posts, but this is also where I'm now stuck. The rssi readings seem to be at best wrong, and at worst a random number generator. I'm getting numbers between 0xF5 (-126) all the way up to 0x26 (36) from the same advertiser to the same CC2541 without either of them moving at all. Additionally, the numbers don't fall in any intelligent distribution between those extremes except they do tend to clump up on a dozen or so values that keep coming up.
How does the CC2541 actually calculate the rssi value, and what is the physical significance of the rssi from an advertising message found in the gapDeviceInfoEvent_t structure? Is there a better way to get rssi or am I perhaps doing something wrong? We have been hoping that by examining rssi readings we could exclude advertisers beyond a certain range or not in the room, but so far it's proving difficult.
Thanks