Skip to content

feat: add Raspberry Pi Pico 2 (RP2350) to supported devices - #1004

Open
Joaquincuevas wants to merge 3 commits into
meshtastic:masterfrom
Joaquincuevas:feat/supported-device-pico2
Open

Joaquincuevas wants to merge 3 commits into
meshtastic:masterfrom
Joaquincuevas:feat/supported-device-pico2

Conversation

@Joaquincuevas

@Joaquincuevas Joaquincuevas commented Nov 3, 2026 •

Copy link
Copy Markdown
  • Adds a pico2 SupportedDevice entry (Raspberry Pi Pico 2, rp2350, VID 2e8a / PID 000f) and appends it to supported_devices. Closes SupportedDevice : pico_2_rp2350 SupportedDevice #973.
  • PID comes from arduino-pico boards.txt (rpipico2.pid.0). Detection matches on VID only, so other 2e8a devices will also match this entry.
  • SupportedDevice.__init__ now normalizes VID/PID (lower case, strips 0x, zero-pads to 4 digits), with a unit test in meshtastic/tests/test_supported_device.py.
  • Possible follow-up: the comment/docstring tidy-up from the patch attached to SupportedDevice : pico_2_rp2350 SupportedDevice #973 is left out to keep this PR minimal.

Summary by CodeRabbit

  • New Features
    • Added Raspberry Pi Pico 2 support, with device detection available on Linux, macOS, and Windows using its USB identifiers.
  • Improvements
    • USB identifiers are now stored in a consistent format: uppercase letters are converted to lowercase, optional 0x prefixes are removed, and nonempty identifiers shorter than four characters are padded. Missing identifiers remain unchanged.
  • Detection is VID-only, so other 2e8a devices (BOOTSEL, Debug Probe 2e8a:000c) will also match; PID-based filtering could be a follow-up.
  • Not tested on hardware; PID from arduino-pico boards.txt (rpipico2.pid.0=0x000f).
  • Happy to follow up with pico / pico2w / seeed_xiao_rp2350 entries in separate PRs.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

SupportedDevice now normalizes nonempty USB IDs. The supported-device collection now includes Raspberry Pi Pico 2 metadata, with tests for USB ID normalization and vendor ID lookup.

Changes: Raspberry Pi Pico 2 support

Layer / File(s) Summary
Normalize USB IDs
meshtastic/supported_device.py, meshtastic/tests/test_supported_device.py
SupportedDevice strips whitespace, converts nonempty USB IDs to lowercase, removes a leading 0x, and zero-pads them to four characters. The test checks normalized values and confirms that an omitted vendor ID remains None.
Define and register the Pico 2
meshtastic/supported_device.py, meshtastic/tests/test_util.py
Adds the pico2 device definition with its firmware identifier, device class, platform serial-port prefixes, and USB IDs. Adds it to supported_devices. The test checks vendor ID lookup, inclusion in the unique vendor ID list, and the firmware identifier.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: ianmcorvidae

Merge Risk: Minimal · up to 08f8c

The change adds Pico 2 registration and consistent USB-ID formatting without an identified behavioral regression. It is mergeable subject to normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Linked Issues check Warning Directly linked issue #973 is open and active. The PR implements the Pico 2 entry, appends pico2 to supported_devices, uses cu.usbmodem, and normalizes USB IDs. The tests cover normalization and… Implement the remaining docstring and comment changes requested by #973 in meshtastic/supported_device.py, including the French-to-English change if the target comment exists. Then update the PR description if the issue scope changes.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main change: adding Raspberry Pi Pico 2 with RP2350 support to the supported devices.
Out of Scope Changes check Passed The changed files support issue #973. meshtastic/supported_device.py adds the Pico 2 declaration, appends it to supported_devices, and normalizes USB IDs. The two test changes verify normalization…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Out of Scope Changes check

Explanation

The changed files support issue #973. meshtastic/supported_device.py adds the Pico 2 declaration, appends it to supported_devices, and normalizes USB IDs. The two test changes verify normalization and Pico 2 vendor lookup. Whitespace removal, 0x removal, and zero-padding are related normalization behavior and are described by the PR.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 3 files.

Full details: Linked Issues check

Explanation

Directly linked issue #973 is open and active. The PR implements the Pico 2 entry, appends pico2 to supported_devices, uses cu.usbmodem, and normalizes USB IDs. The tests cover normalization and Pico 2 vendor lookup. The requested docstring and comment improvements remain omitted. The PR description confirms this omission.

Resolution

Implement the remaining docstring and comment changes requested by #973 in meshtastic/supported_device.py, including the French-to-English change if the target comment exists. Then update the PR description if the issue scope changes.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 6171d71 and 08f8c4d.

Files selected for processing: 1
  • meshtastic/tests/test_util.py

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

This branch has not been deployed

No deployments
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.

SupportedDevice : pico_2_rp2350 SupportedDevice

1 participant