ToRadio: Message<"meshtastic.ToRadio"> & {
    payloadVariant:
        | {
            case: "packet";
            value: MeshPacket;
        }
        | {
            case: "wantConfigId";
            value: number;
        }
        | {
            case: "disconnect";
            value: boolean;
        }
        | {
            case: "xmodemPacket";
            value: XModem;
        }
        | {
            case: "mqttClientProxyMessage";
            value: MqttClientProxyMessage;
        }
        | {
            case: "heartbeat";
            value: Heartbeat;
        }
        | {
            case: undefined;
            value?: undefined;
        };
}

Packets/commands to the radio will be written (reliably) to the toRadio characteristic. Once the write completes the phone can assume it is handled.

Type declaration

  • payloadVariant:
        | {
            case: "packet";
            value: MeshPacket;
        }
        | {
            case: "wantConfigId";
            value: number;
        }
        | {
            case: "disconnect";
            value: boolean;
        }
        | {
            case: "xmodemPacket";
            value: XModem;
        }
        | {
            case: "mqttClientProxyMessage";
            value: MqttClientProxyMessage;
        }
        | {
            case: "heartbeat";
            value: Heartbeat;
        }
        | {
            case: undefined;
            value?: undefined;
        }

    Log levels, chosen to match python logging conventions.

    from oneof meshtastic.ToRadio.payload_variant

from message meshtastic.ToRadio