Quality RTOS & Embedded Software

NOTE:This is a read only archive of threads posted to the FreeRTOS support forum. Use these archive pages to search previous posts. New forum support threads can be started at the FreeRTOS forums.

FreeRTOS Support Archive

The FreeRTOS support forum can be used for active support both from Amazon Web Services and the community. In return for using our software for free, we request you play fair and do your bit to help others! Sign up for an account and receive notifications of new support topics then help where you can.

This is a read only archive of threads posted to the FreeRTOS support forum. Use these archive pages to search previous posts. New forum support threads can be started at the FreeRTOS forums.

ulApplicationGetNextSequenceNumber undefined

I’m porting FreeRTOS V10.1.0 and FreeRTOS +TCP V2.0.7 to our STM32F217.
I’m now having an issue that doesn’t seem to be documented.
ulApplicationGetNextSequenceNumber, used in FreeRTOSTCPIP.c is undefined. It is defined in FreeRTOSTCPIP.c as an external function. The only info I can find is commented: “Generate a randomized TCP Initial Sequence Number per RFC.”
Problem seems to be the same in the examples.
Some help will be needed. Thank you.
Best regards
Thomas

ulApplicationGetNextSequenceNumber undefined

The change improves security by enabling less predictability of sequence
numbers – abut apologies – it seems the update to the demo application
that demonstrated how to do this somehow got reverted and didn’t make it
into the release – the docs also need updating.
In the mean time, if you want a quick and dirty implementation of
ulApplicationGetNextSequenceNumber() you can ignore the input parameters
and just return a random number, thus:

If you want a full implementation as per the RFC then have a look here,
although this implementation has dependencies on other libraries it
gives a reference:
https://github.com/aws/amazon-freertos/blob/master/lib/securesockets/portable/freertosplustcp/awssecure_sockets.c#L625
Also, if you are using a version of FreeRTOS prior to V10.1.0 you will
also need to set configENABLEBACKWARDCOMPATIBILITY to 1 in
FreeRTOSConfig.h.

ulApplicationGetNextSequenceNumber undefined

Another remark, in addition to what Richard is writing: if you define your own version of uxRand(), please make sure that the seed gets a random value after each reboot.
You may use a randomiser peripheral in the CPU, or measure some analogue input, or the current time ( if you have ) to generate a random seed.