Metro ESP32-P4 wifi issue/packet loss

オープン
#11,682 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@dhalbert がすでに取り組んでいます。

2026年11月3日 から。

評価

難易度
4/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, embedded-iot, python

調査の方向性

The report names CircuitPython 11.0.0-alpha.2 on the Metro ESP32-P4 and shows intermittent ping, DNS, and HTTPS failures, but it does not identify a failing source file or test. Start by locating the ESP32-P4 Wi-Fi driver and its networking tests, then compare connection and request behavior with the ESP32-S2 results in the issue. Done when the cause is isolated and the reported network operations work reliably on the Metro.

索引モデルが issue の本文から書いたものです。

説明

bug esp32-p4 network
CircuitPython version and board name
Adafruit CircuitPython 11.0.0-alpha.2-22-gbe6f0a678b on 2026-10-27; Adafruit Metro ESP32-P4 with ESP32P4
Code/REPL
import os
import ipaddress
import ssl
import wifi
import socketpool
import adafruit_requests

# URLs to fetch from
TEXT_URL = "http://wifitest.adafruit.com/testwifi/index.html"
JSON_QUOTES_URL = "https://www.adafruit.com/api/quotes.php"
JSON_STARS_URL = "https://api.github.com/repos/adafruit/circuitpython"

print(f"My MAC address: {[hex(i) for i in wifi.radio.mac_address]}")

print("Available WiFi networks:")
for network in wifi.radio.start_scanning_networks():
    print("\t%s\t\tRSSI: %d\tChannel: %d" % (str(network.ssid, "utf-8"),
                                             network.rssi, network.channel))
wifi.radio.stop_scanning_networks()

print(f"Connecting to {os.getenv('CIRCUITPY_WIFI_SSID')}")
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID"), os.getenv("CIRCUITPY_WIFI_PASSWORD"))
print(f"Connected to {os.getenv('CIRCUITPY_WIFI_SSID')}")
print(f"My IP address: {wifi.radio.ipv4_address}")

ping_ip = ipaddress.IPv4Address("8.8.8.8")
ping = wifi.radio.ping(ip=ping_ip)

# retry once if timed out
if ping is None:
    ping = wifi.radio.ping(ip=ping_ip)

if ping is None:
    print("Couldn't ping 'google.com' successfully")
else:
    # convert s to ms
    print(f"Pinging 'google.com' took: {ping * 1000} ms")

pool = socketpool.SocketPool(wifi.radio)
requests = adafruit_requests.Session(pool, ssl.create_default_context())

print(f"Fetching text from {TEXT_URL}")
response = requests.get(TEXT_URL)
print("-" * 40)
print(response.text)
print("-" * 40)

print(f"Fetching json from {JSON_QUOTES_URL}")
response = requests.get(JSON_QUOTES_URL)
print("-" * 40)
print(response.json())
print("-" * 40)

print()

print(f"Fetching and parsing json from {JSON_STARS_URL}")
response = requests.get(JSON_STARS_URL)
print("-" * 40)
print(f"CircuitPython GitHub Stars: {response.json()['stargazers_count']}")
print("-" * 40)

print("Done")
Behavior

the Metro is able to connect to wifi, but when it tries to fetch data it throws errors or can be extremely slow. here is the result from our usual circuitpython wifi test (the two networks are my local ones):

My MAC address: ['0xd4', '0x5', '0x92', '0x9', '0xc', '0x8c']
Available WiFi networks:
        ****                RSSI: -62       Channel: 11
        ****-IoT               RSSI: -62       Channel: 11
Connecting to **** 
Connected to **** 
My IP address: 192.168.1.249
Pinging 'google.com' took: 316.9999 ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)
----------------------------------------
Fetching json from https://www.adafruit.com/api/quotes.php
Traceback (most recent call last):
  File "code.py", line 55, in <module>
  File "adafruit_requests.py", line 718, in get
  File "adafruit_requests.py", line 646, in request
  File "adafruit_connection_manager.py", line 331, in get_socket
  File "adafruit_connection_manager.py", line 248, in _get_connected_socket
OSError: (-29312, 'MBEDTLS_ERR_SSL_CONN_EOF')
My MAC address: ['0xd4', '0x5', '0x92', '0x9', '0xc', '0x8c']
Available WiFi networks:
        ****                RSSI: -64       Channel: 11
        ****-IoT               RSSI: -64       Channel: 11
Connecting to ****-IoT
Connected to ****-IoT
My IP address: 192.168.1.249
Couldn't ping 'google.com' successfully
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)
----------------------------------------
Fetching json from https://www.adafruit.com/api/quotes.php
Traceback (most recent call last):
  File "code.py", line 55, in <module>
  File "adafruit_requests.py", line 718, in get
  File "adafruit_requests.py", line 646, in request
  File "adafruit_connection_manager.py", line 328, in get_socket
gaierror: (-2, 'Name or service not known')
Description

i also ran the same code on a feather esp32-s2 and got these results (same location, router is right outside open office door)

My MAC address: ['0x7c', '0xdf', '0xa1', '0x9d', '0x7c', '0x8a']
Available WiFi networks:
        ****                RSSI: -55       Channel: 11
        ****-IoT               RSSI: -55       Channel: 11
Connecting to ****-IoT
Connected to ****-IoT
My IP address: 192.168.1.239
Pinging 'google.com' took: 29.0 ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)
----------------------------------------
Fetching json from https://www.adafruit.com/api/quotes.php
----------------------------------------
[{'text': 'Propel, propel, propel your craft softly down liquid solution. Ecstatically, ecstatically, ecstatically, ecstatically, existence is simply illusion', 'author': 'Fred Rogers'}]
----------------------------------------

Fetching and parsing json from https://api.github.com/repos/adafruit/circuitpython
----------------------------------------
CircuitPython GitHub Stars: 4572
----------------------------------------
Done

i also tried an adafruit io example (https://learn.adafruit.com/pico-w-wifi-with-circuitpython/pico-w-with-adafruit-io), replacing sensor data with ints and timed how long it took to fetch feeds with time.monotonic():

connected to io
now: 184.887, from start: 0.004974366
feeds created
now: 357.666, from start: 172.784

was also seeing the same OSError: (-29312, 'MBEDTLS_ERR_SSL_CONN_EOF') from the IO test or a timeout error

Additional information

i did try switching between my 5ghz network and 2.4ghz iot network, same results. also turned off web workflow to rule that out.

主要言語
C
スター
4.6k
フォーク
1.4k
平均マージ
1日 9時間
マージ済み PR(30日)
173

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

adafruit/circuitpython のほかの issue

adafruit/circuitpython の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。