SendDataToWirelessDevice
Source:
src/AWS/IoTWireless/SendDataToWirelessDevice.ts
Runtime binding for iotwireless:SendDataToWirelessDevice — queue a
downlink message to the bound wireless device from a deployed Lambda or
Task. The message is delivered the next time the device opens a receive
window.
Sending Downlink Messages
Section titled “Sending Downlink Messages”Provide the SendDataToWirelessDeviceHttp implementation layer on the
Function effect, bind the device in the init phase, then call the
returned client at runtime.
// initconst sendData = yield* AWS.IoTWireless.SendDataToWirelessDevice(device);
// runtime — PayloadData is base64-encodedconst { MessageId } = yield* sendData({ PayloadData: Buffer.from("hello").toString("base64"), TransmitMode: 1, WirelessMetadata: { LoRaWAN: { FPort: 1 } },});// on the Function effect:// .pipe(Effect.provide(AWS.IoTWireless.SendDataToWirelessDeviceHttp))