Package killerbee :: Module dev_freakduino :: Class FREAKDUINO
[hide private]
[frames] | no frames]

Class FREAKDUINO

source code

Instance Methods [hide private]
None
__init__(self, serialpath)
Instantiates the KillerBee class for our sketch running on ChibiArduino on Freakduino hardware.
source code
None
close(self)
Closes the serial port.
source code
 
check_capability(self, capab) source code
 
get_capabilities(self) source code
None
__set_capabilities(self)
Sets the capability information for Freakdruino device based on the currently loaded sketch.
source code
List
get_dev_info(self)
Returns device information in a list identifying the device.
source code
 
__send_cmd(self, cmdstr, arg=None) source code
 
__serial_cmd(self, cmdstr, arg=None)
Sends a command over the self.conn serial connection.
source code
 
eeprom_dump(self) 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 packet data as a string, else None.
source code
 
pnext_rec(self, timeout=100) source code
 
getCaptureDateTime(self, data) source code
 
processLocationUpdate(self, ldata)
Take a location string passed from the device and update the driver's internal state of last received location.
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
None
jammer_off(self, channel=None)
Not yet implemented.
source code
Method Details [hide private]

__init__(self, serialpath)
(Constructor)

source code 

Instantiates the KillerBee class for our sketch running on ChibiArduino on Freakduino hardware.

Parameters:
  • serialpath - /dev/ttyUSB* type serial port identifier
Returns: None
None

close(self)

source code 

Closes the serial port. After closing, must reinitialize class again before use.

Returns: None
None

__set_capabilities(self)

source code 

Sets the capability information for Freakdruino device based on the currently loaded sketch.

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.

__serial_cmd(self, cmdstr, arg=None)

source code 

Sends a command over the self.conn serial connection. Ex: If provided cmdstr = "C!N" it will send "SC!N", telling the device to turn on sniffing ("N"), and it expects to receive a confirmation back "&C!N" to confirm success.

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 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 ]

processLocationUpdate(self, ldata)

source code 

Take a location string passed from the device and update the driver's internal state of last received location. Format of ldata: longlatialtidate

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