feat(meshcore): auto-add contacts so AIDA can DM anyone it hears (#55)

Enable firmware auto-add (set_autoadd_config CMD 58) at connect when
connection.meshcore_auto_add_contacts is set (default on), and refresh
the contact roster on NEW_CONTACT so replies resolve immediately. GUI
toggle on the MeshCore Connection page. So the USB AIDA companion adds
every node it hears an advert from and can send/decrypt DMs without
manual contact exchange.

Co-authored-by: Matt Johnson <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
malice 2026-07-05 23:48:41 -06:00 committed by GitHub
commit 2593e50aee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 128 additions and 0 deletions

View file

@ -23,6 +23,7 @@ interface ConnectionConfig {
meshcore_serial_port?: string
meshcore_baud?: number
meshcore_ble_address?: string
meshcore_auto_add_contacts?: boolean
[key: string]: unknown
}
@ -310,6 +311,12 @@ export default function MeshCoreConnection() {
&rarr; Meshtastic connection
</Link>
</div>
<Toggle
label="Auto-add contacts (AIDA adds any node it hears — required to DM anyone)"
checked={config.meshcore_auto_add_contacts ?? true}
onChange={(v) => upd({ meshcore_auto_add_contacts: v })}
helper="Enables firmware CMD 58 (set_autoadd_config) at connect so AIDA automatically adds every node it hears an advert from as a contact, enabling DM send/decrypt without manual contact exchange"
/>
<details className="group">
<summary className="flex items-center gap-2 cursor-pointer text-sm text-slate-400 hover:text-slate-200">
<ChevronRight size={14} className="group-open:rotate-90 transition-transform" />