Skip to content

#28: Terminate ZPC upon USB/Serial connection loss - #31

Draft
Márk Mihalik | SiliconLabs (silabs-MarkM) wants to merge 1 commit into
SiliconLabsSoftware:mainfrom
silabs-MarkM:28-terminate-zpc-upon-ncp-removal
Draft

#28: Terminate ZPC upon USB/Serial connection loss#31
Márk Mihalik | SiliconLabs (silabs-MarkM) wants to merge 1 commit into
SiliconLabsSoftware:mainfrom
silabs-MarkM:28-terminate-zpc-upon-ncp-removal

Conversation

@silabs-MarkM

@silabs-MarkM Márk Mihalik | SiliconLabs (silabs-MarkM) commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Issue

Closes: #28

Change

Feature:

  • Exit ZPC when the NCP serial device is unplugged (hangup / fatal serial errno → RX kill switch)

Bugfix:

  • ACK timeouts reconnect via zwapi_connection_restart() again (serial reopen or IP reconnect); they do not mark the serial port lost
  • Exhausted TX retries fail the frame only; they do not brick a live SerialAPI
  • mark_lost is a no-op on IP (serial never opened); do not close the serial fd from the TX thread
  • Detect POLLHUP even when the RX poll queue still has work
  • CMake skips command-class dirs with no CMakeLists.txt (leftover Time CC tree)

Not in this PR:

  • IP exit(1) on recv/send (pre-existing)

Checklist

@silabs-MarkM Márk Mihalik | SiliconLabs (silabs-MarkM) added On roadmap On the official roadmap and will be implemented by Silicon Labs Bug Issue is a bug report Silicon Labs development PR contents developed by Silicon Labs CTT Requested (Smoke) CTT Smoke Testing is requested from CTT Automation labels Aug 26, 2026
Signed-off-by: Márk Mihalik <Mark.Mihalik@silabs.com>
@siliconlabsdevops-svc-devops

Copy link
Copy Markdown

GitHub PR artifact is not available. Re-run CI, then apply the CTT label again.

@siliconlabsdevops-svc-devops siliconlabsdevops-svc-devops Bot removed the CTT Requested (Smoke) CTT Smoke Testing is requested from CTT Automation label Aug 26, 2026
@silabs-MarkM Márk Mihalik | SiliconLabs (silabs-MarkM) added the Under discussion Request or issue under discussion label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Issue is a bug report On roadmap On the official roadmap and will be implemented by Silicon Labs Silicon Labs development PR contents developed by Silicon Labs Under discussion Request or issue under discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZPC does not terminate upon SAPI controller device poweroff

1 participant