Unable to receive Connect ACK from AWS IOT MQTT Broker

vipulpanch86 wrote on September 13, 2018:

I have been trying to Port Amazon FreeRTOS lib to my platform (Tiva TM4C129E) over ethernet using lwip as an network stack.

I confirmed my “AWS IOT thing” configuration to be good by running Amazon FreeRTOS for windows simulator and using the client credentials provided by the AWS IOT console, I am able to connect successfully to AWS IOT using windows simulator.

Now I confirmed my AWS Secure Sockets Layer porting by running the demo “aws_tcp_echo_client_single_task.c” and was successful in sending and receiving data over socket.

I tried to connect the “AWS IOT” using my hardware ( using the demo aws_hello_world.c ) and I am successfully able to connect socket, negotiate over TLS. however, the MQTT Connect doesn’t get any response and the socket is disconnected after the timeout.
When debugging it was observed that in the function"prvManageConnections()", “SOCKETS_Recv()” always returns “SOCKETS_EWOULDBLOCK”.

I have set the “mqttconfigMQTT_TASK_MAX_BLOCK_TICKS” to “100” as i don’t have the function to wake up when the data is available.

I have monitored AWS CloudTrail and observed that MQTT Connection was successful.

Am i missing anything that i cannot receive MQTT Connect Ack from the broker?