Open
Conversation
scott-brust
commented
Feb 19, 2026
avtolstoy
reviewed
Feb 19, 2026
scott-brust
commented
Feb 19, 2026
Member
Author
|
One outstanding item is how the particle udev linux rules should be updated to allow modem manager to consider the B5SOM tty connection as a modem. Right now the particle cli disallows this by default, but when enabling USB tethering this needs to be disabled. IE this snippet needs to be created Should we incorporate this into the 'canonical' tethering setup script? |
avtolstoy
reviewed
Feb 20, 2026
| return network_ready(*this, 0, NULL); | ||
| } | ||
|
|
||
| bool isOn(void) { |
Member
There was a problem hiding this comment.
Weird, this should be working as-is. It's in NetworkClass
Member
Author
There was a problem hiding this comment.
oh, yes you are right. I think basically all of these functions in TetherClass are redundant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
USB CDC Tethering Implementation
Overview
Extends the existing USART-based PPP tethering feature to support USB CDC as an alternative serial transport. The host connects to the device's USB CDC serial port, goes through the same AT command handshake and PPP negotiation flow, and gets a tethered network connection over USB instead of a hardware UART.
Changes
New files:
hal/inc/usb_hal_private.h— Private C API exposing FreeRTOS event group functions for USB CDC (hal_usb_cdc_pvt_get_event_group_handle,hal_usb_cdc_pvt_wait_event)hal/src/nRF52840/serial_usb_stream.h/ .cpp — SerialUSBStream class, a stream adapter that wraps the USB CDC HAL (HAL_USB_USART_* functions) behind the same EventGroupBasedStream interface used by the existing SerialStream (USART). Implements read, write, peek, skip, flush, waitEvent, and availForRead/availForWrite.Modified files:
hal/src/nRF52840/usb_hal_cdc.c— Added a FreeRTOS event group (ev_group) to the USB instance. READABLE is signaled from the RX_DONE ISR handler (via xEventGroupSetBitsFromISR) when data is successfully copied into the rx FIFO. WRITABLE is signaled from TX_DONE after schedule_tx frees FIFO space. An enableEvent function checks current FIFO state from thread context to handle the race where data is already available before waitEvent blocks.hal/network/lwip/pppservernetif.cpp— PppServerNetif::start() now creates either a SerialStream or SerialUSBStream based on settings_.usbserial. AT command handler lambdas updated to pass this (instead of serial_.get()) to properly distinguish transport type for flow control (+IFC) and baud rate (+IPR) queries. The ATD connect handler similarly updated.wiring/inc/spark_wiring_tether.h— Added TetherUSBConfig struct and TetherClass::bind(TetherUSBConfig) overload. Added TetherInterface enum and activeSerialInterface() accessor.wiring/src/spark_wiring_tether.cpp— Implements the USB bind path: sets settings.serial = 0 and settings.usbserial to the USB serial instance, signaling PppServerNetif to use SerialUSBStream.Steps to Test
ttyACM0(see host setup below)Host Setup
Tachyon and RPI need udev rules update to tell modem manager to not block the
ttyACM0connection:The rest of the setup is the ame as with USART tethering, just make sure the serial endpoint is the USB one instead. for example on tachyon
Scan + list for modems
Activate PPP connection, test interface
Download test
Upload test
Example App
References
Test download speeds around 36 kb/s
Test upload speeds around 65 kb/s
Completeness