Skip to content

Add USB serial bridge transport for repeater firmware#2959

Open
darrylhodgins wants to merge 3 commits into
meshcore-dev:devfrom
darrylhodgins:repeater-bridge-usbserial
Open

Add USB serial bridge transport for repeater firmware#2959
darrylhodgins wants to merge 3 commits into
meshcore-dev:devfrom
darrylhodgins:repeater-bridge-usbserial

Conversation

@darrylhodgins

Copy link
Copy Markdown

Adds native USB CDC support to RS232Bridge for selected repeater targets with a second USB CDC interface.

Initially, includes these targets:

  • RAK4631
  • SenseCAP Solar

The existing serial bridge frame format is unchanged; only its physical transport changes.

  • USB CDC 0 remains the normal MeshCore CLI/debug Serial port.
  • USB CDC 1 carries the serial bridge stream.

For all other bridge targets, existing UART behaviour remains unchanged.

Closes #2958

Testing

Built and bench-tested on physical hardware:

  • RAK_4631_repeater_bridge_usbserial
  • SenseCap_Solar_repeater_bridge_usbserial

Verified that the CLI and bridge enumerate as separate USB serial ports and that bridge traffic works over the second port.

@darrylhodgins
darrylhodgins marked this pull request as draft July 15, 2026 12:36
@darrylhodgins
darrylhodgins changed the base branch from main to dev July 15, 2026 12:36
@darrylhodgins
darrylhodgins marked this pull request as ready for review July 15, 2026 12:37
@enigmaspb

Copy link
Copy Markdown

Will it work if I connect two boards RAK4631 / RAK19007 with a USB cable?

@darrylhodgins

Copy link
Copy Markdown
Author

Will it work if I connect two boards RAK4631 / RAK19007 with a USB cable?

It may be possible to have one of the boards act as a USB host, but as it stands at this point, both boards will just sit there waiting for a host to appear. At least for now, the UART approach is the way to go for that.

This initial PR is meant to provide the serial stream to a computer (in my case it's a simple Raspberry Pi).

I'll look into whether USB OTG or having one of the boards act as a USB host is possible, but I think that would belong in a separate PR.

@enigmaspb

Copy link
Copy Markdown

I see, that's a pity, I was hoping to avoid soldering. Thank you for your response.

@hickey

hickey commented Jul 21, 2026

Copy link
Copy Markdown

I have just published #3020 which is a similar effort. Instead of trying shoehorn the code in to the repeater code base I have created a USBSerial bridge code that is in src/helpers/bridges that gets activated by defining WITH_USB_SERIAL_BRIDGE. There is secondary define that specifies the serial stream to use for the bridge transport. In theory this would support this author's use case, but I am not familiar enough with platforms that support multiple USB serial ports to confirm if this is true or not.

In addition, I have added the TCP bridge to #3020 in a similar manner. Further details are described in #3020.

I have also added code to return more descriptive values for the get bridge.type CLI command that is not present in this PR.

@hickey

hickey commented Jul 22, 2026

Copy link
Copy Markdown

Killed off #3020 as it was not based on the dev branch.

Reopened the PR as #3029 and there is a feature request issue created as #3028.

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.

Add USB serial bridge transport for repeater firmware (RS232Bridge over USB CDC)

3 participants