The history notes are a bit vague, with a jump from 2.0.0 to 2.2.1.
Can anyone confirm if there are known issues with DNS with version 2.0.7? The symptoms are random failures. I’m assuming its something to do with cached dns, because wireshark shows no attempts at DNS at all, and FreeRTOS_gethostbyname_a callback returns 0 for host ip.
History Notes say:
+ Made changes in DNS to make asynchronous lookup work.
You might already know that earlier the +TCP source code was present as copies in two separate locations in amazon-freertos repository and freertos/freertos repository. That makes tracking the history a bit difficult. We have since rectified that and made a separate repository for the +TCP source.
I digress. After a bit of digging, I found the PR behind the line in history file. It is this one. If was fixing the timeout value.
Are you able to set a breakpoint in the code to check what happens exactly? Till then, I will try to replicate your issue. Can you point me from where did you get the +TCP version 2.0.7? I found this: FreeRTOS-Plus-TCP/source at amazon-freertos. Is it the correct one?
On this one, I’m doing remote debugging/logging on a problem location and guessing at what is happening. I upgraded the project to 2.4.0 and I’m going to test it on that version and see what happens. Any suggestions of what I could log to pinpoint failures? The failures were happening with good internet, the network IF was up, and with both FreeRTOS_gethostbyname_a and FreeRTOS_gethostbyname.
Its actually a bit difficult to pinpoint TCP versions even yet, it is confusing the way its done. My first attempts simply git cloned the freertos+tcp only to find the headers all say . So then I downloaded the supported version (b6eac0c ??), only to run into the dhcp bug fixed in bug report #414.
Is this by design that the main branch is the development branch? That seems a bit odd the way this is done,
If you are sure that the issue is happening with DNS, and all other things are proper, then I would suggest start by printing out the DNS cache when you call the gethostbyname function. See if there is some discrepancy there - if not, then you should figure out the control flow.
Apologies for your experience. But yes, currently it is by design that the main branch is always up to date with the latest changes and bug fixes. Periodically, we release versions of the library which have been tested to be performing properly. They can be found here: Releases · FreeRTOS/FreeRTOS-Plus-TCP · GitHub.
As you must already know, any code base is not perfect and without bugs - regardless of how well tested it is. There is always a room for improvement. And this ‘improvement’ is made incrementally on the main branch. If we deem a particular state of the repository stable, we tag it as a ‘release’ and update the version numbers.
If, in the current main branch you see in source code, you’ll see that it says to clarify it to the users that the branch is always incrementally worked on and updated.
If you would like a tested version, which again I would like to highlight that we don’t claim is perfect and without any bugs - it just meets the requirements set by our always improving set of tests, then you should follow the link above.