Skip to content

Fix WiFi ELM initialization deadlock - #1723

Merged
Furtif merged 1 commit into
cedricp:masterfrom
Vape2Die:fix/wifi-elm-init-deadlock
Apr 10, 2026
Merged

Furtif merged 1 commit into
cedricp:masterfrom
Vape2Die:fix/wifi-elm-init-deadlock

Conversation

@Vape2Die

Copy link
Copy Markdown
Contributor

Summary
Fixes a startup deadlock with some WiFi ELM327 adapters that remain silent until receiving a carriage return.

Problem
DDT4ALL waits for the initial '>' prompt before sending ATZ. Some WiFi ELM adapters do not emit this prompt until they receive '\r', causing initialization to hang indefinitely when the socket is blocking.

Fix

  • Send '\r' before the initial prompt wait for WiFi adapters
  • Ensure expect() does not block indefinitely on WiFi sockets by using a bounded readiness check

Result
WiFi ELM adapters that previously required manual wake-up (e.g. pressing Enter via netcat) now initialize correctly in DDT4ALL.

Reproduction (before fix)

  1. Connect to WiFi ELM327
  2. Start DDT4ALL
  3. Click "Connected mode"
  4. Initialization hangs until external input is sent to the adapter

After fix
Initialization completes without external interaction.

Tested

  • WiFi ELM327 (192.168.0.10:35000)
  • Verified ATZ / ATI responses
  • Confirmed DDT4ALL connects without manual intervention

@Furtif
Furtif requested review from Furtif and removed request for Furtif April 10, 2026 15:37
@Furtif
Furtif merged commit f366f3d into cedricp:master Apr 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants