Skip to content

This repo contains ansible playbooks for the automatic setup of eddystone-UID beacons (via Raspberry Pi s)

Notifications You must be signed in to change notification settings

Indoor-Positioning/ansible-playbooks

Repository files navigation

Ansible playbooks for expiremental setup of Eddystone-UID beacons via Raspberry Pi

This repo includes 3 ansible playbooks.

Playbook variables (applicable to site.yml only)

Eddystone-UID namespace:

namespace: "01 23 45 67 89 ab cd ef 01 23"

The 10-byte namespace - most probably it ll be common between the rpis of the same group.

Eddystone-UID instance:

instance: "00 00 00 00 00 00"

The 6-byte pi-specific instance

Tx Power Level calibrated_power

calibrated_power: "00"

The signed 8 bit integer that corresponds to the Transmit Power Level characteristic and represents the current transmit power level in dBm. the level ranges from -100 dBm to +20 dBm.

This playbook creates the ansible user on the Raspberry pi, and gives sudo permissions without asking for password. Pi user is assumed for this play, as this is the default user on Raspbian.

ansible-playbook -i hosts setup-ansible-user.yml 

(Modify hosts accordingly, based on the ip addresses of the raspberry pis).

This playbook sets up the raspberry pis to le advertising mode, and sends le advertisements based on the namespace and instance that are defined via host variables.

We first check whether pi is ble-capable (e.g bluez version >= 4.99), then bring the hci0 interface up, and finally we start broadcasting non-connectable eddystone-uid ads.

The Ranging Data (Calibrated Tx power at 0 m) is defaulted to 00, and is meant to be overriden based on the RSSI measured at 0 m. The namespace is meant to be common between the pis, and is defined under group_vars/pi.yml The instance is host specific, and is defined under host_vars/<pi_ip_address>

Execution:

ansible-playbook -i hosts site.yml 

This playbook stops the le advertising.

ansible-playbook -i hosts stop-advertising.yml 

About

This repo contains ansible playbooks for the automatic setup of eddystone-UID beacons (via Raspberry Pi s)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published