This message is handled by the Admin module and is responsible for all settings/channel read/write operations. This message is used to do settings operations to both remote AND local nodes. (Prior to 1.2 these operations were done via special ToRadio operations)

from message meshtastic.AdminMessage

Hierarchy

Constructors

  • Parameters

    Returns AdminMessage

Properties

payloadVariant:
    | {
        case: "getChannelRequest";
        value: number;
    }
    | {
        case: "getChannelResponse";
        value: Channel;
    }
    | {
        case: "getOwnerRequest";
        value: boolean;
    }
    | {
        case: "getOwnerResponse";
        value: User;
    }
    | {
        case: "getConfigRequest";
        value: AdminMessage_ConfigType;
    }
    | {
        case: "getConfigResponse";
        value: Config;
    }
    | {
        case: "getModuleConfigRequest";
        value: AdminMessage_ModuleConfigType;
    }
    | {
        case: "getModuleConfigResponse";
        value: ModuleConfig;
    }
    | {
        case: "getCannedMessageModuleMessagesRequest";
        value: boolean;
    }
    | {
        case: "getCannedMessageModuleMessagesResponse";
        value: string;
    }
    | {
        case: "getDeviceMetadataRequest";
        value: boolean;
    }
    | {
        case: "getDeviceMetadataResponse";
        value: DeviceMetadata;
    }
    | {
        case: "getRingtoneRequest";
        value: boolean;
    }
    | {
        case: "getRingtoneResponse";
        value: string;
    }
    | {
        case: "getDeviceConnectionStatusRequest";
        value: boolean;
    }
    | {
        case: "getDeviceConnectionStatusResponse";
        value: DeviceConnectionStatus;
    }
    | {
        case: "setHamMode";
        value: HamParameters;
    }
    | {
        case: "getNodeRemoteHardwarePinsRequest";
        value: boolean;
    }
    | {
        case: "getNodeRemoteHardwarePinsResponse";
        value: NodeRemoteHardwarePinsResponse;
    }
    | {
        case: "enterDfuModeRequest";
        value: boolean;
    }
    | {
        case: "deleteFileRequest";
        value: string;
    }
    | {
        case: "setScale";
        value: number;
    }
    | {
        case: "setOwner";
        value: User;
    }
    | {
        case: "setChannel";
        value: Channel;
    }
    | {
        case: "setConfig";
        value: Config;
    }
    | {
        case: "setModuleConfig";
        value: ModuleConfig;
    }
    | {
        case: "setCannedMessageModuleMessages";
        value: string;
    }
    | {
        case: "setRingtoneMessage";
        value: string;
    }
    | {
        case: "removeByNodenum";
        value: number;
    }
    | {
        case: "setFavoriteNode";
        value: number;
    }
    | {
        case: "removeFavoriteNode";
        value: number;
    }
    | {
        case: "setFixedPosition";
        value: Position;
    }
    | {
        case: "removeFixedPosition";
        value: boolean;
    }
    | {
        case: "setTimeOnly";
        value: number;
    }
    | {
        case: "beginEditSettings";
        value: boolean;
    }
    | {
        case: "commitEditSettings";
        value: boolean;
    }
    | {
        case: "factoryResetDevice";
        value: number;
    }
    | {
        case: "rebootOtaSeconds";
        value: number;
    }
    | {
        case: "exitSimulator";
        value: boolean;
    }
    | {
        case: "rebootSeconds";
        value: number;
    }
    | {
        case: "shutdownSeconds";
        value: number;
    }
    | {
        case: "factoryResetConfig";
        value: number;
    }
    | {
        case: "nodedbReset";
        value: number;
    }
    | {
        case: undefined;
        value?: undefined;
    }

TODO: REPLACE

Type declaration

  • case: "getChannelRequest"
  • value: number

    Send the specified channel in the response to this message NOTE: This field is sent with the channel index + 1 (to ensure we never try to send 'zero' - which protobufs treats as not present)

    from field: uint32 get_channel_request = 1;

Type declaration

  • case: "getChannelResponse"
  • value: Channel

    TODO: REPLACE

    from field: meshtastic.Channel get_channel_response = 2;

Type declaration

  • case: "getOwnerRequest"
  • value: boolean

    Send the current owner data in the response to this message.

    from field: bool get_owner_request = 3;

Type declaration

  • case: "getOwnerResponse"
  • value: User

    TODO: REPLACE

    from field: meshtastic.User get_owner_response = 4;

Type declaration

  • case: "getConfigRequest"
  • value: AdminMessage_ConfigType

    Ask for the following config data to be sent

    from field: meshtastic.AdminMessage.ConfigType get_config_request = 5;

Type declaration

  • case: "getConfigResponse"
  • value: Config

    Send the current Config in the response to this message.

    from field: meshtastic.Config get_config_response = 6;

Type declaration

  • case: "getModuleConfigRequest"
  • value: AdminMessage_ModuleConfigType

    Ask for the following config data to be sent

    from field: meshtastic.AdminMessage.ModuleConfigType get_module_config_request = 7;

Type declaration

  • case: "getModuleConfigResponse"
  • value: ModuleConfig

    Send the current Config in the response to this message.

    from field: meshtastic.ModuleConfig get_module_config_response = 8;

Type declaration

  • case: "getCannedMessageModuleMessagesRequest"
  • value: boolean

    Get the Canned Message Module messages in the response to this message.

    from field: bool get_canned_message_module_messages_request = 10;

Type declaration

  • case: "getCannedMessageModuleMessagesResponse"
  • value: string

    Get the Canned Message Module messages in the response to this message.

    from field: string get_canned_message_module_messages_response = 11;

Type declaration

  • case: "getDeviceMetadataRequest"
  • value: boolean

    Request the node to send device metadata (firmware, protobuf version, etc)

    from field: bool get_device_metadata_request = 12;

Type declaration

  • case: "getDeviceMetadataResponse"
  • value: DeviceMetadata

    Device metadata response

    from field: meshtastic.DeviceMetadata get_device_metadata_response = 13;

Type declaration

  • case: "getRingtoneRequest"
  • value: boolean

    Get the Ringtone in the response to this message.

    from field: bool get_ringtone_request = 14;

Type declaration

  • case: "getRingtoneResponse"
  • value: string

    Get the Ringtone in the response to this message.

    from field: string get_ringtone_response = 15;

Type declaration

  • case: "getDeviceConnectionStatusRequest"
  • value: boolean

    Request the node to send it's connection status

    from field: bool get_device_connection_status_request = 16;

Type declaration

  • case: "getDeviceConnectionStatusResponse"
  • value: DeviceConnectionStatus

    Device connection status response

    from field: meshtastic.DeviceConnectionStatus get_device_connection_status_response = 17;

Type declaration

  • case: "setHamMode"
  • value: HamParameters

    Setup a node for licensed amateur (ham) radio operation

    from field: meshtastic.HamParameters set_ham_mode = 18;

Type declaration

  • case: "getNodeRemoteHardwarePinsRequest"
  • value: boolean

    Get the mesh's nodes with their available gpio pins for RemoteHardware module use

    from field: bool get_node_remote_hardware_pins_request = 19;

Type declaration

  • case: "getNodeRemoteHardwarePinsResponse"
  • value: NodeRemoteHardwarePinsResponse

    Respond with the mesh's nodes with their available gpio pins for RemoteHardware module use

    from field: meshtastic.NodeRemoteHardwarePinsResponse get_node_remote_hardware_pins_response = 20;

Type declaration

  • case: "enterDfuModeRequest"
  • value: boolean

    Enter (UF2) DFU mode Only implemented on NRF52 currently

    from field: bool enter_dfu_mode_request = 21;

Type declaration

  • case: "deleteFileRequest"
  • value: string

    Delete the file by the specified path from the device

    from field: string delete_file_request = 22;

Type declaration

  • case: "setScale"
  • value: number

    Set zero and offset for scale chips

    from field: uint32 set_scale = 23;

Type declaration

  • case: "setOwner"
  • value: User

    Set the owner for this node

    from field: meshtastic.User set_owner = 32;

Type declaration

  • case: "setChannel"
  • value: Channel

    Set channels (using the new API). A special channel is the "primary channel". The other records are secondary channels. Note: only one channel can be marked as primary. If the client sets a particular channel to be primary, the previous channel will be set to SECONDARY automatically.

    from field: meshtastic.Channel set_channel = 33;

Type declaration

  • case: "setConfig"
  • value: Config

    Set the current Config

    from field: meshtastic.Config set_config = 34;

Type declaration

  • case: "setModuleConfig"
  • value: ModuleConfig

    Set the current Config

    from field: meshtastic.ModuleConfig set_module_config = 35;

Type declaration

  • case: "setCannedMessageModuleMessages"
  • value: string

    Set the Canned Message Module messages text.

    from field: string set_canned_message_module_messages = 36;

Type declaration

  • case: "setRingtoneMessage"
  • value: string

    Set the ringtone for ExternalNotification.

    from field: string set_ringtone_message = 37;

Type declaration

  • case: "removeByNodenum"
  • value: number

    Remove the node by the specified node-num from the NodeDB on the device

    from field: uint32 remove_by_nodenum = 38;

Type declaration

  • case: "setFavoriteNode"
  • value: number

    Set specified node-num to be favorited on the NodeDB on the device

    from field: uint32 set_favorite_node = 39;

Type declaration

  • case: "removeFavoriteNode"
  • value: number

    Set specified node-num to be un-favorited on the NodeDB on the device

    from field: uint32 remove_favorite_node = 40;

Type declaration

  • case: "setFixedPosition"
  • value: Position

    Set fixed position data on the node and then set the position.fixed_position = true

    from field: meshtastic.Position set_fixed_position = 41;

Type declaration

  • case: "removeFixedPosition"
  • value: boolean

    Clear fixed position coordinates and then set position.fixed_position = false

    from field: bool remove_fixed_position = 42;

Type declaration

  • case: "setTimeOnly"
  • value: number

    Set time only on the node Convenience method to set the time on the node (as Net quality) without any other position data

    from field: fixed32 set_time_only = 43;

Type declaration

  • case: "beginEditSettings"
  • value: boolean

    Begins an edit transaction for config, module config, owner, and channel settings changes This will delay the standard implicit save to the file system and subsequent reboot behavior until committed (commit_edit_settings)

    from field: bool begin_edit_settings = 64;

Type declaration

  • case: "commitEditSettings"
  • value: boolean

    Commits an open transaction for any edits made to config, module config, owner, and channel settings

    from field: bool commit_edit_settings = 65;

Type declaration

  • case: "factoryResetDevice"
  • value: number

    Tell the node to factory reset config everything; all device state and configuration will be returned to factory defaults and BLE bonds will be cleared.

    from field: int32 factory_reset_device = 94;

Type declaration

  • case: "rebootOtaSeconds"
  • value: number

    Tell the node to reboot into the OTA Firmware in this many seconds (or <0 to cancel reboot) Only Implemented for ESP32 Devices. This needs to be issued to send a new main firmware via bluetooth.

    from field: int32 reboot_ota_seconds = 95;

Type declaration

  • case: "exitSimulator"
  • value: boolean

    This message is only supported for the simulator Portduino build. If received the simulator will exit successfully.

    from field: bool exit_simulator = 96;

Type declaration

  • case: "rebootSeconds"
  • value: number

    Tell the node to reboot in this many seconds (or <0 to cancel reboot)

    from field: int32 reboot_seconds = 97;

Type declaration

  • case: "shutdownSeconds"
  • value: number

    Tell the node to shutdown in this many seconds (or <0 to cancel shutdown)

    from field: int32 shutdown_seconds = 98;

Type declaration

  • case: "factoryResetConfig"
  • value: number

    Tell the node to factory reset config; all device state and configuration will be returned to factory defaults; BLE bonds will be preserved.

    from field: int32 factory_reset_config = 99;

Type declaration

  • case: "nodedbReset"
  • value: number

    Tell the node to reset the nodedb.

    from field: int32 nodedb_reset = 100;

from oneof meshtastic.AdminMessage.payload_variant

sessionPasskey: Uint8Array

The node generates this key and sends it with any get_x_response packets. The client MUST include the same key with any set_x commands. Key expires after 300 seconds. Prevents replay attacks for admin messages.

from field: bytes session_passkey = 101;

fields: FieldList
runtime: ProtoRuntime
typeName: "meshtastic.AdminMessage" = "meshtastic.AdminMessage"

Methods

  • Create a deep copy.

    Returns AdminMessage

  • Compare with a message of the same type. Note that this function disregards extensions and unknown fields.

    Parameters

    Returns boolean

  • Parse from binary data, merging fields.

    Repeated fields are appended. Map entries are added, overwriting existing keys.

    If a message field is already present, it will be merged with the new data.

    Parameters

    • bytes: Uint8Array
    • Optionaloptions: Partial<BinaryReadOptions>

    Returns this

  • Parse a message from a JSON value.

    Parameters

    • jsonValue: JsonValue
    • Optionaloptions: Partial<JsonReadOptions>

    Returns this

  • Parse a message from a JSON string.

    Parameters

    • jsonString: string
    • Optionaloptions: Partial<JsonReadOptions>

    Returns this

  • Retrieve the MessageType of this message - a singleton that represents the protobuf message declaration and provides metadata for reflection- based operations.

    Returns MessageType<AdminMessage>

  • Serialize the message to binary data.

    Parameters

    • Optionaloptions: Partial<BinaryWriteOptions>

    Returns Uint8Array

  • Override for serialization behavior. This will be invoked when calling JSON.stringify on this message (i.e. JSON.stringify(msg)).

    Note that this will not serialize google.protobuf.Any with a packed message because the protobuf JSON format specifies that it needs to be unpacked, and this is only possible with a type registry to look up the message type. As a result, attempting to serialize a message with this type will throw an Error.

    This method is protected because you should not need to invoke it directly -- instead use JSON.stringify or toJsonString for stringified JSON. Alternatively, if actual JSON is desired, you should use toJson.

    Returns JsonValue

  • Serialize the message to a JSON value, a JavaScript value that can be passed to JSON.stringify().

    Parameters

    • Optionaloptions: Partial<JsonWriteOptions>

    Returns JsonValue

  • Serialize the message to a JSON string.

    Parameters

    • Optionaloptions: Partial<JsonWriteStringOptions>

    Returns string

  • Parameters

    Returns boolean

  • Parameters

    • bytes: Uint8Array
    • Optionaloptions: Partial<BinaryReadOptions>

    Returns AdminMessage

  • Parameters

    • jsonValue: JsonValue
    • Optionaloptions: Partial<JsonReadOptions>

    Returns AdminMessage

  • Parameters

    • jsonString: string
    • Optionaloptions: Partial<JsonReadOptions>

    Returns AdminMessage