Add configuration system and ARP-based device discovery
Implement comprehensive configuration management with CLI flags for WiFi interface, device discovery method, and file paths. Add ARP table parsing as an alternative to DHCP leases for more reliable device detection. Improve WiFi scanning to handle concurrent scan requests gracefully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
accd7e75d8
commit
2b3a5b89f8
8 changed files with 156 additions and 28 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/nemunaire/repeater/internal/config"
|
||||
"github.com/nemunaire/repeater/internal/device"
|
||||
"github.com/nemunaire/repeater/internal/hotspot"
|
||||
"github.com/nemunaire/repeater/internal/logging"
|
||||
|
|
@ -103,8 +104,8 @@ func ToggleHotspot(c *gin.Context, status *models.SystemStatus) {
|
|||
}
|
||||
|
||||
// GetDevices returns connected devices
|
||||
func GetDevices(c *gin.Context) {
|
||||
devices, err := device.GetConnectedDevices()
|
||||
func GetDevices(c *gin.Context, cfg *config.Config) {
|
||||
devices, err := device.GetConnectedDevices(cfg)
|
||||
if err != nil {
|
||||
logging.AddLog("Système", "Erreur lors de la récupération des appareils: "+err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Erreur lors de la récupération des appareils"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue