livoxGen/Proto1: Refine auto-detection vs heuristic logic

This commit is contained in:
2025-09-09 19:54:14 -04:00
parent 73b2d981f9
commit 0449e557b0
4 changed files with 115 additions and 20 deletions
+17 -1
View File
@@ -145,7 +145,23 @@ The `livoxProto1` provider accepts the following parameters:
## Device Discovery and Connection
The specification uses a retry-based connection strategy:
The specification uses a retry-based connection strategy with two different approaches:
### Connection Methods
**1. Broadcast-Based Connection (connectToKnownDeviceReq)**
- Uses device IP addresses discovered from broadcast advertisements
- **smo-ip parameter**: Optional - if omitted, driver auto-detects the appropriate interface
- **smo-subnet-nbits parameter**: Optional - used for validation if smo-ip is provided
- **When to use**: When devices are actively broadcasting their presence
**2. Heuristic Connection (connectByDeviceIdentifierReq)**
- Generates device IP addresses from serial numbers using network prefix
- **smo-ip parameter**: **Required** - needed to determine network prefix for IP generation
- **smo-subnet-nbits parameter**: **Required** - needed to calculate valid device IP addresses
- **When to use**: When devices are not broadcasting or for initial setup
### Connection Strategy
1. **Initial Check**: Check if device is already known from broadcasts
2. **Direct Connect**: Attempt direct connection based on calculated IP address