esp-protocomm
Copyright (c) 2026 Clark Communications Corporation

This product is licensed under the Apache License, Version 2.0 (see LICENSE)
and includes software developed by Espressif Systems, licensed under the same
license. A copy is available at:

    http://www.apache.org/licenses/LICENSE-2.0

This is an unofficial client. It is not affiliated with, endorsed by, or
supported by Espressif Systems.

--------------------------------------------------------------------------------
Espressif Systems (Shanghai) CO LTD -- ESP-IDF
SPDX-License-Identifier: Apache-2.0
Source: https://github.com/espressif/esp-idf
--------------------------------------------------------------------------------

The following files are copied verbatim from ESP-IDF, generated by the protocol
buffer compiler from Espressif's .proto definitions:

    src/esp_protocomm/proto/constants_pb2.py
    src/esp_protocomm/proto/sec0_pb2.py
    src/esp_protocomm/proto/sec1_pb2.py
    src/esp_protocomm/proto/sec2_pb2.py
    src/esp_protocomm/proto/session_pb2.py
        from components/protocomm/python/

    src/esp_protocomm/proto/wifi_config_pb2.py
    src/esp_protocomm/proto/wifi_constants_pb2.py
    src/esp_protocomm/proto/wifi_scan_pb2.py
        from components/wifi_provisioning/python/

MODIFICATION: their flat imports (`import sec1_pb2`) were rewritten to
package-relative form (`from . import sec1_pb2`) so they resolve inside this
package instead of requiring IDF_PATH on sys.path. No other changes.

The following files are derived works, substantially rewritten but based on
Espressif's implementations:

    src/esp_protocomm/security1.py
        from tools/esp_prov/security/security1.py
        MODIFICATION: operates on bytes rather than latin-1 str; the handshake
        is exposed as explicit methods instead of a callback-driven state
        machine; raises typed errors; no global verbosity flag.

    src/esp_protocomm/ble.py
        from tools/esp_prov/transport/ble_cli.py and transport/transport_ble.py
        MODIFICATION: bytes rather than latin-1 str; no interactive device
        picker; no console-fallback client; typed errors; endpoint table always
        read from the device's 0x2901 descriptors.

    src/esp_protocomm/wifi.py
        from tools/esp_prov/prov/wifi_prov.py
        MODIFICATION: bytes throughout; typed status results instead of printing
        and returning strings; adds a polling helper with a timeout.

Everything else in this repository is original work covered by LICENSE.
