Skip to content

Release v0.17.0

Choose a tag to compare

@GianfriAur GianfriAur released this 27 Aug 20:48
· 46 commits to master since this release
726ed94

Changed

  • Default PHP bumped to 8.4.25 (a drop-in patch update of 8.4.24; all 8 port patches apply
    unchanged and the source file set is identical). 8.4.24 stays available, like every other version.

Added

  • wifi: scan/join a WiFi network and create one, from PHP. An opt-in native extension for
    WiFi-capable SoCs (ESP32 / ESP32-S3 / C-series with a native radio, or an ESP32-P4 with a WiFi
    companion over ESP-HOSTED -- see the esp32-p4-wifi-c6 board below). Client (STA): wifi_scan() lists the nearby APs
    (ssid/bssid/rssi/channel/auth), wifi_connect($ssid, $password = null) joins one (open,
    WPA2, or WPA2/WPA3-transition -- it is PMF-capable, does WPA3-SAE, scans every channel, and
    auto-retries transient association drops so real phone hotspots connect reliably), plus wifi_ip() /
    wifi_rssi() / wifi_connected() / wifi_disconnect(). Access point
    (SoftAP): wifi_ap_start($ssid, $password = null, $channel, $max_conn) makes the board its own
    network with a built-in DHCP server (default 192.168.4.1), plus wifi_ap_ip() /
    wifi_ap_clients() / wifi_ap_stop(). Driven straight from esp_wifi; credentials are never baked
    into the config -- PHP passes them at runtime. Registered across every PHP version (8.3-8.5); ~600 KB
    of flash, so opt-in ([extensions.wifi] enabled = true). Verified on ESP32-S3-Zero hardware (scanned
    real networks, joined a WPA2/WPA3 network and got a DHCP lease, and brought up a SoftAP). New
    wifi-connect (credentials come from a gitignored .env baked into the
    firmware) and wifi-ap examples.
  • The web-server model now runs on WiFi-only ESP32-S3 boards. Every ESP32-S3 has WiFi on the
    die, so all S3 board profiles (esp32-s3-zero, esp32-s3-pico, esp32-s3-eth) now advertise the
    web-server project type -- previously reserved for boards with wired Ethernet. The HTTP server was
    always independent of the wired-network path; the network simply comes from the wifi extension
    instead. A [web-server] init (server_init) script brings WiFi up before the server binds, so a
    board can create its own network and serve pages over it with no router or cable. New
    wifi-ap-s3-rgb-manage example: the board starts a SoftAP and
    serves a live web page (from PHP) that controls the onboard RGB LED's colour and brightness --
    verified end to end on ESP32-S3-Zero hardware (AP up, page served over HTTP on the WiFi, LED reacts
    live to the sliders). ($_SERVER['SERVER_ADDR'] reads 0.0.0.0 on WiFi-only boards -- use
    wifi_ap_ip() / wifi_ip() for the real address.)
  • New board esp32-p4-wifi-c6: WiFi on the radio-less ESP32-P4, via a companion. The P4 has no
    built-in radio, but this board (the ESP32-P4-WIFI6) pairs it with an on-board ESP32-C6
    over SDIO, running ESP-HOSTED: esp_wifi_remote re-exposes the esp_wifi_* API and forwards it
    to the companion, so the wifi extension and the web-server model work unchanged. The host
    components (esp_wifi_remote + esp_hosted) are pulled automatically for P4 builds (a phpflash build downloads them via main/idf_component.yml, gated to the esp32p4 target; git-ignored, like
    the fetched PHP source). Verified on hardware: PHP brought up a SoftAP (wifi_ap_start()), the C6
    answered over SDIO using the ESP32-P4-Function-EV-Board reference pins with no schematic needed
    (already pre-flashed), and the board served a page over its own WiFi. With the P4's 32 MB PSRAM this
    even brings full frameworks over WiFi into reach. See
    docs/reference/special-boards.md.
  • phpinfo() gains a "PHP Baremetal Infos" table. A second table right under phpinfo()'s general
    one, showing the project name (from the config's name, passed by phpflash), the board
    (BOARD_NAME), and the php-esp32 and ESP-IDF versions. The firmware sets these as
    C globals before the engine starts (main.c), and a small per-version patch to
    ext/standard/info.c renders the table. The same values are also exposed in $_SERVER as
    PHP_ESP32_* (deliberately kept out of $_ENV and the process environment).