Repository navigation
feat: the unit finds the broker by a UDP beacon from the launcher - #16
Merged
Merged
Conversation
The launcher broadcasts a signed beacon once a second on UDP port 18830. The unit listens for it after Wi-Fi connects and uses the sender's address as the MQTT host, so the laptop's IP address may change. MQTT_HOST in secrets.h is now an optional fallback. When the beacon moves to another address the unit reconnects there, between cycles. Firmware 0.3.0.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mohanvd
added a commit
that referenced
this pull request
Nov 22, 2026
* feat: the unit finds the broker by a UDP beacon from the launcher The launcher broadcasts a signed beacon once a second on UDP port 18830. The unit listens for it after Wi-Fi connects and uses the sender's address as the MQTT host, so the laptop's IP address may change. MQTT_HOST in secrets.h is now an optional fallback. When the beacon moves to another address the unit reconnects there, between cycles. Firmware 0.3.0. * docs: first hardware run of the broker beacon on a phone hotspot
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15
The project network is moving to a phone hotspot, where the laptop's IP address changes every time. The unit now finds the broker by itself.
What changed
invigil startalso startspython -m invigil.beacon, which broadcastsinvigil broker <mqtt port> <tag>once a second on UDP port 18830, from every network address the laptop has.stopstops it, and the status screen has aBeaconline.MQTT_HOSTinsecrets.his an optional fallback, tried after 5 s without a beacon. When the beacon comes from another address and the old one has missed 3 beacons, the unit drops the old connection and connects to the new address.Tests
firmware/tests/test_portable.c.check_contract.pycompares the beacons the firmware expects with the onesinvigil/beacon.pybuilds.invigil/tests/test_beacon.pyfor the launcher side.Hardware
Flashed on unit N1: boots as 0.3.0 and the beacon listener self-check passes. Finding the broker on the hotspot is not checked yet. See the comments below.