New project setup and other Amazon FreeRTOS questions

chris12892 wrote on January 19, 2019:

Hi,

I am very new to Amazon FreeRTOS, but I am looking at using it for a new project, mainly to get the OTA capability.

Some background: The product would probably on based on the ESP32. The product involves some realtime/motion control software (which would be running on the ESP32). Ideally, I’d want to run the wireless/communication on one core and my application on the other. The product must be paired to a phone, and we have fairly realtime requirements for communication.

Specific questions:

  1. Sanity check: Does this sound like an appropriate application for Amazon FreeRTOS on an ESP32?

  2. We need to talk point to point to a phone through BTLE. We do not want to go through wifi, and we do not want our messages to hit the cloud. Using the Amazon BTLE library, can we use the phone as a proxy device to get both OTA and direct messaging to the phone? We have full control of our messaging, so if we need to pack it in an MQTT message, that’s fine.

  3. It’s my observation that the Amazon docs are extremely extensive covering the configuration, building and testing of the demos. The Amazon docs seem to stop exactly short of actually taking the Amazon libraries and creating a new non-demo project. This seems to also be the case for the Android proxy app too. What is the best practice way to spin up a fully custom project using AFRTOS? Should I simply copy the libraries out of the demo repo? In that case, it makes upgrading the libs a little bit dirty. I suppose I could also make my new app exist outside of the AFRTOS demo repo, but reference the libs in the demo repo.

Thanks!
Chris

Alexa-AWS wrote on January 23, 2019:

Hi Chris,

Thanks for looking into Amazon FreeRTOS.

  1. Perhaps, but it depends on your communication (and motion control) requirements. BLE messages can be configured to be sent about every 7.5-20ms.

  2. Yes, Amazon FreeRTOS with BLE is currently in Beta, and you can use it to get both MQTT messages and perform OTAs through the phone via BLE. If you do not want to heavily modify the app and device code, you would need to wrap the messages in MQTT. You can configure your MQTT agent to connect to an endpoint of your choice.

Likewise, for OTA with the Amazon FreeRTOS OTA agent, OTA updates would also need to be wrapped by MQTT to use without significant modification. The demo phone application acts as a middle man between the AWS IoT OTA job and the device, and the device OTA agent expects OTAs to be formatted like and respond to requests as the AWS IoT OTA job would.

  1. I think there are many ways to start building your custom application - the ways you’ve suggested could work, and you could also fork the repo & copy/rename/modify the demo folder.

Hope this helps,
Alexa