public async Task Test_Device_Initiated_Mac_LinkCheckCmd_Should_work() { try { const int MESSAGES_COUNT = 3; var device = TestFixtureCi.Device22_ABP; LogTestStart(device); await ArduinoDevice.setDeviceModeAsync(LoRaArduinoSerial._device_mode_t.LWABP); await ArduinoDevice.setIdAsync(device.DevAddr, device.DeviceID, null); await ArduinoDevice.setKeyAsync(device.NwkSKey, device.AppSKey, null); await ArduinoDevice.setPortAsync(0); await ArduinoDevice.SetupLora(TestFixtureCi.Configuration); for (var i = 0; i < MESSAGES_COUNT; ++i) { var msg = "02"; Log($"{device.DeviceID}: Sending unconfirmed Mac LinkCheckCmd message"); await ArduinoDevice.transferHexPacketAsync(msg, 10); await Task.Delay(2 *Constants.DELAY_BETWEEN_MESSAGES); // After transferPacket: Expectation from serial // +MSG: Done await AssertUtils.ContainsWithRetriesAsync("+MSGHEX: Done", ArduinoDevice.SerialLogs); await TestFixtureCi.AssertNetworkServerModuleLogStartsWithAsync($"{device.DeviceID}: valid frame counter, msg:"); await TestFixtureCi.AssertNetworkServerModuleLogStartsWithAsync($"{device.DeviceID}: LinkCheckCmd mac command detected in upstream payload:"); } await TestFixtureCi.AssertNetworkServerModuleLogStartsWithAsync($"{device.DeviceID}: answering to a"); } finally { await ArduinoDevice.setPortAsync(1); } TestFixtureCi.ClearLogs(); }