Skip to content

feat: start arduino-router-serial only if serial available#51

Open
lucarin91 wants to merge 5 commits intoarduino:mainfrom
lucarin91:stop-serial-in-host-mode
Open

feat: start arduino-router-serial only if serial available#51
lucarin91 wants to merge 5 commits intoarduino:mainfrom
lucarin91:stop-serial-in-host-mode

Conversation

@lucarin91
Copy link
Copy Markdown
Contributor

@lucarin91 lucarin91 commented Apr 24, 2026

Motivation

We need the serial forward to ide2 only if the linux serial is up. If the board is in SBC mode, it will not be available.

Change description

Use the path trigger for starting socat only in usb mode.

Additional Notes

Reviewer checklist

  • PR addresses a single concern.
  • PR title and description are properly filled.
  • Changes will be merged in main.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.

@lucarin91 lucarin91 requested review from a team and facchinm April 24, 2026 13:34
@lucarin91 lucarin91 changed the title Stop serial in host mode feat: start arduino-router-serial only if serial available Apr 24, 2026
@lucarin91 lucarin91 marked this pull request as ready for review April 24, 2026 13:37
@facchinm
Copy link
Copy Markdown
Member

LGTM as a first fix, but it would be awesome to start/restart the service when ttyGS0 appears/disappears (eg. if the boards is powered by VIN and the user connects the PC on the fly)

@lucarin91 lucarin91 self-assigned this Apr 27, 2026
@lucarin91
Copy link
Copy Markdown
Contributor Author

LGTM as a first fix, but it would be awesome to start/restart the service when ttyGS0 appears/disappears (eg. if the boards is powered by VIN and the user connects the PC on the fly)

That is already working like that, the .path triggers the unit restart when ttyGSO appears

After=network.target arduino-router.service
Wants=network.target arduino-router.service
Requires=arduino-router.service
ConditionPathExists=/dev/ttyGS0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed, the service will start because of the path Unit

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.

3 participants