Debug flag in make target causes TLS to be used on connection?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have an odd problem where when I specify the -debug flag in my make target the HTTP library causes a socket to be created with a TLS context that eventually fails since my server is unencrypted. Let me give you a bit of background....

My test device is an Inventek 4319 evaluation board.

Im using the standard WICED IDE v2.2.1 w/Inventek "patch"

My app is using the included http library, more specifically the methods in http_stream.c to send data to my "server". The data is a JSON encoded string.

The server at this stage in the game is either netcat or a custom Java based app. Both used for testing and will report data. Both not using TLS or any kind of security.

My build string in debug mode is : axeda.dataAgent-ISM4319_M3G_L44-debug download run 

My build string in normal mode is:  axeda.dataAgent-ISM4319_M3G_L44 download run

In debug mode:

There are no compilation errors. When the app runs it creates the message correctly, but when it tries to connect it prints a "Error with TLS handshake" message and goes into a hard fault state(the red LED is on solid.

In normal mode:

When I dont have the debug string in the make target the program runs but fails after the data is sampled and never says "Error with TLS handshake", instead it restarts. Obviously I have some issue there, but its hard to debug when debugging causes a different behavior.

Is there some option or flag I need to set to prevent the sequence of events from happening?

Could it be that http_init_stream always creates a secure socket and its just reported in Debug mode rather than in normal mode?

0 Likes
3 Replies