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 = [<class 'scapy.contrib.altbeacon.AltBeacon'>, <class 'scapy.packet.Packet'>]
build_eir()[source]

Builds a list of EIR messages to wrap this frame.

fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<StrFixedLenField (AltBeacon).header>, <UUIDField (AltBeacon).id1>, <ShortField (AltBeacon).id2>, <ShortField (AltBeacon).id3>, <scapy.fields.MayEnd object>, <ByteField (AltBeacon).mfg_reserved>]
magic = b'\xbe\xac'
classmethod magic_check(payload)[source]

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