RSSI value

A 40 Pin Dip packaged development board enabling you to create internet connected products

RSSI value

Postby frewi » Tue Mar 25, 2014 11:36 am

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
frewi
 
Posts: 8
Joined: Wed Mar 19, 2014 1:57 pm

Re: RSSI value

Postby Carl-SolderSplash » Tue Mar 25, 2014 10:39 pm

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.c

function Wifi_StartScan configures the scan and kicks it off
function Wifi_GetScanResults returns the results
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: RSSI value

Postby frewi » Mon Mar 31, 2014 12:58 pm

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
frewi
 
Posts: 8
Joined: Wed Mar 19, 2014 1:57 pm

Re: RSSI value

Postby Carl-SolderSplash » Mon Mar 31, 2014 11:17 pm

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;
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: RSSI value

Postby frewi » Fri Apr 04, 2014 12:28 pm

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)
frewi
 
Posts: 8
Joined: Wed Mar 19, 2014 1:57 pm

Re: RSSI value

Postby Carl-SolderSplash » Mon Apr 07, 2014 8:37 pm

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
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: RSSI value

Postby frewi » Wed Apr 09, 2014 9:59 am

Thanks Carl.
So I have to use the beacon frames.
frewi
 
Posts: 8
Joined: Wed Mar 19, 2014 1:57 pm

Re: RSSI value

Postby frewi » Tue May 06, 2014 11:04 am

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
frewi
 
Posts: 8
Joined: Wed Mar 19, 2014 1:57 pm

Re: RSSI value

Postby Carl-SolderSplash » Tue May 06, 2014 11:11 am

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 here

Edit : 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
User avatar
Carl-SolderSplash
Site Admin
 
Posts: 223
Joined: Sun Mar 17, 2013 11:15 pm

Re: RSSI value

Postby frewi » Tue May 06, 2014 2:43 pm

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?
frewi
 
Posts: 8
Joined: Wed Mar 19, 2014 1:57 pm

Next

Return to WiFi DipCortex

Who is online

Users browsing this forum: No registered users and 2 guests

cron