scapy.contrib.altbeacon

scapy.contrib.altbeacon - AltBeacon Bluetooth LE proximity beacons.

The AltBeacon specification can be found at: https://github.com/AltBeacon/spec

class scapy.contrib.altbeacon.AltBeacon(_pkt, /, *, header=b'\xbe\xac', id1=None, id2=None, id3=None, tx_power=None, mfg_reserved=None)[source]

Bases: Packet, LowEnergyBeaconHelper

AltBeacon broadcast frame type.

https://github.com/AltBeacon/spec

aliastypes
build_eir()[source]

Builds a list of EIR messages to wrap this frame.

fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             HEADER            |              ID1              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |              ID2              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              ID3              |    TX POWER   |  MFG RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. AltBeacon                          
AltBeacon fields

header

StrFixedLenField

b'\xbe\xac'

id1

UUIDField

None

id2

ShortField

None

id3

ShortField

None

tx_power

MayEnd

None

mfg_reserved

ByteField

None

magic = b'\xbe\xac'
classmethod magic_check(payload)[source]

Checks if the given payload is for us (starts with our magic string).