Page 1 of 2
RSSI value
Posted:
Tue Mar 25, 2014 11:36 am
by frewi
Hi everybody,
in my project I want to use the wireless channel as a source of entropy. Therefore I need to get the received signal strength indicator (RSSI).
How do I get the RSSI? (I want to avoid changing the CC3000 driver)
Thanks a lot
Re: RSSI value
Posted:
Tue Mar 25, 2014 10:39 pm
by Carl-SolderSplash
Hi,
Welcome to the forum.
The RSSI to the AP can be found using the ioctl_get_scan_results command but the module has be scanning to populate the scan results scanning is controlled via the ioctl_set_scan_params command.
I've done this using my C Driver for LPCXpresso not yet with mbed.
https://github.com/SolderSplashLabs/WiF ... wifi_app.cfunction Wifi_StartScan configures the scan and kicks it off
function Wifi_GetScanResults returns the results
Re: RSSI value
Posted:
Mon Mar 31, 2014 12:58 pm
by frewi
Thank you for your help, Carl. Your code is really helpfull for me.
But could you give me the code of your "ResultStruct_t" as well so I can understand the structure of the scaned data (line 577)?
Thanks
Re: RSSI value
Posted:
Mon Mar 31, 2014 11:17 pm
by Carl-SolderSplash
The structure can be found here :
https://github.com/SolderSplashLabs/WiF ... wifi_app.h- Code: Select all
typedef struct Result_Struct
{
uint32_t num_networks;
uint32_t scan_status;
uint8_t valid:1; // Note : this works in LpcXpresso, but structure packing depends on the compiler!, valid bit is bit0 LSB
uint8_t rssiByte:7;
uint8_t Sec_ssidLen;
uint16_t time;
uint8_t ssid_name[32];
uint8_t bssid[6];
} ResultStruct_t;
Re: RSSI value
Posted:
Fri Apr 04, 2014 12:28 pm
by frewi
Thank you for your help. The fist small experiments were successful.
But the goal is to get the RSSI of all received frames without significant influence on the usual traffic. I'm using the cc3000_hostdriver_mbedsocket.
Is it possible to change this driver to get the RSSI values.
I had some ideas, but no results:
1. hci_event_handler ->received_data (RSSI could be part of the header)
2. the RSSI could be measured at a register or pin
3. the RSSI could be part of the rx_buffer
4. it could be possible to get IEEE conform headers from the CC3000 which should contain RSSI information
Thanks a lot for help
EDIT: I tried printing the rx_buffer of the IRQHandler of the SPI class. But it did not give me the RSSI of received frames (except beacon frames measured by the AP-scan)
Re: RSSI value
Posted:
Mon Apr 07, 2014 8:37 pm
by Carl-SolderSplash
Yeh i've not seen a way to get RSSI for each packet i'm afraid, just the ap scan.
The TI forum might be able to help
http://e2e.ti.com/support/low_power_rf/f/851.aspx
Re: RSSI value
Posted:
Wed Apr 09, 2014 9:59 am
by frewi
Thanks Carl.
So I have to use the beacon frames.
Re: RSSI value
Posted:
Tue May 06, 2014 11:04 am
by frewi
Hi again,
calling Wifi_GetScanResults multiple times seems to crash the programm (after 3500-4000 calls). I found out that wlan_ioctl_get_scan_results is the crashing instruction. My scan interval is 1 second. I also request the scan results every second.
Any idea why this crashes the programm?
Thanks
Re: RSSI value
Posted:
Tue May 06, 2014 11:11 am
by Carl-SolderSplash
Hi,
I think i remember seeing a note about TI fixing a scanning issue with the latest firmware, you could try updating your module. The instructions are
hereEdit : Yes version 1.12 release notes mention network scanning stops after 72.4 minutes so version 1.26 should fix this and maybe your issue
http://processors.wiki.ti.com/index.php ... ease_Notes
Re: RSSI value
Posted:
Tue May 06, 2014 2:43 pm
by frewi
Thank you for the advice.
But that did not solve the problem. At first try the programm crashed after 500 calls. Second try crashed after 7000 calls.
The ioctl_get_scan_results function of the cc3000 hostdriver stucks at the simplelink_wait_event instruction.
Shouldn't there be a timeout-handling?