Skip to content

Commit

Permalink
#2985 Batch import creates ABP tags in Device Twin for OTAA-based dev…
Browse files Browse the repository at this point in the history
…ice models
  • Loading branch information
E068097 committed Nov 14, 2024
1 parent 150c907 commit 62affdb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/IoTHub.Portal.Server/Managers/ExportManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,15 @@ private async Task ImportLoRaDevice(

TryReadProperty(csvReader, newDevice, c => c.AppKey, string.Empty);
TryReadProperty(csvReader, newDevice, c => c.AppEUI, string.Empty);
TryReadProperty(csvReader, newDevice, c => c.AppSKey, string.Empty);
TryReadProperty(csvReader, newDevice, c => c.NwkSKey, string.Empty);
TryReadProperty(csvReader, newDevice, c => c.DevAddr, string.Empty);
if (string.IsNullOrEmpty(newDevice.AppKey) && string.IsNullOrEmpty(newDevice.AppEUI))
{
// ABP Settings
TryReadProperty(csvReader, newDevice, c => c.AppSKey, string.Empty);
TryReadProperty(csvReader, newDevice, c => c.NwkSKey, string.Empty);
TryReadProperty(csvReader, newDevice, c => c.DevAddr, string.Empty);
newDevice.AppEUI = null;
newDevice.AppKey = null;
}
TryReadProperty(csvReader, newDevice, c => c.GatewayID, string.Empty);
TryReadProperty(csvReader, newDevice, c => c.Downlink, null);
TryReadProperty(csvReader, newDevice, c => c.ClassType, ClassType.A);
Expand Down

0 comments on commit 62affdb

Please sign in to comment.