micropython / micropython/micropython-lib
esp32 UDP socket bind()/recvfrom(): incoming empty packet crashes the system
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 2.9k
- フォーク
- 1.1k
- 平均マージ
- 7日 6時間
- マージ済み PR(30日)
- 3
説明
I'm using the following image:
MicroPython v1.20.0-206-g33b403dfb-kaki5 on 2023-07-11; ESP32 CAMERA w/SSL (KAKI5) with ESP32 on an AiThinker ESP32-CAM.
When listening for incoming UDP packets, if the packet has a payload, everything works normally. If the packet is empty, instead of blocking, the receive loop begins looping very fast, receiving a bogus empty packet every time, which locks up the system.
Un-/comment MESSAGE="" after properly setting TARGET_IP in pc-tester.py (which is run from PC), and setting SSID and PASSWORD in notifications.py (which should be uploaded to mpy) to see the difference (you may also want to comment the wifi.ifconfig(...) line if using dynamic IP.
Notice the timestamps in the picture. For wrong.png, the timestamps are way too close, even though pc-tester.py is only sending once per second. The top picture is the wrong case, the bottom one is the correct case, when the udp packet has the payload foo. In the wrong case, the IP and port are then also reported incorrectly.
Is this a bug, or am I not paying attention to some quirk?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue に記載されている ESP32-CAM のセットアップを使用して、MESSAGE を空にした場合と payload を指定した場合の両方で pc-tester.py と notifications.py を実行します。受信ループのタイミングと報告された IP およびポートを比較します。空の UDP パケットによって高速な不正な受信ループやシステムロックアップが発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- embedded-iot, networking
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100