FreeRTOS OTA windows simulator hangs at startup


I’ve downloaded the latest windows simulator for OTA and configured the network interface, certificates, private key and broker end point. Then I build and ran the executable. When I run it the logging (listed below) mentions the network interface was successfully opened, but the application hangs.
In the debugger I can see the app hangs inside the function prvSimulatedPeripheralTimer( LPVOID lpParameter ) on the line:

Sleep( portTICK_PERIOD_MS );

Anyone here who knows what is causing this?

---------- logging--------------------------
0 0 [None] [DEBUG] [OTADemo] [prvMiscInitialisation:241] Seed for randomizer: 1642889854

1 0 [None] [DEBUG] [OTADemo] [prvMiscInitialisation:243] Random numbers: 0000640E 0000182C 000019EB 00003405

The following network interfaces are available:

Interface 1 - rpcap://\Device\NPF_{F1D50CAE-408D-45D6-91DA-906BCAC898D0}
(Network adapter ‘Intel(R) Ethernet Connection I217-LM’ on local host)

Interface 2 - rpcap://\Device\NPF_{68FF978D-7605-4DF3-AEBF-CE38E9CEB943}
(Network adapter ‘Microsoft’ on local host)

Interface 3 - rpcap://\Device\NPF_{71C5C9D7-BD5A-45AE-A8A7-D71AD9445FCA}
(Network adapter ‘Microsoft’ on local host)

Interface 4 - rpcap://\Device\NPF_{DAAFE730-8636-46E9-826B-BC96645710B3}
(Network adapter ‘Microsoft’ on local host)

Interface 5 - rpcap://\Device\NPF_{831B8D04-8477-4502-9D02-2E707C7D01CB}
(Network adapter ‘Microsoft’ on local host)

The interface that will be opened is set by “configNETWORK_INTERFACE_TO_USE”, which
should be defined in FreeRTOSConfig.h
Attempting to open interface number 1.
Successfully opened interface number 1.

The application spends most of its time around that sleep function, so you can expect to see that nearly every time you stop the debugger.

Your logging shows the network interface opened but there is no IP address set yet. Do you have ipconfigUSE_DHCP set to 1? If so try taking a wireshark log of network traffic to see if the DHCP request is seen on the wire.

Is your network interface wired Ethernet. It needs to be.

Thanks, I did not realize the connection had to be wired. Fixed that, now it hangs on a SSL problem:

12 6608 [OTA Demo Task] [ERROR] [TlsTransport] [TLS_FreeRTOS_recv:800] vAssertCalled( C:\FreeRTOSv202112.00\FreeRTOS-Plus\Demo\AWS\Ota_Windows_Simulator\Ota_Over_Mqtt_Demo\DemoTasks\OtaOverMqttDemoExample.c, 1427
Failed to read data: mbedTLSError= SSL - The peer notified us that the connection is going to be closed : .

Amazon AWS has several root certificates to choose from. I picked AmazonRootCA1.pem
is this correct, or is the demo expecting a rootCA with different encryption / key length?

Fixed it, there was a problem with the policy for my WinSim thing in AWS IoT core. It is now working.

As a tip to anyone who might struggle to get the demo going; make sure to test your certificates first to verify they are good to make the MQTT connection. To verify, install the MQTT Explorer windows client and tryout your certificates and private key before using them in the FreeRTOS OTA windows demo.