:doc:`IoTWireless <../../iotwireless>` / Client / send_data_to_wireless_device

****************************
send_data_to_wireless_device
****************************



.. py:method:: IoTWireless.Client.send_data_to_wireless_device(**kwargs)

  

  Sends a decrypted application data frame to a device.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotwireless-2020-11-22/SendDataToWirelessDevice>`_  


  **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
            }
        }
    )
    
  :type Id: string
  :param Id: **[REQUIRED]** 

    The ID of the wireless device to receive the data.

    

  
  :type TransmitMode: integer
  :param TransmitMode: **[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).

    

  
  :type PayloadData: string
  :param PayloadData: **[REQUIRED]** 

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

    

  
  :type WirelessMetadata: dict
  :param WirelessMetadata: 

    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.

        

      
    
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'MessageId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **MessageId** *(string) --* 

        The ID of the message sent to the wireless device.

        
  
  **Exceptions**
  
  *   :py:class:`IoTWireless.Client.exceptions.ValidationException`

  
  *   :py:class:`IoTWireless.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoTWireless.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoTWireless.Client.exceptions.InternalServerException`

  