Manages Service Registration Protocol (SRP) for network discoverability.
More...
Manages Service Registration Protocol (SRP) for network discoverability.
This module handles the registration of the device's Host Name, IP Address, and Services on the Thread Network's SRP Server (usually the Border Router). Purpose: Without SRP registration, other devices cannot resolve this device's name to an IP address using DNS-SD (DNS Service Discovery), effectively making this device invisible for pairing. Key Functions:
- Registers the device hostname (e.g., device_type_EUI64).
- Registers the _coap._udp service.
- Manages Lease Renewals automatically via OpenThread Auto-Start mode.
- Version
- 0.1
- Date
- 06-09-2025
- Author
- Jan Łukaszewicz (plhar.nosp@m.eo@g.nosp@m.mail..nosp@m.com)
- Copyright
- © 2025 MIT LICENCE
◆ OTAPP_DNS_LEASE_GUARD
◆ OTAPP_DNS_LEASE_TASK_DELAY
| #define OTAPP_DNS_LEASE_TASK_DELAY 300 |
◆ OTAPP_DNS_LEASE_TIME
| #define OTAPP_DNS_LEASE_TIME 7200 |
◆ OTAPP_DNS_M_KEY_LEASE_TIME
| #define OTAPP_DNS_M_KEY_LEASE_TIME 86400 |
◆ otapp_srpClientUpdateHostAddress()
| void otapp_srpClientUpdateHostAddress |
( |
otInstance * | instance | ) |
|
Updates the registered Host Address on the SRP Server.
This function should be called when the device's Mesh-Local EID (RLOC/ML-EID) changes. It ensures the DNS server points to the current, valid IPv6 address of this device.
- Parameters
-
| instance | Pointer to the OpenThread instance. |
◆ otapp_srpInit()
Initializes the SRP Client and starts the registration process.
This function:
- Sets the device host name (from Device Naming).
- Enables the OpenThread SRP Client Auto-Start mode.
- Registers the default services.
- Returns
- int8_t Result of the operation (typically 0/OK).