FreeRTOS Windows simulator not connecting.

matbli wrote on December 03, 2018:

Hi,

Trying the Amazon FreeRTOS Windows simulator. But without any success!
Have download credentials and configured as instructed and built. Noticed that the
clientcredentialIOT_THING_NAME is not used anywhere in the software.

When simulator started I see:

The following network interfaces are available:

Interface 1 - rpcap://\Device\NPF_{033B7BCB-6DAA-448E-872F-EE15B4131ABF}
(Network adapter ‘USB2.0 to Fast Ethernet Adapter’ on local host)

The interface that will be opened is set by “configNETWORK_INTERFACE_TO_USE”, which
should be defined in FreeRTOSConfig.h

0 0 [None] FreeRTOS_IPInit
1 0 [None] vTaskStartScheduler

The following network interfaces are available:

Interface 1 - rpcap://\Device\NPF_{033B7BCB-6DAA-448E-872F-EE15B4131ABF}
(Network adapter ‘USB2.0 to Fast Ethernet Adapter’ 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.
2 143 [IP-task] vDHCPProcess: offer 192.168.20.125
3 203 [IP-task] vDHCPProcess: offer 192.168.20.125
4 203 [IP-task] Write code signing certificate…
5 204 [IP-task] Write device private key…
6 219 [IP-task] Key provisioning done…
7 219 [IP-task] Creating MQTT Echo Task…
8 219 [IP-task]

IP Address: 192.168.20.125
9 219 [IP-task] Subnet Mask: 255.255.255.0
10 219 [IP-task] Gateway Address: 192.168.20.1
11 219 [IP-task] DNS Server Address: 192.168.20.1

12 219 [MQTTEcho] MQTT echo attempting to connect to ahk16fh04lib9-ats.iot.eu-west-1.amazonaws.com.
13 923 [MQTTEcho] ERROR: MQTT echo failed to connect with error 1.
14 923 [MQTTEcho] MQTT echo test could not connect to broker.
15 923 [MQTTEcho] MQTT echo demo finished.
16 923 [MQTTEcho] ----Demo finished----

In Wireshark I se the TLS handshake ending in an Encryption Alert and disconnect from the distant end.

What am I doing wrong!?

/Mats

Gaurav-Aggarwal-AWS wrote on December 03, 2018:

What version of Amazon FreeRTOS are you usning?

Does the TLS handshake complete for you or not? You can check that by putting a breakpoint in the function prvSetupConnection here: https://github.com/aws/amazon-freertos/blob/master/lib/mqtt/aws_mqtt_agent.c#L853

Would you please share the policy document atatched to the certificate you are using?

Thanks.

ma57bl wrote on December 04, 2018:

Hi,

It was a flaw in the policy document. Sorry for not double check before asking.

Thanks for your reply anyway, it gave me a push in the right direction anyway :-)!

/Mats

Gaurav-Aggarwal-AWS wrote on December 04, 2018:

I am glad that it worked for you.

Thanks.