While on the flight to Derbycon 2019 I wanted to have a way to broadcast the conference schedule to WiFi so I didn't have to pull the program out. I didn't finish the build in time, but it may still be useful for others.
This project is designed to provide messages over wifi. It has two operating modes.
- Default A single file will be loaded and broadcast. This file is located in
ssid-rotator.pygrabs current date and time and broadcasts any lines that are for this hour, and the next hour. It loads the schedule from
To perform the rotation, this project contains a systemd timer, a shell script to broadcast ssid messages, and a ssid rotation python script.
The input file is located in
/boot so that one can remove the SD Card from the raspberry pi and load new messages without having to muck with the device
- Raspberry Pi
- Alfa AWUS036NH
- USB Battery
- MicroUSB Cable
- Network Cable
- Network Adapter that supports crossover detection
- Adafruit PiRTC - PCF8523 Real Time Clock (RTC)
- CR1220 coin cell battery for RTC
Setup Raspberry Pi
- Install the RTC
- Download Rasbian Lite
- Image SD Card
- Enable SSH
- Connect network cable from RPi to computer
- Clone the wifi-messages repo and run the setup script
apt-get install git -y
git clone https://github.com/vgrsec/wifi-messages.git
The first time you setup your wifi-messages pi make sure to be connected to the internet. Otherwise the RTC may not be programmed with the correct time and the clock rotation will fail
Setup WiFi Messages
/boot/wifi-messages/input/_default.txt for static messages.
Create files for the days you wish to broadcast messages in
The easiest way to modify the input files is to remove the sd card from the raspberry pi and put it into another device. This way you can use a text editor to edit the file without having to ssh into the pi.
ssid-rotator is looking for times in half hour increments. I am not a developer, and so the logic is only looking for the top of the hour and the half hour. It is also not capable of rotating over at midnight.
This script is launched by the systemd event to broadcast the ssid messages.
- NTP time sync
- Set Timezone
- airmon-ng is used to put the wifi card into broadcast mode.
- mdk3 broadcasts the ssid's from
This file shows the format that
ssid-rotator.py expects. The first four characters for the time is what the rotator looks at.
To perform a function test of your wifi-rotator copy input/_test.txt to input/%YYYYMMDD%.txt and watch it go