Skip to content

feat: draft board support for NANO_G2_ULTRA (#4) - #22

Draft
jamesarich wants to merge 1 commit into
masterfrom
board-nano-g2-ultra
Draft

feat: draft board support for NANO_G2_ULTRA (#4)#22
jamesarich wants to merge 1 commit into
masterfrom
board-nano-g2-ultra

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Summary

Draft board port for NANO_G2_ULTRA (hwModel 18), closing the gap Meshtastic-Android's device_bootloader_ota_quirks.json flags in #4.

Every value in src/boards/nano_g2_ultra/board.h is sourced from something real, not guessed:

  • MCU and button pin: read directly from meshtastic/firmware's variants/nrf52840/nano-g2-ultra/variant.h (nrf52840, one physical button at P1.06). No LED pin appears anywhere in that file or variant.cpp, so LEDS_NUMBER=0.
  • Manufacturer/model/URL: firmware's platformio.ini (custom_meshtastic_display_name, etc.) and the vendor's own PlatformIO board manifest (datapartyjs/MeshTNC's boards/nano-g2-ultra.json), which also confirms this board reuses Adafruit's shared 0x239A VID rather than having a registered one of its own.

Two things are explicitly NOT confirmed, called out in both board.h and the new README section:

  • USB_DESC_UF2_PID (0x00E2) was picked only to avoid colliding with every other USB_DESC_UF2_PID already in this repo under 0x239A — no dedicated allocation for this board was found anywhere.
  • BUTTON_1 and BUTTON_2 both point at the same physical button (src/boards/boards.h hard-requires BUTTONS_NUMBER >= 2), mirroring wiscore_rak4631_board's own precedent for boards with only one real button — untested whether that's the right behavior on this specific hardware.

Why draft

This builds and links clean, but has not run on real hardware. Per this repo's own AGENTS.md guidance, a board port like this shouldn't be merged without that confirmation. @b8b8 — you mentioned on #4 that you have a few of these; if you're able to test, that would close the loop here. Marking as draft until then.

Test plan

  • tools/build_all.py — all 15 boards (14 existing + this one) build and link clean
  • Boots on real hardware
  • UF2 mode (double-reset) and/or serial DFU mode actually work
  • BLE OTA DFU actually works
  • Confirm whether the shared BUTTON_1/BUTTON_2 pin causes any unexpected behavior
  • Confirm or replace the guessed USB_DESC_UF2_PID

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b6880a05-b933-488f-b6b3-dd9753056f65

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

Comment @coderabbitai help to get the list of available commands.

@jamesarich

jamesarich commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

@b8b8 can you check the nano_g2_ultra bootloader built off this branch pls 🙏

Meshtastic-Android's device_bootloader_ota_quirks.json flags this
hwModel as requiresBootloaderUpgradeForOta with no board here yet.
Every value in the new board.h is sourced from something real rather
than guessed:

- MCU (nrf52840) and the one physical button (P1.06): read from
  meshtastic/firmware's variants/nrf52840/nano-g2-ultra/variant.h and
  variant.cpp directly - no LED pin appears anywhere in either file,
  so LEDS_NUMBER=0.
- Manufacturer/model/URL: meshtastic/firmware's platformio.ini
  (custom_meshtastic_display_name, etc.) and the vendor's own
  PlatformIO board manifest (datapartyjs/MeshTNC's
  boards/nano-g2-ultra.json), which also confirms this board reuses
  Adafruit's shared 0x239A VID rather than having its own.

Two things are NOT confirmed and are called out in both board.h and
the new README section:
- USB_DESC_UF2_PID (0x00E2) was picked to avoid colliding with every
  other USB_DESC_UF2_PID already in this repo under 0x239A - no
  dedicated allocation for this board was found anywhere.
- BUTTON_1 and BUTTON_2 both point at the same physical button
  (boards.h hard-requires BUTTONS_NUMBER >= 2), mirroring
  wiscore_rak4631_board's own precedent for boards with only one real
  button - untested whether that's the right behavior on this specific
  hardware.

Builds clean (all 15 boards via tools/build_all.py) but has NOT run on
real hardware - opening as a draft per AGENTS.md's board-gap gotcha.
Issue #4 has a commenter (@b8b8) who has the hardware.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jamesarich
jamesarich force-pushed the board-nano-g2-ultra branch from fbf9614 to 89c0188 Compare August 19, 2026 16:45
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.

1 participant