Skip to content

WirelessDevice

Source: src/AWS/IoTWireless/WirelessDevice.ts

An AWS IoT Core for LoRaWAN (or Amazon Sidewalk) wireless device — the cloud registration of a physical radio, wired to a Destination for uplink routing and to a DeviceProfile / ServiceProfile pair for its radio parameters.

The device’s radio identity (type, DevEui, activation keys) is immutable — changing it replaces the device. The name, description, destination, positioning, profile references, and tags update in place.

OTAA v1.0.x LoRaWAN Device

import * as IoTWireless from "alchemy/AWS/IoTWireless";
const device = yield* IoTWireless.WirelessDevice("Sensor", {
type: "LoRaWAN",
destinationName: destination.destinationName,
loRaWAN: {
DevEui: "1122334455667788",
DeviceProfileId: deviceProfile.deviceProfileId,
ServiceProfileId: serviceProfile.serviceProfileId,
OtaaV1_0_x: {
AppKey: Redacted.make("00112233445566778899aabbccddeeff"),
AppEui: "8877665544332211",
},
},
});

Repoint a device at a different destination

const device = yield* IoTWireless.WirelessDevice("Sensor", {
type: "LoRaWAN",
destinationName: otherDestination.destinationName, // updates in place
loRaWAN: { ... },
});