Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
27cc76d
Very WIP dmshell
jp-bennett Apr 8, 2026
f475be1
Dumb fixes
jp-bennett Apr 8, 2026
6087134
Interactive mode
jp-bennett Apr 8, 2026
4a3f449
Try to re-request missed sequences
jp-bennett Apr 8, 2026
f5335f2
troubleshoot dropped packets
jp-bennett Apr 8, 2026
8d3f922
Don't firehose missing packets
jp-bennett Apr 8, 2026
5a619c9
Attempt at better responsiveness
jp-bennett Apr 9, 2026
f9bedd8
DMShell heartbeat
jp-bennett Apr 9, 2026
50e1fe8
dmshell client serial support and tweaks
jp-bennett Apr 9, 2026
6f476f3
Merge branch 'develop' into vibe-coded-dmshell
jp-bennett Apr 10, 2026
188d895
Merge branch 'develop' into vibe-coded-dmshell
thebentern Apr 10, 2026
8c24892
Remove some dead code and LLM overcomplication
jp-bennett Apr 10, 2026
866c89f
Merge branch 'develop' into vibe-coded-dmshell
jp-bennett Apr 13, 2026
0076239
Merge branch 'develop' into vibe-coded-dmshell
jp-bennett Apr 13, 2026
322f026
Trunk
jp-bennett Apr 13, 2026
8f7dea0
Use RemoteShell in protobufs
jp-bennett Apr 14, 2026
3a498fb
Make the DMShell tests compile
jp-bennett Apr 14, 2026
69f1b50
Harden against possible memory overflows
jp-bennett Apr 14, 2026
6c28d11
Minor cleanups
jp-bennett Apr 14, 2026
8f2ecbd
No Child Left Behind
jp-bennett Apr 14, 2026
e393a5c
Make consoleInit() Reentrant, and initialize it earlier on native
jp-bennett Apr 14, 2026
a6d6141
Add PortduinoSetOptions to overwrite the realhardware bool
jp-bennett Apr 14, 2026
5831952
simplify pt 1
jp-bennett Apr 14, 2026
87d0850
Refactor and Simplify
jp-bennett Apr 14, 2026
dc39471
Make new protobuf value consistent
jp-bennett Apr 14, 2026
3c83e01
Update protobufs (#10188)
github-actions[bot] Apr 17, 2026
1e8c9e7
Merge branch 'develop' into vibe-coded-dmshell
jp-bennett Apr 17, 2026
ffd144d
Merge branch 'develop' into vibe-coded-dmshell
jp-bennett Apr 17, 2026
d7cb5d7
Merge branch 'develop' into vibe-coded-dmshell
jp-bennett Apr 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
940 changes: 940 additions & 0 deletions bin/dmshell_client.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/mesh/RadioLibInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ class RadioLibInterface : public RadioInterface, protected concurrency::Notified
/** Attempt to find a packet in the TxQueue. Returns true if the packet was found. */
virtual bool findInTxQueue(NodeNum from, PacketId id) override;

uint8_t packetsInTxQueue() { return txQueue.getMaxLen() - txQueue.getFree(); }

private:
/** if we have something waiting to send, start a short (random) timer so we can come check for collision before actually
* doing the transmit */
Expand Down
5 changes: 5 additions & 0 deletions src/mesh/generated/meshtastic/mesh.pb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ PB_BIND(meshtastic_KeyVerification, meshtastic_KeyVerification, AUTO)
PB_BIND(meshtastic_StoreForwardPlusPlus, meshtastic_StoreForwardPlusPlus, 2)


PB_BIND(meshtastic_DMShell, meshtastic_DMShell, AUTO)


PB_BIND(meshtastic_Waypoint, meshtastic_Waypoint, AUTO)


Expand Down Expand Up @@ -129,6 +132,8 @@ PB_BIND(meshtastic_ChunkedPayloadResponse, meshtastic_ChunkedPayloadResponse, AU








73 changes: 73 additions & 0 deletions src/mesh/generated/meshtastic/mesh.pb.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,27 @@ typedef enum _meshtastic_StoreForwardPlusPlus_SFPP_message_type {
meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_PROVIDE_SECONDHALF = 6
} meshtastic_StoreForwardPlusPlus_SFPP_message_type;

/* Frame op code for PTY session control and stream transport.

Values 1-63 are client->server requests.
Values 64-127 are server->client responses/events. */
typedef enum _meshtastic_DMShell_OpCode {
meshtastic_DMShell_OpCode_OP_UNSET = 0,
/* Client -> server */
meshtastic_DMShell_OpCode_OPEN = 1,
meshtastic_DMShell_OpCode_INPUT = 2,
meshtastic_DMShell_OpCode_RESIZE = 3,
meshtastic_DMShell_OpCode_CLOSE = 4,
meshtastic_DMShell_OpCode_PING = 5,
meshtastic_DMShell_OpCode_ACK = 6,
/* Server -> client */
meshtastic_DMShell_OpCode_OPEN_OK = 64,
meshtastic_DMShell_OpCode_OUTPUT = 65,
meshtastic_DMShell_OpCode_CLOSED = 66,
meshtastic_DMShell_OpCode_ERROR = 67,
meshtastic_DMShell_OpCode_PONG = 68
} meshtastic_DMShell_OpCode;

/* The priority of this message for sending.
Higher priorities are sent first (when managing the transmit queue).
This field is never sent over the air, it is only used internally inside of a local device node.
Expand Down Expand Up @@ -845,6 +866,27 @@ typedef struct _meshtastic_StoreForwardPlusPlus {
uint32_t chain_count;
} meshtastic_StoreForwardPlusPlus;

typedef PB_BYTES_ARRAY_T(200) meshtastic_DMShell_payload_t;
/* The actual over-the-mesh message doing DMShell */
typedef struct _meshtastic_DMShell {
/* Structured frame operation. */
meshtastic_DMShell_OpCode op;
/* Logical PTY session identifier. */
uint32_t session_id;
/* Monotonic sequence number for this frame. */
uint32_t seq;
/* Cumulative ack sequence number. */
uint32_t ack_seq;
/* Opaque bytes payload for INPUT/OUTPUT/ERROR and other frame bodies. */
meshtastic_DMShell_payload_t payload;
/* Terminal size columns used for OPEN/RESIZE signaling. */
uint32_t cols;
/* Terminal size rows used for OPEN/RESIZE signaling. */
uint32_t rows;
/* Bit flags for protocol extensions. */
uint32_t flags;
} meshtastic_DMShell;

/* Waypoint message, used to share arbitrary locations across the mesh */
typedef struct _meshtastic_Waypoint {
/* Id of the waypoint */
Expand Down Expand Up @@ -1385,6 +1427,10 @@ extern "C" {
#define _meshtastic_StoreForwardPlusPlus_SFPP_message_type_MAX meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_PROVIDE_SECONDHALF
#define _meshtastic_StoreForwardPlusPlus_SFPP_message_type_ARRAYSIZE ((meshtastic_StoreForwardPlusPlus_SFPP_message_type)(meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_PROVIDE_SECONDHALF+1))

#define _meshtastic_DMShell_OpCode_MIN meshtastic_DMShell_OpCode_OP_UNSET
#define _meshtastic_DMShell_OpCode_MAX meshtastic_DMShell_OpCode_PONG
#define _meshtastic_DMShell_OpCode_ARRAYSIZE ((meshtastic_DMShell_OpCode)(meshtastic_DMShell_OpCode_PONG+1))

#define _meshtastic_MeshPacket_Priority_MIN meshtastic_MeshPacket_Priority_UNSET
#define _meshtastic_MeshPacket_Priority_MAX meshtastic_MeshPacket_Priority_MAX
#define _meshtastic_MeshPacket_Priority_ARRAYSIZE ((meshtastic_MeshPacket_Priority)(meshtastic_MeshPacket_Priority_MAX+1))
Expand Down Expand Up @@ -1415,6 +1461,8 @@ extern "C" {

#define meshtastic_StoreForwardPlusPlus_sfpp_message_type_ENUMTYPE meshtastic_StoreForwardPlusPlus_SFPP_message_type

#define meshtastic_DMShell_op_ENUMTYPE meshtastic_DMShell_OpCode




Expand Down Expand Up @@ -1459,6 +1507,7 @@ extern "C" {
#define meshtastic_Data_init_default {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
#define meshtastic_KeyVerification_init_default {0, {0, {0}}, {0, {0}}}
#define meshtastic_StoreForwardPlusPlus_init_default {_meshtastic_StoreForwardPlusPlus_SFPP_message_type_MIN, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}
#define meshtastic_DMShell_init_default {_meshtastic_DMShell_OpCode_MIN, 0, 0, 0, {0, {0}}, 0, 0, 0}
#define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0}
#define meshtastic_StatusMessage_init_default {""}
#define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0}
Expand Down Expand Up @@ -1492,6 +1541,7 @@ extern "C" {
#define meshtastic_Data_init_zero {_meshtastic_PortNum_MIN, {0, {0}}, 0, 0, 0, 0, 0, 0, false, 0}
#define meshtastic_KeyVerification_init_zero {0, {0, {0}}, {0, {0}}}
#define meshtastic_StoreForwardPlusPlus_init_zero {_meshtastic_StoreForwardPlusPlus_SFPP_message_type_MIN, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, 0, 0, 0, 0, 0}
#define meshtastic_DMShell_init_zero {_meshtastic_DMShell_OpCode_MIN, 0, 0, 0, {0, {0}}, 0, 0, 0}
#define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0}
#define meshtastic_StatusMessage_init_zero {""}
#define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0}
Expand Down Expand Up @@ -1581,6 +1631,14 @@ extern "C" {
#define meshtastic_StoreForwardPlusPlus_encapsulated_from_tag 8
#define meshtastic_StoreForwardPlusPlus_encapsulated_rxtime_tag 9
#define meshtastic_StoreForwardPlusPlus_chain_count_tag 10
#define meshtastic_DMShell_op_tag 1
#define meshtastic_DMShell_session_id_tag 2
#define meshtastic_DMShell_seq_tag 3
#define meshtastic_DMShell_ack_seq_tag 4
#define meshtastic_DMShell_payload_tag 5
#define meshtastic_DMShell_cols_tag 6
#define meshtastic_DMShell_rows_tag 7
#define meshtastic_DMShell_flags_tag 8
#define meshtastic_Waypoint_id_tag 1
#define meshtastic_Waypoint_latitude_i_tag 2
#define meshtastic_Waypoint_longitude_i_tag 3
Expand Down Expand Up @@ -1813,6 +1871,18 @@ X(a, STATIC, SINGULAR, UINT32, chain_count, 10)
#define meshtastic_StoreForwardPlusPlus_CALLBACK NULL
#define meshtastic_StoreForwardPlusPlus_DEFAULT NULL

#define meshtastic_DMShell_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, UENUM, op, 1) \
X(a, STATIC, SINGULAR, UINT32, session_id, 2) \
X(a, STATIC, SINGULAR, UINT32, seq, 3) \
X(a, STATIC, SINGULAR, UINT32, ack_seq, 4) \
X(a, STATIC, SINGULAR, BYTES, payload, 5) \
X(a, STATIC, SINGULAR, UINT32, cols, 6) \
X(a, STATIC, SINGULAR, UINT32, rows, 7) \
X(a, STATIC, SINGULAR, UINT32, flags, 8)
#define meshtastic_DMShell_CALLBACK NULL
#define meshtastic_DMShell_DEFAULT NULL

#define meshtastic_Waypoint_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, UINT32, id, 1) \
X(a, STATIC, OPTIONAL, SFIXED32, latitude_i, 2) \
Expand Down Expand Up @@ -2095,6 +2165,7 @@ extern const pb_msgdesc_t meshtastic_Routing_msg;
extern const pb_msgdesc_t meshtastic_Data_msg;
extern const pb_msgdesc_t meshtastic_KeyVerification_msg;
extern const pb_msgdesc_t meshtastic_StoreForwardPlusPlus_msg;
extern const pb_msgdesc_t meshtastic_DMShell_msg;
extern const pb_msgdesc_t meshtastic_Waypoint_msg;
extern const pb_msgdesc_t meshtastic_StatusMessage_msg;
extern const pb_msgdesc_t meshtastic_MqttClientProxyMessage_msg;
Expand Down Expand Up @@ -2130,6 +2201,7 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
#define meshtastic_Data_fields &meshtastic_Data_msg
#define meshtastic_KeyVerification_fields &meshtastic_KeyVerification_msg
#define meshtastic_StoreForwardPlusPlus_fields &meshtastic_StoreForwardPlusPlus_msg
#define meshtastic_DMShell_fields &meshtastic_DMShell_msg
#define meshtastic_Waypoint_fields &meshtastic_Waypoint_msg
#define meshtastic_StatusMessage_fields &meshtastic_StatusMessage_msg
#define meshtastic_MqttClientProxyMessage_fields &meshtastic_MqttClientProxyMessage_msg
Expand Down Expand Up @@ -2164,6 +2236,7 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg;
#define meshtastic_ChunkedPayload_size 245
#define meshtastic_ClientNotification_size 482
#define meshtastic_Compressed_size 239
#define meshtastic_DMShell_size 241
#define meshtastic_Data_size 269
#define meshtastic_DeviceMetadata_size 54
#define meshtastic_DuplicatedPublicKey_size 0
Expand Down
2 changes: 2 additions & 0 deletions src/mesh/generated/meshtastic/portnums.pb.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ typedef enum _meshtastic_PortNum {
meshtastic_PortNum_ALERT_APP = 11,
/* Module/port for handling key verification requests. */
meshtastic_PortNum_KEY_VERIFICATION_APP = 12,
/* Module/port for handling key verification requests. */
meshtastic_PortNum_DM_SHELL_APP = 13,
/* Provides a 'ping' service that replies to any packet it receives.
Also serves as a small example module.
ENCODING: ASCII Plaintext */
Expand Down
Loading
Loading