From 50e63d651d3bff293f337a0bf332019d8c57392c Mon Sep 17 00:00:00 2001 From: Joey Stanford Date: Sun, 19 Jul 2026 08:48:30 -0600 Subject: [PATCH] fix: send empty login password as zero bytes for read-only ACL Room/repeater guest (read-only) login uses a zero-length password payload, matching the official MeshCore Android companion. Explicitly skip writeString when password is empty so the frame ends after the public key. Carried as a pnpm patch in Colorado-Mesh/mesh-client. --- src/connection/connection.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/connection/connection.js b/src/connection/connection.js index af6f6d6..34b3bb0 100644 --- a/src/connection/connection.js +++ b/src/connection/connection.js @@ -231,7 +231,10 @@ class Connection extends EventEmitter { const data = new BufferWriter(); data.writeByte(Constants.CommandCodes.SendLogin); data.writeBytes(publicKey); // 32 bytes - id of repeater or room server - data.writeString(password); // password is remainder of frame, max 15 characters + // Empty password = read-only ACL (0 bytes, matches official Android). Non-empty uses writeString. + if (password.length > 0) { + data.writeString(password); // password is remainder of frame, max 15 characters + } await this.sendToRadioFrame(data.toBytes()); }