mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix(serial): assert DTR/RTS on Android USB-CDC open
Empirically, RAK4631/nRF52840 firmware does not respond to WAKE_BYTES unless DTR is asserted on open. DTR maps to USB SET_CONTROL_LINE_STATE, which the firmware uses to detect host presence and activate its serial- side Meshtastic protocol. Bridge-chip boards (CH340, CP210x, FTDI) tolerate the assertion.
This commit is contained in:
parent
646858cc39
commit
a6f3a6b4a5
1 changed files with 5 additions and 0 deletions
|
|
@ -87,6 +87,11 @@ internal class SerialConnectionImpl(
|
|||
|
||||
port.open(usbDeviceConnection)
|
||||
port.setParameters(115200, UsbSerialPort.DATABITS_8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_NONE)
|
||||
|
||||
// Assert DTR/RTS so native USB-CDC firmware (RAK4631 / nRF52840) recognizes the host as
|
||||
// present and starts its serial-side Meshtastic protocol. Empirically, omitting these
|
||||
// signals causes the firmware to never respond to WAKE_BYTES, stalling the handshake at
|
||||
// Stage 1. Bridge-chip boards (CH340, CP210x, FTDI) tolerate the assertion.
|
||||
port.dtr = true
|
||||
port.rts = true
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue