Android or iPhone application to control an output of an ESP32 with Bluetooth BLE

Job ID: 33207543

Budget: $750 – $1,500 CAD

Android or iPhone application to control an output of an ESP32, using Bluetooth BLE.
The communication between ESM32 and the phone (will be Android or iPhone) must be encrypted. The ESP at programming will have programmed the encryption Key. I suggest the encryption key to be the MAC address of ESP.
Encryption and details will be determined later, but must be a strong encryption.
Principle of operation:
User download the application and install it on the phone.
When user click on the shortcut of the application, the first screen open.
It is the setup screen.
The user must enter a 7 – seven-digit code. The digits show as ******* and not numbers.
Then a command will ask him to enter the code again.
If the code does not match, cursor move and flash on the first line of code waiting to restart the process. Code plus the confirmation of the code.
If the code is OK, The application will switch to RUN mode, and show the RUN screen.
Here, the user must enter the user code and press a button called RUN.
If the code does not match, the cursor moves and flash to the first position of the line.
The colour of the button RUN at the beginning it is RED.
After the user press RUN, the phone sends an encrypted command to the ESP to turn ON the Relay output. The same relay which is Double pole, will turn ON an input on the ESP, which confirm that the relay it is ON
In the same time, The ESP send an encrypted feedback to the phone and confirm that the relay it is ON, based in the feedback of the feedback input status.
If the phone receives feedback that the relay it is ON, it will turn the colour of the RUN button to GREEN, and display an EXIT button on the screen.
Now, the user can exit the application.
The relay on the ESP board will stay ON as long as it is the power to ESP.
When the power is OFF, the relay will turn OFF.
At next power up, the relay output will be OFF.
If the user tries to run the application again, while the relay it is still ON, the ESP will send an encrypted reply that the relay it is ON and the run button turn to GREEN.
If the initial setup was made and the user code it is stored on the phone, the next time the user presses the shortcut the application opens directly to RUN mode.
A blank field where the user must enter the code stored on the phone.
A green check mark, or light or what ever will light to confirm the code it is OK, and then the user can press the RUN button.
Again, if the code is wrong, the cursor will move and flash the first position of the line and an EXIT button will be also displayed.
Or maybe the EXIT should be there all the time, like the RUN button. To be determined later.
If the user changes the phone, he must send back the ESP board and get a new one.
Should be provided an emergency code to activate the relay if the code is lost.
If the ESP receive a command which match his MAC address number like for example
*2.E8.68.e7.30.62.64.#7.89 . *2 is the prefix of the emergency command, and #7.89 is the suffix of the command.
In this particular case, should activate the relay.
More details after we discuss.
Related categories: Programming Digital Electronics