IoTWireless / Client / send_data_to_wireless_device

send_data_to_wireless_device#

IoTWireless.Client.send_data_to_wireless_device(**kwargs)#

Sends a decrypted application data frame to a device.

See also: AWS API Documentation

Request Syntax

response = client.send_data_to_wireless_device(
    Id='string',
    TransmitMode=123,
    PayloadData='string',
    WirelessMetadata={
        'LoRaWAN': {
            'FPort': 123,
            'ParticipatingGateways': {
                'DownlinkMode': 'SEQUENTIAL'|'CONCURRENT'|'USING_UPLINK_GATEWAY',
                'GatewayList': [
                    {
                        'GatewayId': 'string',
                        'DownlinkFrequency': 123
                    },
                ],
                'TransmissionInterval': 123
            }
        },
        'Sidewalk': {
            'Seq': 123,
            'MessageType': 'CUSTOM_COMMAND_ID_NOTIFY'|'CUSTOM_COMMAND_ID_GET'|'CUSTOM_COMMAND_ID_SET'|'CUSTOM_COMMAND_ID_RESP',
            'AckModeRetryDurationSecs': 123
        }
    }
)
Parameters:
  • Id (string) –

    [REQUIRED]

    The ID of the wireless device to receive the data.

  • TransmitMode (integer) –

    [REQUIRED]

    The transmit mode to use to send data to the wireless device. Can be: 0 for UM (unacknowledge mode) or 1 for AM (acknowledge mode).

  • PayloadData (string) –

    [REQUIRED]

    The binary to be sent to the end device, encoded in base64.

  • WirelessMetadata (dict) –

    Metadata about the message request.

    • LoRaWAN (dict) –

      LoRaWAN device info.

      • FPort (integer) –

        The Fport value.

      • ParticipatingGateways (dict) –

        Choose the gateways that you want to use for the downlink data traffic when the wireless device is running in class B or class C mode.

        • DownlinkMode (string) – [REQUIRED]

          Indicates whether to send the downlink message in sequential mode or concurrent mode, or to use only the chosen gateways from the previous uplink message transmission.

        • GatewayList (list) – [REQUIRED]

          The list of gateways that you want to use for sending the downlink data traffic.

          • (dict) –

            Gateway list item object that specifies the frequency and list of gateways for which the downlink message should be sent.

            • GatewayId (string) – [REQUIRED]

              The ID of the wireless gateways that you want to add to the list of gateways when sending downlink messages.

            • DownlinkFrequency (integer) – [REQUIRED]

              The frequency to use for the gateways when sending a downlink message to the wireless device.

        • TransmissionInterval (integer) – [REQUIRED]

          The duration of time for which AWS IoT Core for LoRaWAN will wait before transmitting the payload to the next gateway.

    • Sidewalk (dict) –

      The Sidewalk account credentials.

      • Seq (integer) –

        The sequence number.

      • MessageType (string) –

        Sidewalk device message type. Default value is CUSTOM_COMMAND_ID_NOTIFY.

      • AckModeRetryDurationSecs (integer) –

        The duration of time in seconds to retry sending the ACK.

Return type:

dict

Returns:

Response Syntax

{
    'MessageId': 'string'
}

Response Structure

  • (dict) –

    • MessageId (string) –

      The ID of the message sent to the wireless device.

Exceptions

  • IoTWireless.Client.exceptions.ValidationException

  • IoTWireless.Client.exceptions.ResourceNotFoundException

  • IoTWireless.Client.exceptions.ThrottlingException

  • IoTWireless.Client.exceptions.InternalServerException