scapy.layers.bluetooth4LE

Bluetooth 4LE layer

class scapy.layers.bluetooth4LE.BDAddrField(name, default, resolve=False)

Bases: scapy.fields.MACField

i2m(pkt, x)
m2i(pkt, x)
class scapy.layers.bluetooth4LE.BTLE

Bases: scapy.packet.Packet

aliastypes
static compute_crc(pdu, init=5592405)
fields_desc
BTLE fields

access_addr

XLEIntField

2391391958

crc

X3BytesField

None

hashret()
payload_guess

Possible sublayers: BTLE_ADV, BTLE_DATA

post_build(p, pay)
post_dissect(s)
pre_dissect(s)
class scapy.layers.bluetooth4LE.BTLEChanMapField(name, default)

Bases: scapy.fields.XByteField

addfield(pkt, s, val)
getfield(pkt, s)
class scapy.layers.bluetooth4LE.BTLE_ADV

Bases: scapy.packet.Packet

aliastypes
fields_desc
BTLE_ADV fields

RxAdd

BitEnumField (1 bit)

0

TxAdd

BitEnumField (1 bit)

0

RFU

BitField (2 bits)

0

PDU_type

BitEnumField (4 bits)

0

unused

BitField (2 bits)

0

Length

XBitField (6 bits)

None

payload_guess

Possible sublayers: BTLE_ADV_DIRECT_IND, BTLE_ADV_IND, BTLE_ADV_NONCONN_IND, BTLE_ADV_SCAN_IND, BTLE_CONNECT_REQ, BTLE_SCAN_REQ, BTLE_SCAN_RSP

post_build(p, pay)
class scapy.layers.bluetooth4LE.BTLE_ADV_DIRECT_IND

Bases: scapy.packet.Packet

aliastypes
fields_desc
BTLE_ADV_DIRECT_IND fields

AdvA

BDAddrField

None

InitA

BDAddrField

None

class scapy.layers.bluetooth4LE.BTLE_ADV_IND

Bases: scapy.packet.Packet

aliastypes
fields_desc
BTLE_ADV_IND fields

AdvA

BDAddrField

None

data

PacketListField

[]

class scapy.layers.bluetooth4LE.BTLE_ADV_NONCONN_IND

Bases: scapy.layers.bluetooth4LE.BTLE_ADV_IND

aliastypes
fields_desc
BTLE_ADV_NONCONN_IND fields

AdvA

BDAddrField

None

data

PacketListField

[]

class scapy.layers.bluetooth4LE.BTLE_ADV_SCAN_IND

Bases: scapy.layers.bluetooth4LE.BTLE_ADV_IND

aliastypes
fields_desc
BTLE_ADV_SCAN_IND fields

AdvA

BDAddrField

None

data

PacketListField

[]

class scapy.layers.bluetooth4LE.BTLE_CONNECT_REQ

Bases: scapy.packet.Packet

aliastypes
fields_desc
BTLE_CONNECT_REQ fields

InitA

BDAddrField

None

AdvA

BDAddrField

None

AA

XIntField

0

crc_init

X3BytesField

0

win_size

XByteField

0

win_offset

XLEShortField

0

interval

XLEShortField

0

latency

XLEShortField

0

timeout

XLEShortField

0

chM

BTLEChanMapField

0

SCA

BitField (3 bits)

0

hop

BitField (5 bits)

0

class scapy.layers.bluetooth4LE.BTLE_DATA

Bases: scapy.packet.Packet

aliastypes
fields_desc
BTLE_DATA fields

RFU

BitField (3 bits)

0

MD

BitField (1 bit)

0

SN

BitField (1 bit)

0

NESN

BitField (1 bit)

0

LLID

BitEnumField (2 bits)

0

len

ByteField

None

payload_guess

Possible sublayers: L2CAP_Hdr, CtrlPDU

post_build(p, pay)
class scapy.layers.bluetooth4LE.BTLE_PPI

Bases: scapy.layers.ppi.PPI_Element

Cooked BTLE PPI header

See ppi_btle_t in https://github.com/greatscottgadgets/libbtbb/blob/master/lib/src/pcap.c

aliastypes
fields_desc
BTLE_PPI fields

btle_version

ByteField

0

btle_channel

LEShortField

None

btle_clkn_high

ByteField

None

btle_clk_100ns

LEIntField

None

rssi_max

SignedByteField

None

rssi_min

SignedByteField

None

rssi_avg

SignedByteField

None

rssi_count

ByteField

None

class scapy.layers.bluetooth4LE.BTLE_RF

Bases: scapy.packet.Packet

Cooked BTLE link-layer pseudoheader.

http://www.whiterocker.com/bt/LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR.html

aliastypes
fields_desc
BTLE_RF fields

rf_channel

ByteField

0

signal

SignedByteField

-128

noise

SignedByteField

-128

access_address_offenses

ByteField

0

reference_access_address

XLEIntField

0

flags

FlagsField (16 bits)

<Flag 0 ()>

payload_guess

Possible sublayers: BTLE

class scapy.layers.bluetooth4LE.BTLE_SCAN_REQ

Bases: scapy.packet.Packet

aliastypes
answers(other)
fields_desc
BTLE_SCAN_REQ fields

ScanA

BDAddrField

None

AdvA

BDAddrField

None

class scapy.layers.bluetooth4LE.BTLE_SCAN_RSP

Bases: scapy.packet.Packet

aliastypes
answers(other)
fields_desc
BTLE_SCAN_RSP fields

AdvA

BDAddrField

None

data

PacketListField

[]

class scapy.layers.bluetooth4LE.CtrlPDU

Bases: scapy.packet.Packet

aliastypes
fields_desc
CtrlPDU fields

optcode

XByteField

0

version

ByteEnumField

0

Company

LEShortEnumField

0

subversion

XShortField

0