scapy.contrib.eddystone module

scapy.contrib.eddystone - Google Eddystone Bluetooth LE proximity beacons.

The Eddystone specification can be found at: https://github.com/google/eddystone/blob/master/protocol-specification.md

These beacons are used as building blocks for other systems:

class scapy.contrib.eddystone.EddystoneURLField(name, default, fmt='H', remain=0)

Bases: scapy.fields.StrField

any2i(pkt, x)

Try to understand the most input values possible and make an internal value from them

i2m(pkt, x)

Convert internal value to machine value

m2i(pkt, x)

Convert machine value to internal value

class scapy.contrib.eddystone.Eddystone_EID

Bases: scapy.packet.Packet

An Eddystone type for transmitting encrypted, ephemeral identifiers.

This implementation does not support decrypting this data.

https://github.com/google/eddystone/tree/master/eddystone-eid

aliastypes = [<class 'scapy.contrib.eddystone.Eddystone_EID'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Eddystone_EID).tx_power>, <Field (Eddystone_EID).eid>]
class scapy.contrib.eddystone.Eddystone_Frame

Bases: scapy.packet.Packet, scapy.layers.bluetooth.LowEnergyBeaconHelper

The base Eddystone frame on which all Eddystone messages are built.

https://github.com/google/eddystone/blob/master/protocol-specification.md

aliastypes = [<class 'scapy.contrib.eddystone.Eddystone_Frame'>, <class 'scapy.packet.Packet'>]
build_eir()

Builds a list of EIR messages to wrap this frame.

fields_desc = [<Field (Eddystone_Frame).type>, <Field (Eddystone_Frame).reserved>]
payload_guess = [({'type': 0}, <class 'scapy.contrib.eddystone.Eddystone_UID'>), ({'type': 1}, <class 'scapy.contrib.eddystone.Eddystone_URL'>), ({'type': 2}, <class 'scapy.contrib.eddystone.Eddystone_TLM'>), ({'type': 3}, <class 'scapy.contrib.eddystone.Eddystone_EID'>)]
class scapy.contrib.eddystone.Eddystone_TLM

Bases: scapy.packet.Packet

An Eddystone type for transmitting beacon telemetry information.

https://github.com/google/eddystone/tree/master/eddystone-tlm

aliastypes = [<class 'scapy.contrib.eddystone.Eddystone_TLM'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Eddystone_TLM).version>]
payload_guess = [({'version': 0}, <class 'scapy.contrib.eddystone.Eddystone_TLM_Unencrypted'>), ({'version': 1}, <class 'scapy.contrib.eddystone.Eddystone_TLM_Encrypted'>)]
class scapy.contrib.eddystone.Eddystone_TLM_Encrypted

Bases: scapy.packet.Packet

A subtype of Eddystone-TLM for transmitting telemetry in encrypted form.

This implementation does not support decrypting this data.

https://github.com/google/eddystone/blob/master/eddystone-tlm/tlm-encrypted.md

aliastypes = [<class 'scapy.contrib.eddystone.Eddystone_TLM_Encrypted'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Eddystone_TLM_Encrypted).etlm>, <Field (Eddystone_TLM_Encrypted).salt>, <Field (Eddystone_TLM_Encrypted).mic>]
class scapy.contrib.eddystone.Eddystone_TLM_Unencrypted

Bases: scapy.packet.Packet

A subtype of Eddystone-TLM for transmitting telemetry in unencrypted form.

https://github.com/google/eddystone/blob/master/eddystone-tlm/tlm-plain.md

aliastypes = [<class 'scapy.contrib.eddystone.Eddystone_TLM_Unencrypted'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Eddystone_TLM_Unencrypted).batt_mv>, <Field (Eddystone_TLM_Unencrypted).temperature>, <Field (Eddystone_TLM_Unencrypted).adv_cnt>, <Field (Eddystone_TLM_Unencrypted).sec_cnt>]
class scapy.contrib.eddystone.Eddystone_UID

Bases: scapy.packet.Packet

An Eddystone type for transmitting a unique identifier.

https://github.com/google/eddystone/tree/master/eddystone-uid

aliastypes = [<class 'scapy.contrib.eddystone.Eddystone_UID'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Eddystone_UID).tx_power>, <Field (Eddystone_UID).namespace>, <Field (Eddystone_UID).instance>, <Field (Eddystone_UID).reserved>]
class scapy.contrib.eddystone.Eddystone_URL

Bases: scapy.packet.Packet

An Eddystone type for transmitting a URL (to a web page).

https://github.com/google/eddystone/tree/master/eddystone-url

aliastypes = [<class 'scapy.contrib.eddystone.Eddystone_URL'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Eddystone_URL).tx_power>, <Field (Eddystone_URL).url_scheme>, <Field (Eddystone_URL).url>]
static from_url(url)

Creates an Eddystone_Frame with a Eddystone_URL for a given URL.

to_url()