Companion: say which profile raw and channel data arrived on

MeshCore Open TAK labels a MediaMesh photo or voice clip "Received via
MediaMesh", "via main mesh" or both. Wadamesh standalones tell the
app the profile in a frame byte stock firmware leaves reserved; a
Cascade companion left it unset, so the app showed nothing.

While radio2 is on (rx or rxtx):
- PUSH_CODE_RAW_DATA (0x84) byte 3: 0xA0 primary, 0xA1 radio2
  (stock 0xFF).
- RESP_CODE_CHANNEL_DATA_RECV (0x1B) byte 2: the same (stock 0).
With radio2 off, or for a packet from the UDP bridge, the stock values
stay, so existing clients see no change.

Test: test/test_companion_rx_via.py (in run-unit-tests); the two
harnesses that compile these handlers get a stub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011i5tJJtj95MB4oUgncCUe5
This commit is contained in:
Claude committed 2026-10-24 17:31:53 -07:00
1 parent 06edf9aa8a
commit 0e756bf24a
7 files changed
+108 -4

No files matched your search

+3 -2
View File
@@ -715,7 +715,8 @@ Inbound group datagrams (radio-level `PAYLOAD_TYPE_GRP_DATA`, 0x06) are forwarde
```
Byte 0: 0x1B (packet type)
Byte 1: SNR (signed int8, scaled x4 - divide by 4.0 to recover dB)
Bytes 2-3: Reserved (clients MUST ignore)
Byte 2: Receive profile while radio2 is on: 0xA0 primary, 0xA1 radio2; otherwise 0 (reserved)
Byte 3: Reserved (clients MUST ignore)
Byte 4: Channel index (0 through max_channels - 1)
Byte 5: Path Length (actual path length when flooded, otherwise 0xFF for direct)
Bytes 6-7: Data Type (uint16 little-endian)
@@ -1036,7 +1037,7 @@ Byte values are authoritative; names are aliases. When reading firmware source,
| `0x81` | `PUSH_CODE_PATH_UPDATED` | A contact path changed. |
| `0x82` | `PUSH_CODE_SEND_CONFIRMED` | A sent message was acknowledged. |
| `0x83` | `PUSH_CODE_MSG_WAITING` | One or more offline frames are waiting. |
| `0x84` | `PUSH_CODE_RAW_DATA` | Raw application data received. |
| `0x84` | `PUSH_CODE_RAW_DATA` | Raw application data received: `[0x84][SNR x4][RSSI][profile][payload]`. `profile` is 0xA0 (primary) or 0xA1 (radio2) while radio2 is on, otherwise 0xFF (reserved). |
| `0x85` / `0x86` | `PUSH_CODE_LOGIN_SUCCESS` / `PUSH_CODE_LOGIN_FAIL` | Server login result. |
| `0x87` | `PUSH_CODE_STATUS_RESPONSE` | Server status response. |
| `0x88` | `PUSH_CODE_LOG_RX_DATA` | Radio receive log data. |