Package killerbee :: Module dev_apimote :: Class APIMOTE
[hide private]
[frames] | no frames]

Class APIMOTE

source code

Instance Methods [hide private]
None
__init__(self, dev, revision=2)
Instantiates the KillerBee class for the ApiMote platform running GoodFET firmware.
source code
 
close(self) source code
 
check_capability(self, capab) source code
 
get_capabilities(self) source code
None
__set_capabilities(self)
Sets the capability information appropriate for GoodFETCCSPI client and firmware.
source code
List
get_dev_info(self)
Returns device information in a list identifying 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 (limited to 2.4 GHz channels 11-26)
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 a dictionary containing packet data, else None.
source code
None
ping(self, da, panid, sa, channel=None)
Not yet implemented.
source code
None
jammer_on(self, channel=None)
Not yet implemented.
source code
 
set_sync(self, sync=42767)
Set the register controlling the 802.15.4 PHY sync byte.
source code
None
jammer_off(self, channel=None)
Not yet implemented.
source code
Method Details [hide private]

__init__(self, dev, revision=2)
(Constructor)

source code 

Instantiates the KillerBee class for the ApiMote platform running GoodFET firmware.

Parameters:
  • dev (String) - Serial device identifier (ex /dev/ttyUSB0)
  • revision (Integer) - The revision number for the ApiMote, which is used by the called GoodFET libraries to properly communicate with and configure the hardware.
Returns: None
None

__set_capabilities(self)

source code 

Sets the capability information appropriate for GoodFETCCSPI client and firmware.

Returns: None
None

get_dev_info(self)

source code 

Returns device information in a list identifying the device.

Returns: List
List of 3 strings identifying 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 (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 a dictionary containing packet data, 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 dictionary is returned with the keys bytes (string of packet bytes), validcrc (boolean if a vaid CRC), rssi (unscaled RSSI), and location (may be set to None). For backwards compatibility, keys for 0,1,2 are provided such that it can be treated as if a list is returned, in the form [ String: packet contents | Bool: Valid CRC | Int: Unscaled RSSI ]

ping(self, da, panid, sa, channel=None)

source code 

Not yet implemented.

Returns: None
None

jammer_on(self, channel=None)

source code 

Not yet implemented.

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

jammer_off(self, channel=None)

source code 

Not yet implemented.

Returns: None
None