29 lines
822 B
C
29 lines
822 B
C
/*
|
|
* broadcast_beacon.h
|
|
*
|
|
* Copyright (c) 2025 Umber Networks & Robert McMahon
|
|
* All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted under the terms of the BSD 3-Clause License.
|
|
*/
|
|
|
|
#ifndef BROADCAST_BEACON_H
|
|
#define BROADCAST_BEACON_H
|
|
|
|
#include "esp_err.h"
|
|
|
|
/**
|
|
* @brief Initialize the broadcast beacon (registers event handlers).
|
|
*
|
|
* On IP_EVENT_STA_GOT_IP, starts periodic UDP broadcast of device info.
|
|
* On WIFI_EVENT_STA_DISCONNECTED, stops the beacon.
|
|
*
|
|
* Beacon payload (JSON) includes: ip, mask, gw, dhcp, mac, fiwi_telemetry.
|
|
* fiwi_telemetry is true if SD card has file "fiwi-telemetry".
|
|
* Listen on UDP port 5555 for broadcast from 255.255.255.255.
|
|
*/
|
|
esp_err_t broadcast_beacon_init(void);
|
|
|
|
#endif /* BROADCAST_BEACON_H */
|