Kismet Wireless

Kismet Forums

 

Posted by:phoenix
Subject:tweaking spectools
Date:00:56:16 03/11/2010

> >
> > Hi All,
> >
>
> Since you decided to send this both here and email, I'm only going to bother replying once, here.
>
> > I stumbled across the spectools code, and found it very useful. Thanks a ton for this! I am using a 2.4x wi-spy device. I had a few questions about the same, and I was wondering if you could help me out:
> >
> > 1. Is it possible to tweak the frequency range? For example, if I only want to monitor a particular center frequency, how do I go about doing it? (i.e., all the samples from wispy would then corresponding to this frequency)
>
> There is code in the 24x specific file for setting it. There is currently no interface in the UI for controlling this.
>
> The 24x has somewhat limited range setting capabilities if I recall.
>

You are right. I was looking into the function wispy24x_usb_setposition(..) in wispy_hw_24x.c for this. This seems to be the relevant code ..

----------------------------------
/* This is totally broken for anything but the default */
if (in_profile == 0) {
start_khz = WISPY24x_USB_DEF_H_MINKHZ;
res_hz = WISPY24x_USB_DEF_H_RESHZ;
best_s_m = WISPY24x_USB_DEF_STEP_MANT;
best_s_e = WISPY24x_USB_DEF_STEP_EXP;
best_b_m = WISPY24x_USB_BW_EXTRACT_M(WISPY24x_USB_DEF_BW);
best_b_e = WISPY24x_USB_BW_EXTRACT_E(WISPY24x_USB_DEF_BW);
} else {
/* Brute-force search the exponents and use the reverse of the function as the
* fitness test. Pick the resolution which is closest to our requested one. */
best_d = INT_MAX;
for (e = 0; e <= 4; e++) {
temp_m = WISPY24x_USB_RES_M_FROM_HZ(res_hz, e) & 0xFF;
temp_d = abs(res_hz - WISPY24x_USB_RES_HZ_FROM_ME(temp_m, e));

if (temp_d < best_d) {
best_d = temp_d;
best_s_m = temp_m;
best_s_e = e;
}
}

----------------------------------

I am asking this question, based off the comment "this is totally broken for anything but default" --- can you let me know what needs to be fixed if I want to give any other parameters for start_khz and res_hz??

Also, could you please explain me a bit of what is going in this code i.e., what are best_d, best_s_m and best_s_e used for? Is there any restriction on the actual values of start_khz and res_hz ?

Also, could you explain, why the the number of samples fixed to 255? shouldn't this be calculated using (start-end)/res_hz ?



> >
> > 2. What is the current sampling rate? (i.e., how many RSSI values/sec can I get with the current code)? How much time does it take to move from one frequency to the other?
>
> Depends on the resolution of the scan, etc. Timing data is encoded in the sample records if you want to add instrumentation. There is currently no display for this.
>

Thanks for the info .. I will look into this.

> -m


Reply to this message