Channel hopping on kismet drone

From DD-WRT Wiki

Revision as of 13:27, 30 April 2010 by Glenn (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Using the kismet_drone to do channel hopping with the prism0 driver

As I understand it, the prism0 (wl) driver on the wrt54g does not allow the kismet_drone to control channel hopping directly. suggests the use of a small script running on the wrt to manually channel hop.

while [ $X -eq 1 ] ; do
   sleep 1
   wl scan > /dev/null 2>&1 &

The 'wl scan' command appears to increment the channel number each time it is executed... so if there are 14 channels, it will take 14 seconds to go through all of the channels 'sleep'ing for one second on each.

On my WRT54GL with DD-WRT the 'wl scan' command does not hop channels as expected. That is why I made my own little hopper script including channel range and dwell time options. The script shows the current channel after hopping.

#    Hop true all channels
# Version:  @(#)hop  1.78  06-Feb-2006  ramiro.rikkert [AT]

# USA channels

# EU channels

# How many seconds to dwell on channel

# End of settings

while true
    let INDEX=INDEX+1
    [ $INDEX -gt $NBHOPS ] && INDEX=1
    CURRENT=`echo $CHANNELS | cut -d ',' -f $INDEX`
    echo -n -e "\r\33[KCurrent channel: $CURRENT\r"
    wl channel $CURRENT
    sleep $SECONDS

You could use the vi editor to enter one of the above scripts. Remember to save the file in /tmp or /jffs (where tmp will delete on router reboot, so it's great for testing) as these are the only parts of the filesystem which are writeable. Also remember to make the script executable with

chmod +x <filename>

For more details about the wl driver commands, see

see also