Package killerbee :: Class KillerBee
[hide private]
[frames] | no frames]

Class KillerBee

source code

Instance Methods [hide private]
None
__init__(self, device=None, datasource=None, gps=None)
Instantiates the KillerBee class.
source code
Boolean
__device_is(self, vendorId, productId)
Compares KillerBee class' device data to a known USB vendorId and productId
source code
 
__search_usb(self, device, vendor=None, product=None)
Deprecated in class, use kbutils.search_usb(device, vendor, product) instead of class version.
source code
 
__search_usb_bus(self, bus, device, vendor=None, product=None)
Deprecated in class, use kbutils.search_usb_bus(bus, device, vendor, product) instead of class version.
source code
 
dev_list(self, vendor=None, product=None)
Deprecated in class, use kbutils.devlist() instead.
source code
List
get_dev_info(self)
Returns device information in a list identifying the device.
source code
None
close(self)
Closes the device out.
source code
Boolean
check_capability(self, capab)
Uses the specified capability to determine if the opened device is supported.
source code
List
get_capabilities(self)
Returns a list of capability information for the device.
source code
None
sniffer_on(self, channel=None)
Turns the sniffer on such that pnext() will start returning observed data.
source code
None
sniffer_off(self)
Turns the sniffer off, freeing the hardware for other functions.
source code
None
set_channel(self, channel)
Sets the radio interface to the specifid channel.
source code
Boolean
is_valid_channel(self, channel)
Based on sniffer capabilities, return if this is an OK channel number.
source code
None
inject(self, packet, channel=None, count=1, delay=0)
Injects the specified packet contents.
source code
List
pnext(self, timeout=100)
Returns packet data as a string, else None.
source code
None
jammer_on(self, channel=None)
Attempts reflexive jamming on all 802.15.4 frames.
source code
Properties [hide private]
  channel
Getter function for the channel that was last set on the device.
Method Details [hide private]

__init__(self, device=None, datasource=None, gps=None)
(Constructor)

source code 

Instantiates the KillerBee class.

Parameters:
  • device (String) - Device identifier, either USB vendor:product, serial device node, or IP address
  • datasource (String) - A known datasource type that is used by dblog to record how the data was captured.
  • gps (String) - Optional serial device identifier for an attached GPS unit. If provided, or if global variable has previously been set, KillerBee skips that device in initalization process.
Returns: None
None

__device_is(self, vendorId, productId)

source code 

Compares KillerBee class' device data to a known USB vendorId and productId

Parameters:
  • vendorId ()
  • productId ()
Returns: Boolean
True if KillerBee class has device matching the vendor and product IDs provided.

get_dev_info(self)

source code 

Returns device information in a list identifying the device. Implemented by the loaded driver.

Returns: List
List of 3 strings identifying device.

close(self)

source code 

Closes the device out.

Returns: None
None

check_capability(self, capab)

source code 

Uses the specified capability to determine if the opened device is supported. Returns True when supported, else False.

Returns: Boolean

get_capabilities(self)

source code 

Returns a list of capability information for the device.

Returns: List
Capability information for the opened device.

sniffer_on(self, channel=None)

source code 

Turns the sniffer on such that pnext() will start returning observed data. Will set the command mode to Air Capture if it is not already set.

Parameters:
  • channel (Integer) - Sets the channel, optional
Returns: None

sniffer_off(self)

source code 

Turns the sniffer off, freeing the hardware for other functions. It is not necessary to call this function before closing the interface with close().

Returns: None

set_channel(self, channel)

source code 

Sets the radio interface to the specifid channel. Currently, support is limited to 2.4 GHz channels 11 - 26.

Parameters:
  • channel (Integer) - Sets the channel, optional
Returns: None

inject(self, packet, channel=None, count=1, delay=0)

source code 

Injects the specified packet contents.

Parameters:
  • packet (String) - Packet contents to transmit, without FCS.
  • channel (Integer) - Sets the channel, optional
  • count (Integer) - Transmits a specified number of frames, def=1
  • delay (Float) - Delay between each frame, def=1
Returns: None

pnext(self, timeout=100)

source code 

Returns packet data as a string, else None.

Parameters:
  • timeout (Integer) - Timeout to wait for packet reception in usec
Returns: List
Returns None is timeout expires and no packet received. When a packet is received, a list is returned, in the form [ String: packet contents | Bool: Valid CRC | Int: Unscaled RSSI ]

jammer_on(self, channel=None)

source code 

Attempts reflexive jamming on all 802.15.4 frames. Targeted frames must be >12 bytes for reliable jamming in current firmware.

Parameters:
  • channel (Integer) - Sets the channel, optional.
Returns: None

Property Details [hide private]

channel

Getter function for the channel that was last set on the device.

Get Method:
unreachable.channel(self) - Getter function for the channel that was last set on the device.