Department of Information Technology
Graduation Project 2023-2024
Team Members:
- Kareem Abd El-Moneam Fawzy Yassin
- Mahmoud Alaa Eldeen Fathy Sadek
- Mohammed Gabr Ahmed Khamis
- Salma Sherif Ibrahim Moustafa
- Ahmed Adel Emad Eldeen Farag
- Zyad Mahmoud Abbady Amin
Supervisor:
PhD. Haitham Safwat Hamza, Vice-Dean for Postgrad and Research, Cairo University
Here is a sample video demonstrating the FOTA system in action:
- Project Overview
- System Architecture
- Key Features
- Technologies Used
- Hardware Components
- Software Components
- FOTA System Flow
- Automotive Cybersecurity
- Installation
- Usage
This project involves the development of a Firmware Over-The-Air (FOTA) system for smart vehicles, enabling secure, efficient, and remote software updates. The project aims to address the complexities of embedded systems in modern automobiles, focusing on enhancing user experience, maintaining vehicle safety, and ensuring cybersecurity.
Modern vehicles rely heavily on embedded systems and electronic control units (ECUs) to manage various functionalities, from engine performance to advanced driver assistance systems. The evolution of smart cars has introduced the need for real-time adaptability through FOTA systems, which allow for seamless and secure software updates.
The project employs a layered architecture, featuring two main views:
- Main ECU: Manages the overall system and controls various peripherals.
- Application ECU: Executes application logic, including obstacle detection and avoidance using sensors and actuators.
- Microcontroller Abstraction Layer (MCAL): Manages hardware specifics.
- Hardware Abstraction Layer (HAL): Interfaces with physical hardware components.
- Application Layer: Implements vehicle control and safety features.
- Real-time Firmware Updates: Ensures vehicles are equipped with the latest software enhancements.
- Automotive Cybersecurity: Includes secure boot and encryption protocols to protect against unauthorized access.
- User-Friendly Mobile Application: Allows users to manage updates, report problems, and receive notifications directly from the vehicle's dashboard.
The project utilizes various technologies to create a robust FOTA system:
Django is used to develop the backend server that manages firmware updates and user interactions.
NodeMCU ESP32 serves as the gateway between the vehicle's main ECU and the FOTA server, enabling Wi-Fi connectivity for updates.
The STM32F401RCT6 microcontroller is the core component for managing the vehicle's embedded systems.
Used for wireless communication between the vehicle and mobile applications.
Developed to provide a user-friendly interface for managing updates and system notifications.
- STM32F401RCT6 Microcontroller: Serves as the core processing unit, managing both the main and application ECUs.
- NodeMCU ESP32: Acts as a gateway for receiving updates from the server.
- HC-05 Bluetooth Module: Facilitates communication between the vehicle and mobile devices.
- Ultrasonic Sensor: Detects obstacles for navigation and safety.
- H-Bridge Motor Driver: Controls the vehicle's DC motors for movement.
- FOTA Server (Django): Manages the distribution and deployment of firmware updates.
- Secure Bootloader: Validates and loads authenticated firmware onto the ECUs.
- Mobile Application: Provides an interface for vehicle owners to interact with the FOTA system.
The OEM introduces a non-critical firmware feature that vehicle owners can either accept or snooze through the user interface. If accepted, the firmware is transmitted via Node MCU, and the bootloader handles the update on the target ECU. If snoozed, a countdown timer starts in the Main ECU, prompting a reminder notification on the dashboard when the snooze period ends.
For critical updates, the process is automatic. The update is initiated without user intervention, and the Main ECU flashes the update to the target ECU. A dashboard notification informs the vehicle owner that the update is in progress, ensuring important updates are applied quickly and securely.
If a user reports a problem through the dashboard, the OEM assesses the issue and either provides a relevant firmware update or troubleshooting instructions. If an update is required, it is transmitted and flashed to the target ECU. If the issue persists, the Main ECU leverages Google Maps API to display nearby service stations based on the user's location.
The FOTA system employs robust automotive cybersecurity techniques to protect vehicles from potential cyber threats. These security measures include:
-
Secure Boot:
- Ensures that only authenticated firmware is executed on the ECUs. The bootloader verifies the integrity and authenticity of the firmware before installation, preventing unauthorized or malicious software from running on the vehicle's system.
-
AES-256 Encryption:
- Firmware updates are encrypted using AES-256 during transmission between the FOTA server and the vehicle’s ECU. This ensures that even if the data is intercepted, it remains unreadable to unauthorized entities.
-
RSA Digital Signatures:
- All firmware updates are signed with RSA digital signatures. The ECU verifies the digital signature before accepting the update, ensuring the update's authenticity and protecting against tampering.
-
Firmware Integrity Checks:
- After the update is applied, the system performs integrity checks to confirm that the firmware has not been altered. This ensures the vehicle is running the correct, unmodified version of the software.
To set up the FOTA system, follow these steps:
- Clone the repository:
git clone https://github.com/KareemMoneeam/FOTA.git
- Set up the hardware according to the pinout configuration in the documentation.
- Flash the microcontroller with the bootloader firmware using the provided scripts.
- Deploy the FOTA server on your preferred hosting environment.
- Connect the vehicle's ECU to the FOTA server using the NodeMCU ESP32.
- Use the mobile application to check for updates and manage notifications.
- Accept or snooze updates directly from the vehicle's dashboard interface.
For more detailed information, please refer to the documentation.