1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Design and implementation of firmware over the air model for car lighting and collision avoidance systems

111 0 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Design And Implementation Of Firmware Over The Air Model For Car Lighting And Collision Avoidance Systems
Tác giả Chau Thanh Dat, Dinh The Danh
Người hướng dẫn Do Duy Tan, PhD
Trường học Ho Chi Minh University of Technology and Education
Chuyên ngành Computer Engineering Technology
Thể loại Graduation Thesis
Năm xuất bản 2024
Thành phố Ho Chi Minh City
Định dạng
Số trang 111
Dung lượng 5,73 MB

Cấu trúc

  • CHAPTER 1 OVERVIEW (0)
    • 1.1. PROBLEM STATEMENT (18)
    • 1.2. RESEARCH OBJECTIVES (19)
    • 1.3. RESEARCH SCOPE (19)
    • 1.4. RESEARCH METHODS (19)
    • 1.5. RESEARCH LIMITS (19)
    • 1.6. STRUCTURE OF THESIS (20)
  • CHAPTER 2: LITERATURE REVIEW (0)
    • 2.1. STM32F103C8T6 (22)
    • 2.2. ESP32 (24)
    • 2.3. FOTA (27)
      • 2.3.1. Overview FOTA (27)
      • 2.3.2. FOTA Benefits (28)
      • 2.3.3. FOTA Requirements (29)
    • 2.4. BOOTING PROCESS OF ARM COTEX-M3 (29)
      • 2.4.1. Vector table of ARM COTEX-M3 (29)
      • 2.4.2. The startup process of the MCU (31)
      • 2.4.3. The startup process of the MCU with Bootloader (32)
      • 2.4.4. Reprogram MCU with Bootloader (33)
    • 2.5. UDS STANDARD FOR CAN BUS (34)
    • 2.6. AUTOSAR (35)
      • 2.6.1. Overview AUTOSAR (35)
      • 2.6.2. AUTOSAR Layer (36)
      • 2.6.3. RTE Layer (37)
    • 2.7. CAN COMMUNICATIONS PROTOCOL (38)
      • 2.7.1. CAN Introduction (38)
      • 2.7.2. CAN Network Message Format (38)
    • 2.8. I2C COMMUNICATIONS PROTOCOL (40)
      • 2.8.1. I2C Introduction (40)
      • 2.8.2. I2C transfer operation (40)
    • 2.9. UART COMMUNICATIONS PROTOCOL (42)
    • 2.10. FIREBASE DATABASE (44)
    • 2.11. SECURITY WITH AES ALGORITHM (45)
      • 2.11.1. Encryption Algorithms (45)
      • 2.11.2. AES Algorithm (46)
      • 2.11.3. AES Encryption (46)
      • 2.11.4. AES Cipher block chaining (CBC) mode (48)
      • 2.11.5. AES Decryption (49)
  • CHAPTER 3: SYSTEM DESIGN (0)
    • 3.1. SYSTEM REQUIREMENTS (50)
    • 3.2. SYSTEM BLOCK DIAGRAM AND SYSTEM FLOWCHART (51)
    • 3.3. HARDWARE DESIGN AND IMPLEMENT (53)
      • 3.3.1. Telecommunication Unit Hardware Design (53)
      • 3.3.2. Gateway Unit Hardware Design (55)
      • 3.3.3. Lighting System Hardware Design (60)
      • 3.3.4. Collision Avoidance System Hardware Design (63)
    • 3.4. SOFTWARE DESIGN AND IMPLEMENT (67)
      • 3.4.1. Telecommunication Unit Software Design (67)
        • 3.4.1.1. Telecommunication Unit Tasks (67)
        • 3.4.1.2. Telecommunication Unit Flowchart (67)
        • 3.4.1.3. Telecommunication Unit State Machine (69)
        • 3.4.1.4. Firebase Connection (70)
      • 3.4.2. Graphic User Interface (GUI) (70)
      • 3.4.3. Gateway Software Design (71)
        • 3.4.3.1. Gateway Tasks (71)
        • 3.4.3.2. Gateway Flowchart (72)
        • 3.4.3.3. RTE in Gateway (73)
        • 3.4.3.4. Gateway State Machine (73)
        • 3.4.3.5. Communication Sequence (74)
        • 3.4.3.6. Receive Module (76)
        • 3.4.3.7. Encrypt Module (78)
        • 3.4.3.8. Transmit Module (78)
        • 3.4.3.9. User Interface Module (80)
      • 3.4.4. Bootloader (82)
        • 3.4.4.1. Bootloader Requirement (82)
        • 3.4.4.2. Bootloader Flash Setup (82)
        • 3.4.4.3. Bootloader Behavior (85)
        • 3.4.4.4. Application Behavior (86)
      • 3.4.5. Lighting System Software Design (87)
        • 3.4.5.1. Lighting System Tasks (87)
        • 3.4.5.2. Lighting System Flowchart (88)
      • 3.4.6. Collision Avoidance System Software Design (88)
        • 3.4.6.1. Collision Avoidance System Tasks (88)
        • 3.4.6.2. Collision Avoidance System Flowchart (89)
  • CHAPTER 4: RESULTS AND EVALUATIONS (0)
    • 4.1. REQUIREMENTS OF RESULT (91)
    • 4.2. GATEWAY UI SEQUENCE (92)
    • 4.3. COMMUNICATION SEQUENCE (94)
      • 4.3.1. UART (94)
      • 4.3.2. CAN (96)
    • 4.4. TEST CASE (97)
      • 4.4.1. Lighting System Test Case (98)
      • 4.4.2. Collision Avoidance System Test Case (100)
      • 4.4.3. Update Fail Handle Test Case (101)
        • 4.4.3.1. Firmware Invalid (101)
        • 4.4.3.2. FOTA process interruption (102)
        • 4.4.3.3. Main Firmware and Backup Firmware are corrupted (103)
    • 4.5. TEST CASE EVALUATIONS (104)
  • CHAPTER 5: CONCLUSION (0)
    • 5.1. CONCLUSION (105)
    • 5.2. PROJECT IMPROVEMENT (106)

Nội dung

HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATIONGRADUATION THESIS MAJOR: COMPUTER ENGINEERING TECHNOLOGY INSTRUCTOR: DO DUY TAN STUDENT: CHAU THANH DAT DINH THE ANH DESIGN AND IMP

OVERVIEW

PROBLEM STATEMENT

The auto industry has experienced remarkable growth over the past decade, driven by the rising demand for safety and enhanced driving experiences Modern vehicles are evolving from purely mechanical systems to sophisticated machines equipped with multiple Electronic Control Units (ECUs) that assist drivers, including systems for brakes, power steering, and airbags However, the increasing integration of ECUs poses significant challenges for car manufacturers regarding maintenance and updates Traditionally, firmware updates were cumbersome, requiring a connection to a computer and specialized software, which made the process inconvenient and time-consuming The advent of Firmware Over The Air (FOTA) technology has transformed this landscape, enabling manufacturers to wirelessly update vehicle software, thereby improving user convenience and reducing costs.

We chose the graduation thesis topic "Design and Implementation of Firmware Over The Air (FOTA) Model for Car Lighting and Collision Avoidance System" due to the potential and value of FOTA technology Implementing it safely and reliably in critical systems like car lighting presents a significant technical challenge This topic enhances our understanding of FOTA systems within the automotive industry.

RESEARCH OBJECTIVES

This thesis investigates the design and development of a secure and efficient Firmware Over-The-Air (FOTA) system for updating automotive MCU software, utilizing ESP32 and STM32 technologies It encompasses the study of relevant protocols such as UART and CAN, while assessing the potential advantages and addressing challenges, particularly the integration of AES security mechanisms for data transmission The research concludes with various test cases aimed at evaluating the system's performance in real-world scenarios.

RESEARCH SCOPE

This thesis focuses on addressing the following problems:

• Set up a real-time database linked to the FOTA system and design an interface so that developers can easily upload firmware to the database

• Designing a reliable data transfer sequence from the database to the MCU that needs to be reprogrammed

• Design and implement a Bootloader to reprogram the application of the Light System and handle errors when the reprogram fails

• Design of security communication between Gateway - MCU on CAN bus

• User interface for reprogramming progress.

RESEARCH METHODS

This research will employ a multi-pronged approach, utilizing:

• Literature review: A crucial step, examining existing research on FOTA technologies, UART, CAN bus, …

• System design and development: Designing the FOTA protocol, communication framework, and update management system specifically for lighting and collision avoidance systems

• Performance evaluation: Evaluating the efficiency and reliability of the FOTA system in a real-time environment.

RESEARCH LIMITS

There are some limitations of this project, including:

The Telematic Unit relies on a stable Wi-Fi connection to effectively connect with the Cloud, as its operation is contingent upon this connectivity Without a reliable Wi-Fi signal, the system cannot function properly Additionally, due to the presence of multiple MCUs, a direct power supply to the MCU has been implemented, ensuring consistent power availability.

The security of firmware is crucial in real-world applications, as vulnerabilities can jeopardize human lives if exploited by hackers In this discussion, we will focus on the connection between the cloud and the telematic unit, assuming that adequate security measures are already in place to protect this vital link.

• The thesis will not delve into the business aspects of FOTA adoption, such as cost analysis or market potential

• Power consumption will also not be considered; we focus on the application and feasibility of the project.

STRUCTURE OF THESIS

The structure of the thesis is as follows:

This chapter provides an overview of the thesis, including the reason for selecting this topic, research objectives, scope, and limitations

This chapter explores current research on Firmware Over-the-Air (FOTA) updates, detailing the key components utilized in the project, specifically the STM32 and ESP32 microcontrollers It also examines the booting process theory for ARM Cortex MCUs, the UDS standard, AUTOSAR framework, and various communication protocols including CAN, I2C, and UART, while emphasizing the importance of security in embedded systems.

Chapter 3: System Design and Implementation

This chapter, System Design and Implementation, is where the theoretical

This article outlines the practical application of knowledge through detailed system specifications and requirements, covering both hardware and software designs, including the system diagram, bootloader design, telematic unit, gateway system, collision avoidance system, and lighting system Additionally, it provides an explanation of the software flowchart followed by a discussion on the implementation process.

This chapter presents the results of the researched topic through test cases and evaluation

Chapter 5: Conclusion and Future Work

This chapter summarizes the main findings, concludes, and suggests directions for future improvement.

LITERATURE REVIEW

STM32F103C8T6

The STM32 BluePill is a compact and powerful board from the STM32 series, making it a favored option among DIY enthusiasts and small project developers It serves as an excellent introduction to ST microchips and the ARM Cortex 32-bit architecture.

The STM32 BluePill features the STM32F103C8T6 microcontroller, an ARM Cortex-M3 chip that operates at a clock speed of 72MHz This powerful microcontroller is equipped with 64KB of Flash memory, 20KB of SRAM, and offers options for either 64KB or 128KB of EEPROM, making it a versatile choice for various embedded applications.

• Dimensions: With dimensions of approximately 53mm x 22mm, the STM32 BluePill features a compact design that saves space in applications with size requirements

• Operating voltage: The board supports operating voltage from 2V to 3.6V, which can operate stably at 5V with the help of a USB power supply pin or VBUS battery

• Connector: STM32 BluePill usually has a mini-USB connector for loading programs and communicating with computers

• Pins: The board comes with 37 GPIO connectors, supporting many functions such as GPIO, PWM, UART, SPI, and I2C, providing flexibility with peripheral components and modules

• Other features: STM32 BluePill supports protocols such as UART, SPI, and

I2C and can interact with computers via USB It can also perform various functions such as ADC measurement and PWM and support other features depending on the specific application

The STM32 BluePill is a versatile microcontroller that can be programmed with popular software development environments like STM32CubeIDE and Arduino IDE, utilizing community-supported circuit boards and libraries Its flexibility and performance make it an ideal choice for small projects, IoT applications, and various other innovative developments.

We create Table 2-1 summarizing the function of STM32 pins

Table 2-1 : Table Pinout of STM32 [1]

3.3V: The output voltage is stabilized from the on-board regulator (large current operation is not recommended), can also be used to supply power to the microcontroller 5V from USB or onboard regulator: Can be used to power the onboard 3.3V regulator GND: The ground pins

The pins can read analog signal values with 12-bit resolution

PA0 – PA15 PB0 – PB15 PC13 – PC15

A total of 37 pins can be used to connect and control various components

The number pins are likely to be used to create interrupts when an event occurs

PA0 – PA3 PA6 – PA10 PB0 - PB1 PB6 – PB9

Total of 15 Pulse Width Modulation (PWM) pins are available to control pulse width and dim signals

Support Serial Peripheral Interface (SPI) communication via 2 pins

Using the LED as a GPIO pin can be used to display status or a general indicator

Support Inter-Integrated Circuit (I2C) communication for connection with other devices

Provide Controller Area Network (CAN) interfaces

ESP32

The ESP32 is a cost-effective, low-power system-on-a-chip (SoC) microcontroller that combines Bluetooth and dual-mode Wi-Fi in most variants, ensuring versatility, power, and reliability for a wide range of applications.

The ESP32 microcontroller, developed by Espressif Systems, is a powerful successor to the popular NodeMCU ESP8266, offering improved performance and advanced features Its versatility makes it a preferred choice for various applications in IoT, robotics, and automation.

The ESP32 microcontroller features an efficient power management system that allows it to enter sleep mode and activate only when needed, making it ideal for battery-powered applications and significantly prolonging their lifespan.

The ESP32 is engineered for low power consumption, making it perfect for battery-operated applications Its advanced power management system enables it to enter sleep mode and activate only when necessary, greatly enhancing battery longevity.

The ESP32 is a versatile platform that seamlessly integrates Wi-Fi and Bluetooth capabilities, enabling it to connect to the internet and interact with other devices, including smartphones, sensors, and actuators.

• Powerful CPU: ESP32 is powered by a 32-bit Tensilica Xtensa LX6 microprocessor, which provides the performance needed for demanding applications, as shown in the figure below

The ESP32 boasts a substantial memory capacity, making it perfect for applications that demand extensive data storage and intricate code execution.

• Wide range of peripherals: ESP32 has a wide range of peripherals, including GPIO pins, ADC, DAC, SPI, I2C, and UART This makes it a versatile platform for various applications

Figure 2-1 : ESP32 Functional Block Diagram [2, Fig 1]

Based on the functional blocks ESP32 specification as shown in Figure 2-1: [2]

• Wireless connectivityWiFi: 150.0 Mbps data rate with HT40

• Bluetooth: BLE (Bluetooth Low Energy) and Bluetooth Classic

• Processor: Tensilica Xtensa Dual-Core 32-bit LX6 microprocessor, running at 160 or 240 MHz

The device features a total of 448 KB of ROM for booting and core functions, complemented by 520 KB of SRAM dedicated to data and instructions Additionally, it includes 8 KB of fast RTC SRAM for data storage and main CPU operations during deep-sleep mode, alongside another 8 KB of slow RTC SRAM for co-processor access in the same mode Furthermore, the eFuse component consists of 1 Kbit, with 256 bits allocated for system purposes such as the MAC address and chip configuration, while the remaining 768 bits are reserved for customer applications, including Flash Encryption and Chip ID.

• Low Power: ensures that you can still use ADC conversions, for example, during deep sleep

The article discusses various peripheral input/output interfaces that enhance device functionality, including DMA-enabled capacitive touch, Analog-to-Digital Converters (ADCs), and Digital-to-Analog Converters (DACs) It highlights communication protocols such as I²C (Inter-Integrated Circuit), UART (Universal Asynchronous Receiver/Transmitter), SPI (Serial Peripheral Interface), and I²S (Integrated Interchip Sound) Additionally, the article emphasizes the role of Pulse-Width Modulation (PWM) in signal processing and the importance of security through hardware accelerators for AES and SSL/TLS encryption.

In this thesis, we will use the ESP32 DEVKIT Development Board

FOTA

Firmware Over The Air (FOTA) is an innovative technology that allows for the seamless upgrading and updating of a device's operating firmware via a network, eliminating the necessity for a direct device connection This efficiency streamlines the maintenance process, ensuring devices remain up-to-date with the latest features and security enhancements.

Devices equipped with FOTA technology can efficiently download manufacturer updates based on file size and connection speed This advancement significantly reduces the need for businesses to dispatch technicians for equipment upgrades, ultimately saving both time and money.

Figure 2-2 : Basic FOTA concept in automotive industry [4]

FOTA technology revolutionizes IoT systems, particularly in the automotive sector, by facilitating remote firmware management and updates for vehicle ECUs This innovation streamlines maintenance, ensuring vehicles are consistently equipped with the latest software enhancements and security patches, ultimately enhancing their efficiency and performance.

• FOTA Server:Responsible for managing vehicle firmware release

• FOTA Client: Application responsible for communicating with a backend server and updating campaign management

• FOTA Agent: Application that performs final updating of firmware for ECUs during run-time [4]

Updating the ECUs of thousands of cars using traditional methods is a daunting task, requiring each vehicle to be taken to the manufacturer for reprogramming, which incurs high costs and disrupts the user experience However, FOTA technology addresses these challenges by enabling remote updates, streamlining the process and enhancing customer satisfaction.

• Cost- Efficient and better-managed firmware update:

Developing car software is a complex process that involves multiple stakeholders across various regions, making firmware updates particularly challenging Over-the-air (OTA) updates simplify this process, significantly reducing both costs and time associated with software and firmware revisions According to IHS Automotive, the total savings for original equipment manufacturers (OEMs) from FOTA updates is projected to exceed $35 billion by 2022.

• Upgrade the firmware safely, continuous improvements:

Original equipment manufacturers (OEMs) have effectively utilized online patches to rectify errors in their automotive computer programs, demonstrating the efficiency of over-the-air (FOTA) updates in resolving firmware issues By installing the latest firmware or implementing minor fixes, most firmware errors can be successfully addressed, thereby improving the overall performance of the system A notable example of this is Tesla's prompt response to an incident where one of their vehicles caught fire in an accident, which was resolved through a system settings update, resulting in no further reported fires.

To ensure safety in firmware updates for ECUs, it is crucial to verify that the downloaded image is compatible with the specific MCU This verification process employs CRC, checksums, and other version compatibility checks By utilizing CRC as a robust testing mechanism, we can confirm that the new update is correctly installed and functioning as intended.

Ensuring firmware security is of utmost importance, achieved through the use of secure protocols and encryption Data is encrypted at the Gateway and subsequently decrypted by the MCU before the update is applied While the thesis assumes that wireless communication is secure, it focuses on securing the data transmitted from the gateway to the MCU using the AES-CBC-128 encryption standard, which will be elaborated on later.

To ensure accurate data transmission from the Gateway to another MCU, it is essential that all data is completely transmitted before any processing occurs This necessitates the use of a reliable communication protocol to guarantee the integrity of the data.

• Scalability: o Should be designed to support a large number of embedded devices.

BOOTING PROCESS OF ARM COTEX-M3

2.4.1 Vector table of ARM COTEX-M3

The vector table for an ARM CORTEX microcontroller contains a list of error handlers and usable interrupts, and it is defined within the boot file, which is an assembly file with a ".s" extension located in the project's Core/Startup directory.

Table 2-2 : Vector table of ARM Cortex-M3 [6, Tab 7.1]

This vector table (Table 2-2) is important in starting the ARM Cortex MCU, looking up errors that occur, and programming the interrupt function to work

Typically, each MCU is represented by a single vector table, as illustrated in Figure 2-3 However, it is feasible to maintain multiple vector tables in memory, particularly when several programs are loaded simultaneously Transitioning between different programs in memory necessitates relocating the corresponding vector tables to the appropriate memory regions of those programs.

Figure 2-3 : Example structure of vector table in MCU memory [6, Fig 7.2]

2.4.2 The startup process of the MCU ARM COTEX-M3

The STM32 microcontroller features a unique physical remapping mechanism that enables it to boot from memory locations other than flash This process utilizes two dedicated pins, BOOT0 and BOOT1, whose electrical states determine the boot start address and the source memory.

Table 2-3 : Boot mode table [6, Tab 22.1]

BOOT1 BOOT0 x 0 Main Flash Main Flash is selected as boot space

0 1 System Memory System Memory is selected as boot space

1 1 SRAM SRAM is selected as boot space

Table 2-3 highlights the primary boot mode where the MCU maps flash memory (0x0800_0000) to the address 0x0000_0000 Additionally, it mentions two alternative boot modes: booting from internal SRAM and System Memory, which contains a bootloader present in all STM32 MCUs, though this topic is not explored further in this thesis.

Figure 2-4 : Structure of program in MCU memory [6, Fig 22.2]

Figure 2-4 depicts the operation of a basic program in the MCU When this boot time has passed, the CPU will fetch the Main Stack Pointer (MSP) from address

The processor begins execution from boot memory at address 0x0000_0004, where the Reset_Handler initializes the data section for static global variables and the bss section for uninitialized static global variables Following this initialization, the Reset_Handler calls the main() function, which is executed each time the processor is powered on.

2.4.3 The startup process of the MCU with Bootloader

The Bootloader functions like a standard application, executing only once per operation before relinquishing control to the main firmware This process resembles the startup sequence of the MCU; however, after executing the main() code of the Bootloader, it transfers control back to the main firmware To achieve this, the Bootloader must relocate the vector table to the main firmware address, disable all interrupts and peripherals, and subsequently invoke the reset handler of the main firmware.

Figure 2-5 : Structure of multiple firmware in MCU memory [7, Fig 22.1]

In the firmware architecture illustrated in Figure 2-5, the Bootloader (firmware 1) initializes the MCU at the address 0x0800_0000 After completing its tasks, it disables GPIO, timers, clocks, and interrupts, then relocates the vector table and resets the main stack pointer (MSP) to the main firmware's address at 0x08xx000 This process culminates in invoking the Reset Handler of the main firmware.

Bootloaders vary in size and type, yet the fundamental operation of systems utilizing a bootloader remains consistent The primary components of these systems are illustrated in Figure 2-6 below.

The branching code (green) decides whether the bootloader enters bootloader mode or application mode

The application code (blue) is executed only after the branching code has decided that there is no update requirement and the app code is safe to perform

It is essential that an application can accept commands to enter the bootloader while loading and performing its task When the application receives the requested

 17  update command, it will restart the MCU (orange)

The bootloader code is essential for initializing the system, setting up necessary peripherals like timers and communication interfaces This setup enables the bootloader to interact with external devices and execute flashing commands Upon receiving a reprogramming command, it backs up the main firmware to a designated recovery memory After clearing the main firmware memory, the bootloader receives new firmware through a specified protocol, such as UART, SPI, I2C, or CAN Once the reprogramming process is complete, the bootloader resets and transitions to the main firmware.

UDS STANDARD FOR CAN BUS

The Unified Diagnostic Service (UDS) is a crucial diagnostic communication protocol for electronic control units (ECUs) in automotive electronics, as defined in ISO 14229-3 Its designation as "Unified" signifies its status as an international standard, rather than one limited to a particular company or organization This broad applicability makes UDS essential for ECU development in the automotive industry, facilitating the design of diagnostic tools and enabling effective communication with ECUs for information retrieval, maintenance, and firmware updates.

The UDS standard is crucial for engineers working on ECUs and diagnostic tools in the automotive sector, as it facilitates efficient and secure communication This enhances the accessibility and safety of vehicle maintenance and repair processes.

UDS uses bytes to define services, called Service Identifiers (SID) Tables 2-4 introduce a few UDS codes used in this thesis:

Request SID Response SID Service Description

Used to start operating FOTA sessions

Used to request downloading new software

This service is used for both uploading and downloading

Used to request finished download progress

AUTOSAR

AUTOSAR, which stands for Automotive Open System Architecture, is a collaboration between vehicle manufacturers, suppliers, service providers, and companies from the global automotive, semiconductor, and software industries [9]

AUTOSAR aims to standardize the software architecture of electronic control units (ECUs) in modern vehicles, facilitating the creation of advanced electronic systems that enhance vehicle performance, safety, and security.

We will not discuss AUTOSAR in detail; instead, we will introduce its layers and discuss the RTE layer, which is extremely important in AUTOSAR

The AUTOSAR software architecture in Figure 2-7 consists of 3 primary layers:

The AUTOSAR Basic Software Layer is composed of three key sub-layers: the Microcontroller Abstraction Layer (MCAL), the ECU Abstraction Layer, and the Service Layer MCAL serves as the hardware abstraction layer, implementing interfaces for specific microcontrollers and integrating software layers with peripheral drivers through registers The ECU Abstraction Layer focuses on delivering services tailored for Electronic Control Units (ECUs), facilitating access to all peripherals and supporting essential functions like memory and I/O operations Lastly, the Service Layer plays a crucial role in enabling Basic Software (BSW) to provide services to Application Software (ASW) via Application Programming Interfaces (APIs).

• AUTOSAR Runtime Environment (RTE Layer): The middleware layer between the Basic Software (BSW) and the Application Layer It provides communication services to application software

The application layer is the topmost level of the AUTOSAR architecture, offering the greatest accessibility for users This layer encompasses components that software developers can directly interact with and modify, including indicators.

 20  brakes, exhaust, air conditioning, fuel gauge, tachometer, or touch screen

• Complex Driver: Used for systems that respond quickly, such as airbag systems, emergency braking systems

The Runtime Environment (RTE) serves as a crucial intermediary between the Application and Basic Software within the AUTOSAR architecture It facilitates the operation and communication of various modules via the Virtual Function Bus (VFB) mechanism By providing designated ports for modules, the RTE enables seamless data exchange and interaction among them.

The modules utilize RTE for data reading and writing while managing task scheduling within the ECU For instance, when the user presses the touch screen inside the car, the ECU activates a task that turns on the interior lights.

When the software component reads the car door sensor data and detects that the door is open, it sends a signal to the Runtime Environment (RTE) indicating the door's status The In-Vehicle Infotainment (IVI) system then receives this signal, displaying a message on the screen that the car door is open and activating the interior light The Light module processes the signal from the RTE to turn on the car light Additionally, the light operates based on the switch; it turns on when the switch is activated and turns off when the switch is deactivated.

CAN COMMUNICATIONS PROTOCOL

The CAN bus operates using a two-wire interface made up of a twisted pair, known as CAN High (CANH) and CAN Low (CANL) This system utilizes differential signaling, where the voltage difference between the two wires conveys the transmitted data This method effectively minimizes the effects of electromagnetic interference (EMI) and noise, ensuring reliable communication.

The CAN bus is celebrated for its reliability, real-time performance, scalability, and cost-effectiveness, making it a preferred choice in various sectors Its applications span automotive systems, industrial automation, aerospace, and medical devices, where it facilitates robust and efficient communication between devices.

CAN frames, or CAN messages, are the data transmission units in the Controller Area Network (CAN) protocol A CAN frame consisting of several components is presented in Figure 2-10 [10]:

The ID field, highlighted in green, is a numeric value that signifies the priority and content of a message This identifier plays a crucial role in determining the message's position in arbitration and assists nodes in filtering relevant messages effectively.

• Data Length Code (DLC): The DLC field (yellow) specifies the number of data bytes contained in the message It ranges from 0 to 8, indicating the size of the data payload

• Data Field: The data field (red) carries the actual information being transmitted It can contain up to 8 bytes of data, depending on the DLC value

Control bits, highlighted in cyan, encompass essential flags and control information pertinent to the frame, including the Remote Transmission Request (RTR) flag, which differentiates between data frames and remote frames utilized for data requests.

• Cyclic Redundancy Check (CRC): The CRC field contains a checksum that helps detect errors during transmission It allows the receiving nodes to verify the integrity of the received data

The ACK slot, positioned after the CRC, serves to confirm the successful reception of messages Once a message is transmitted, the receiving nodes send an ACK bit to indicate that the message has been received correctly If an ACK bit is not received, it signifies either an error in transmission or that the receiving node is unresponsive.

CAN frames are sent serially over the CAN bus, enabling all network nodes to receive them Only nodes with corresponding IDs or specific filtering criteria process these messages, while others disregard them This filtering mechanism enhances communication efficiency within the network.

I2C COMMUNICATIONS PROTOCOL

The Inter-Integrated Circuit (I2C) protocol is a popular serial communication method that facilitates communication between multiple devices through a two-wire interface Originally developed by Philips, now known as NXP Semiconductors, I2C is extensively utilized in numerous electronic systems.

I2C is a synchronous, multi-controller / multi-target (or master-slave) serial communication bus Each slave device has its unique address, allowing the master to differentiate slaves from another

It uses only two bidirectional open-drain lines, SDA and SCL, which are pulled high for data communication

• Serial Data (SDA) – Data transfer takes place through this pin

• Serial Clock (SCL) – It carries the clock signal

In I2C, data transfer occurs between a master device and one or more slave

 24  devices connected on the same bus The sequence to transfer data is shown in Figure 2-12 [11]:

• Start Condition: The master begins communicating by sending a start condition

It is a specific sequence in which the SDA line transitions from high to low while the SCL line remains high

The master device communicates with a slave device by sending its address, which can be either a 7-bit or 10-bit value based on the addressing scheme in use The most significant bit of the address byte signifies whether the operation is a read or write.

After the master sends the address, it releases the SDA line and awaits an acknowledgment from the designated slave The slave device that recognizes the address responds by pulling the SDA line low, confirming the receipt of the address.

Data transfer occurs after the slave device acknowledges the master's request The master communicates by sending or receiving data in 8-bit bytes, with each byte accompanied by an acknowledgment bit from the receiver to confirm successful transmission.

To enable multiple read or write operations without relinquishing control of the bus, the master can utilize a repeated start condition This process involves the master sending a new start condition instead of a stop condition to initiate a fresh communication sequence.

• Stop Condition: When the master has finished the data transfer, it sends a stop condition It is a specific sequence where the SDA line transitions from low to

 25  high while the SCL line remains high The stop condition indicates the end of the communication sequence

During data transfer, the SCL line ensures clock synchronization between the master and slave devices The master produces clock pulses, while data is sampled on the SDA line during the clock's high period.

UART COMMUNICATIONS PROTOCOL

UART (Universal Asynchronous Receiver-Transmitter) is a popular communication protocol that facilitates point-to-point serial communication between devices This straightforward protocol is commonly utilized in microcontrollers, embedded systems, and a range of electronic devices.

• Data Format: UART transfers data sequentially, typically using 8 data bits

The system accommodates various data sizes, such as 5, 6, 7, or 9 bits, and features a start bit at the beginning of each data frame, along with one or more stop bits at the end to define the frame boundaries.

The baud rate defines the speed of data transmission in bits per second (bps), and it is essential for both transmitting and receiving devices to be set to the same baud rate to facilitate effective communication.

• Asynchronous Communication: UART is an asynchronous protocol, meaning that the transmitting and receiving devices do not share a common clock signal Instead, the receiver synchronizes with the incoming data by

 26  detecting the start bit and sampling the subsequent bits at the appropriate intervals

UART communication can operate in two modes: simplex and half-duplex In simplex mode, data is transmitted in a single direction, exclusively from the transmitter to the receiver Conversely, half-duplex mode allows for bidirectional data transmission, although not at the same time.

UART lacks inherent error detection and correction features, but it is often supplemented with additional protocols like parity bits to identify and manage transmission errors effectively.

UART communication is typically realized through dedicated hardware components like UART chips or modules These devices manage essential low-level tasks, including timing, buffering, and data framing, which simplifies the software implementation of UART communication.

UART frame format consists of Start Bit, Data Bits, Parity Bit (optional), and Stop Bit(s) as in Figure 2-14:

Figure 2-14 : UART Data Frame [12, Fig 2]

The data transmission begins with a start bit, which is always a logic low (0) This start bit serves as a signal for the receiver, enabling it to synchronize with the incoming data effectively.

• Data Bits: The actual data bits are transmitted following the start bit The

 27  number of data bits can vary but is typically 8 bits However, depending on the configuration, UART can support different data sizes, including 5, 6, 7, or 9 bits

A parity bit is an optional error detection component that can be configured for even or odd parity It ensures that the total number of logic high bits (1s) in the data and parity bits is either even or odd The receiver utilizes the parity bit to identify any transmission errors.

The frame concludes with one or more stop bits, which are always set to a logic high (1) to signify the end of data transmission These stop bits create a short idle period before the commencement of the next frame.

FIREBASE DATABASE

Firebase, a robust application development platform from Google, equips developers with a wide range of tools and services to streamline the process of building, deploying, and managing mobile and web applications By offering essential backend infrastructure, APIs, and ready-to-use services, Firebase enables developers to concentrate on enhancing the front end of their applications.

• Authentication: Provides user authentication and authorization services, supporting various authentication methods such as

 28  email/password, social media logins, and more

• Cloud Firestore: A flexible and scalable NoSQL document database that allows for real-time syncing and offline capabilities

• Cloud Functions: Enables serverless computing, allowing developers to run custom backend code in response to events triggered by Firebase or HTTP requests

• Cloud Storage: Offers secure cloud storage for user-generated content like images, videos, and files

• Analytics: Offers detailed insights into user behavior and app usage, helping developers make data-driven decisions

Cloud Messaging enables the delivery of push notifications and targeted messages to users on various platforms, including iOS, Android, and web applications With its versatility and minimal backend infrastructure requirements, Firebase is a favored choice among developers aiming to create feature-rich applications.

SECURITY WITH AES ALGORITHM

Symmetric and asymmetric encryption algorithms are distinct cryptographic methods with strengths, weaknesses, and use cases

Asymmetric encryption is when the encryption key is published for anyone to use to encrypt messages Only the receiving party can access the decryption key to read the message

Symmetric Encryption utilizes a single key for both encryption and decryption, requiring all parties involved to share the same key for secure communication In our firmware encryption process, we employed the AES Symmetric Algorithm in Cipher Block Chaining (CBC) mode to enhance security.

AES encryption is a type of symmetric block cipher, which is an encryption algorithm created by the National Institute of Standards and Technology (NIST) in

2001 The purpose of this algorithm is to make government data less vulnerable to brute-force attacks [14].

The Advanced Encryption Standard (AES) is a symmetric block cipher that utilizes a single key for both encryption and decryption Unlike traditional symmetric encryption methods, AES encrypts data in smaller blocks rather than the entire message at once This approach, combined with multiple rounds of encryption, significantly enhances the difficulty of decoding the encrypted information.

The Advanced Encryption Standard (AES) algorithm requires a varying number of rounds based on the key size: 10 rounds for a 128-bit key, 12 rounds for a 192-bit key, and 14 rounds for a 256-bit key Each AES round consists of four phases, starting with the Substitution phase, where the algorithm transforms the plaintext into ciphertext using a predefined cipher, as illustrated in Figure 2-17, through the transformation function S(a) = b.

The Shifting step in AES involves translating all rows, except for the first, to the left by a specific number of positions This translation is determined by the formula N-1, where N represents the row order For instance, the fourth row is shifted to the left three times, as calculated by 4-1.

The AES Shift Row step involves mixing columns through the Hill cipher, which utilizes XOR with a C matrix This technique prevents unauthorized decryption by making it difficult for attackers to simply shift the rows back to their original positions.

Figure 2-19 : AES Mixing Step [14] d Add Round Key: The encryption subkey encrypts that data block using

 31  bitwise XOR For each round, a subkey of the same size is derived from the main key using Rijndael's key schedule, as shown in Figure 2-20

Figure 2-20 : AES Add Round Key Step [14]

As key sizes increase, the complexity of breaking encryption rises correspondingly AES encryption is designed to be robust against brute force attacks, a prevalent tactic employed by hackers.

2.11.4 AES Cipher block chaining (CBC) mode

The Cipher Block Chaining (CBC) encryption mode utilizes a single key to encrypt plaintext blocks, combining them with preceding blocks through an XOR operation This method guarantees that identical plaintext blocks are transformed into distinct ciphertext blocks, even when they appear multiple times within the message.

Figure 2-21 : AES Cipher Block Chaining Mode [26]

To implement CBC mode, an initialization vector (IV) is required The IV is a

 32  random value added to the first plaintext block before encryption The IV is shared with the receiver and the encrypted message so they can use it to decrypt it

Decryption is the process of retrieving original encrypted data using a key provided by the sender It follows a procedure similar to encryption but in reverse order To successfully decrypt data, the sender's key is essential The decryption phase involves four key stages: Add Round Key, Inverse Mix Columns, Inverse Shift Rows, and Inverse Sub Bytes, as illustrated in Figure 2-22.

The Diffie-Hellman key exchange process enables the secure transmission of cryptographic keys between parties In this thesis, we assume that this key exchange has been successfully completed, allowing both parties to obtain a shared symmetric key.

SYSTEM DESIGN

SYSTEM REQUIREMENTS

• FOTA function: Execute update MCU process when Cloud has an updated firmware

• Progress monitoring: Have a User Interface that the user can recognize, accept, or reject to update new firmware for the specified MCU

• Application Firmware: Firmware works properly after flashing

To optimize performance, it is crucial that the firmware update process is completed swiftly The duration of the update largely depends on factors such as the firmware size and the available Wi-Fi bandwidth.

• Availability: o User notifications: Provide visual feedback to the user on the progress of the update to indicate which MCU is unavailable in the estimated time

To ensure reliability, the update process must be safe and not disrupt critical functions, incorporating rollback mechanisms for any potential issues Additionally, the system should maintain dependable connectivity for downloading via CAN, UART, and Wi-Fi.

• Scalability: o Both hardware and software can be designed to support many embedded

 34  devices by providing multicast and broadcast capabilities in addition to unicast

To ensure robust security, the system implements secure boot functionality, allowing only valid firmware to initiate; if the firmware is invalid, the MCU will erase it and await an update from the developer Additionally, encryption is utilized for communication between the Gateway and the MCU, safeguarding against potential hacking attempts.

SYSTEM BLOCK DIAGRAM AND SYSTEM FLOWCHART

The system's overall model, illustrated in Figure 3-1, consists of four key components: the Database Server (Firebase), Telecommunication Unit, Gateway, and the target microcontroller units (MCUs), which include the Lighting System and Collision Avoidance System.

• Database Server: We will upload the new update using the Graphic User

Interface (GUI) and store information about the products and the latest update For example, it will contain details such as firmware size and node ID in CAN Bus

• Telecommunication Unit: This unit connects to the server, checks for new firmware, and downloads the firmware if it is connected to Wi-Fi

The Gateway processes updates from the telecommunication unit through UART, gathering essential information like firmware size It encrypts the code prior to transmitting it to the designated ECU.

The target MCUs are essential components connected to the Gateway through CAN Bus, responsible for critical tasks like controlling car lights and signaling potential collisions.

The Telecommunication Unit will first verify the availability of firmware in the database and initiate a download Next, it sends an update request signal to the Gateway, which prompts the user to either accept or decline the update If declined, the FOTA process concludes; if accepted, the firmware is transmitted from the Telecommunication Unit to the Gateway Subsequently, the Gateway forwards the firmware to the MCU in need of the update, which then commences the reprogramming process upon receipt.

HARDWARE DESIGN AND IMPLEMENT

The telecommunication Unit (or Telematics Unit in the Automotive Industry) is the part that helps exchange information on vehicles with the outside world via the Internet

The article discusses a comprehensive suite of IoT vehicle telematics solutions that includes GPS tracking, cloud-based platforms for seamless integration with multiple partners, telematics sensors, and management software It features user-friendly dashboards with visual data representation, automated reporting, customizable notifications and alerts, compliance parameters, and AI integration for timely insights and early warnings.

Vehicle telematics encompasses GPS tracking and the collection of in-vehicle data, which is transmitted to databases for analysis This technology aids in monitoring the health of vehicle components, provides alerts for necessary maintenance, and facilitates software updates for vehicle modules.

In this project, we design a telecommunication unit that can announce firmware updates in the Cloud, download them, and then send them to the Gateway via UART

The hardware design requirements for the Gateway (Figure 3-3) are as follows:

The device features built-in Wi-Fi capabilities, enabling seamless internet connectivity for easy firmware updates This functionality allows devices to remotely detect and download new updates from Firebase, eliminating the need for physical access.

The ESP32 is equipped with ample Flash memory, which is crucial for storing firmware updates This generous memory capacity allows for the seamless accommodation of new firmware versions, facilitating smooth and efficient update processes.

To implement the desired features, the STM32 Blue Pill requires an external Wi-Fi module for Cloud connectivity, as it lacks built-in Wi-Fi support Additionally, it necessitates substantial RAM to accommodate firmware during download and transfer In contrast, the ESP32 offers ample RAM for firmware storage, UART support for Gateway connection, and superior processing speed, making it the preferred choice for our development needs.

Telecommunication Unit Table 3-1 indicates the connection between STM32 and ESP32

Table 3-1 : The connection table Telecommunication Unit

Peripheral Peripheral pin ESP32 pin Label Name STM32

The FOTA system plays a crucial role by encoding software updates, directing them to the appropriate ECU, and confirming the successful completion of the update to notify the server.

Gateway will notify users of new updates through a graphical interface, allowing them to accept or reject the update request If the user declines the update, the server will discard it; however, if the user agrees, the updated firmware will be downloaded and processed accordingly.

The hardware design requirements for the Gateway Unit (Figure 3-4) are as follows:

• Communication with the Telecommunication Unit via UART for receiving

• Create a user interface to get responses from users who accept updates and display the update process

• Communication with Target MCU via CAN Bus for transmitting updated firmware

To achieve these features listed above, we decided to use four main components:

4 Can Transceiver SN65HVD a) STM32F103C8T6 Micro-controller

Why did we choose STM32F103C8T6 as the Gateway core?

Table 3-2 : Comparison table between STM32f103x and stm32f104x [24]

Clock Freq 72MHz 84MHz 100MHz

Based on Table 3-2 and Table 2-1 in Chapter 2, The STM32F103C8T6 features

ADC, timers, standard and advanced communication interfaces such as UART, I2C, and CAN, which are needed for communication with another module in the system

The STM32F4x series offers enhanced speed, increased RAM, larger flash size, and additional peripheral ports, making it more expensive than the STM32F103C8T6; however, the STM32F103C8T6 sufficiently meets the project's peripheral requirements Additionally, its extensive community support facilitates troubleshooting and bug fixes, which is why the project team has chosen the STM32F103C8T6 as the Gateway.

A button (Figure 3-5) is a switch that controls a process Its surface is flat or shaped and easily pressed or released

It is the user's way to interact with the gateway to accept or reject the update

Current / Voltage 50 mA @ 12 V dc Operating Temperature -35 → +85°C

Signal output Digital c) Oled-SSD1306

The SSD1306 is an integrated circuit designed for controlling a dot-matrix graphic display system that utilizes organic or polymer light-emitting diodes Featuring 128 segments and 64 commands, it is specifically engineered for a joint cathode-type configuration.

Operating Voltage 1.65V to 3.3V Operating Temperature -40°C to 85°C

Features of Oled-SSD1306 displays:

• Deliver sharp images and content

• Stable and quicker response times

• Support variable of MCU d) Can Transceiver SN65HVD230

Tzo transmit and receive CAN messages with an STM32, a component that can convert the signal into Can High and Can Low is necessary

The SN65HVD230 CAN Board features an integrated SN65HVD230 CAN transceiver, operating at 3.3V with ESD protection and signal speeds of up to 1Mbps This makes it an ideal accessory for connecting microcontrollers to a CAN network.

Figure 3-7 : SN65HVD230 CAN Board [17]

Table 3-5 : SN65HVD230 CAN Board specifications

Signaling Rates Up to 1 Mbps e) The connection table

Tables 3-6 indicates the connection of the pins in Gateway

Table 3-6 : The connection table of Gateway

Peripheral Peripheral pin STM32 pin Label Name Button

CAN_RX PA11 CAN_RX

CAN_TX PA12 CAN_TX

ESP32 TX0 PA10 USART1_RX

The implementation of MCU1 as a test case for FOTA highlights the critical role of car lighting systems in automotive technology, especially regarding road safety A sudden failure of headlights at night while driving at high speeds could lead to disastrous consequences Various techniques, including automatic changeover circuits and thermal circuit breakers, have been developed to address these safety concerns.

However, in this project, we focus on the FOTA feature, so we decided to design a basic lighting system, with three LEDs: a headlight, a backlight, a brake light, a button, and a switch

The hardware design requirements for the Lighting System (Figure 3-8) are as follows:

• Communication with Gateway Unit via CAN Bus for receiving updated firmware

• Connect to 3 LEDs to simulate headlight, backlight, and brake light

• Connect the switch to control the headlight and backlight

• Connect the button to simulate the brake

To achieve these features listed above, we decided to use five main components:

For any of the components that we introduce above, we will not mention it again to avoid duplication a) DIP Switch

DIP switches are manual electrical switches housed in a standard dual inline package, often used on printed circuit boards and electronic components They can refer to individual switches or the entire assembly, allowing for customization of electronic device operations in specific applications.

DIP switches are utilized in certain remote controls to prevent interference, particularly in applications like retrofitting ceiling fans with lighting fixtures into a single-circuit junction box By assigning unique frequencies or radio addresses to each transmitter/receiver pair, DIP switches enable the installation of multiple devices without the risk of them inadvertently controlling one another.

In this project, we use the DIP Switch to control the LED and turn on/off headlight and backlight

Table 3-7 indicates the specifications of the DIP

Contact Resistance 500 mOhm max Operating Temperature -25C~+85C Mechanical Life >= 100,000 Cycles Electrical Life 2,000 Cycles per Position b) LED 5mm

LEDs are two-wire semiconductor light sources that emit light when a suitable voltage is applied, allowing electrons to recombine with holes and release energy as photons, a process known as electroluminescence The color of the emitted light is determined by the energy band gap of the semiconductor material used.

Operating Voltage 1.8V to 2V Operating Current 10 to 20mA Operating Temperature -30℃ to +85℃

Table 3-8 outlines the specifications for LEDs, highlighting that the required operating voltage varies based on the LED color To connect an LED directly to a power source, it's essential to provide the appropriate forward voltage If the voltage exceeds this value, a resistor should be used in series with the LED to ensure proper functionality.

 46  of the resistor R, use the Formula 3.1:

• VS is the supply voltage

• VLED is the forward voltage of Led

• X represents the number of Leds connected in series

• ILED is LED current According to the formula above, we used 120 Ohm with Yellow Led as a car lighting bulb c) The connection table

Tables 3-9 indicates the connection of the pins in Lighting System

Table 3-9 : The connection table of Lighting System

Peripheral Peripheral pin STM32 pin Label Name

CAN_RX PA11 CAN_RX

CAN_TX PA12 CAN_TX

3.3.4 Collision Avoidance System Hardware Design

SOFTWARE DESIGN AND IMPLEMENT

The telecommunication unit is responsible for detecting new updates, sending requests to Gateway, downloading, and sending the new update to Gateway

The Telecommunication Unit continuously monitors for new updates as illustrated in Figure 3-15 Upon detecting an update on Firebase, it downloads the update via Wi-Fi and transmits the file header, including file size and Node ID, to the Gateway Unit along with an update request If the Gateway Unit rejects the update, the process is canceled, and the Telecommunication Unit resumes its search for new updates Conversely, if the Gateway accepts the update, the Telecommunication Unit proceeds to send the new update to the Gateway through UART.

Telecommunication Unit will go back to detect the new update loop

Figure 3-16 : Telecommunication Unit State Machine

The state machine of the Telecommunication Unit system, as illustrated in Figure 3-16, features a static variable that maintains its assigned values during operation This system operates across six distinct states.

• WAIT_NEW_UPDATE: Detect when the new update is uploaded

• NEW_UPDATE_DOWNLOAD: Download the update from Firebase

• SEND_HEADER: Send updated file information to Gateway (File size, Node ID)

• REQUEST_NEW_UPDATE: Send a new update request to Gateway and wait for Gateway's response

• NEW_UPDATE_DENIED: The Gateway denies the new update The telecommunication unit will update the real-time database

• SEND_CODE: The Gateway accepts the new update Firmware is sent to the Gateway and, when it is done, updated in the real-time database

We leverage Firebase for efficient management and distribution of firmware updates, ensuring users receive real-time updates for their devices This platform not only guarantees timely delivery of the latest firmware but also features robust scalability and security, enabling the effective handling of numerous updates securely.

In Figure 3-17, we will capture essential details for firmware updates, including the file size, node ID for the update, and a "New_update" flag to alert the telecommunication unit about the new server update Additionally, a link to the new firmware files stored in Firebase Storage will be provided (see Figure 3-18).

A GUI can provide a central location to manage updates for all projects Developers can easily see available updates, compare versions, and initiate updates

The developer can upload the update file by selecting the appropriate MCU for the update and pressing the upload button, which will automatically transfer the file to the Firebase server while updating the Node ID and NewUpdate flag.

The Gateway serves as a crucial link between the telecommunications unit and multiple target MCUs, particularly in complex systems like automobiles It utilizes the UART protocol to receive code from the telecommunications unit and subsequently transmits this code to the target MCU through the CAN bus.

Gateway has the following main tasks:

• Stores information about connected MCUs This information includes the MCU ID, a software version of every MCU, and any critical data regarding the connected MCUs

• Calculate CRC to handle errors if firmware sends incorrectly

• Determine which MCU this firmware is for and make sure the firmware is sent to the correct MCU As stated, the port has

 55  information about all MCUs, including MCU IDs, to determine which MCUs the update targets

• Notify the node when the update is complete so the node can notify the same goes for the server when the code update is complete

• Encrypt data firmware before sending it to MCU

The gateway, as illustrated in Figure 3-20, operates in an infinite loop, executing a module based on the system state, which is initially set to IDLE This state persists until an interrupt signal is received from the Telecommunication Unit, at which point the system transitions to the FOTA process.

 56  the details of each module below

As we discussed in Chapter 2 about RTE, we’re now going to implement that mechanism in the Gateway, as shown in Figure 3-21

RTE facilitates communication and information exchange among system modules while managing their operational sequence In this project, we establish multiple ports for reading and writing variables and buffers, enabling modules to access each other's data efficiently The specifics of this process will be detailed in the following sections.

• Global_CodeSizeValue: contains firmware size

• Global_NodeId: Contains the ID of the MCU

• Global_HeaderAckFlag: “1” if the header has been received, “0” if not

• Global_BufferPtr: contains the pointer of the Encrypt buffer

• Global_BufferFlag: “0” if Encrypt buffer was transmitted, “1” if not

• Global_UserResponse: “1” if the user accepts, “0” if the user rejects

• Global_UpdateProgress: Contains percent of process value

The gateway system's state machine, illustrated in Figure 3-22, features a static variable for the system state that maintains its assigned values during operation This system operates across six distinct states.

• SYS_IDLE: When there are no active modules other than the UI

• SYS_NEW_UPDATE: Let the UI get feedback from users

• SYS_REC_UPDATE: When we need the Receive module to work

• SYS_ENCRYPT: When we need the Encrypt module to work

• SYS_SEND_UPDATE: When we need the Transmit module to work

• SYS_DONE_UPDATE: Re-initialize modules

We also design a data transmission sequence that waits for a response before sending the next data, ensuring that the data is received correctly and sufficiently

The communication sequence of the Gateway is shown in Figure 3-23:

1 First, the Telecommunication Unit downloads firmware from Firebase, then sends an interrupt UART signal (0x01) to start the FOTA process

2 Gateway requests send header (0x07) have information about nodeID which MCU receives this update, size of firmware…

3 After receiving the header, Gateway will wait for the user to respond whether to accept or reject this update If rejected, Gateway sends the reject code and

 59  finishes the process If accepted, Gateway sends a request package of firmware (0x0C) and sends ACK (0x0A) if it receives the packet until it receives all firmware, then ends the UART protocol (0x0D)

4 Next, Gateway will send a UDS request (0x10) to reprogram the MCU process

5 After the MCU accepts the process by sending an ACK (0x40), the Gateway sends a header including the size of firmware and CRC code and, in turn, sends data through to the MCU, only transferring the next packet if it receives an ACK code from the MCU (0x75)

6 Upon receiving the final packet, the MCU returns the ACK finish code (0x76) and finishes the FOTA process (0x77)

Based on the Flow Chart Figure 3-24 below, the receiver module has the following internal state operation:

• RX_IDLE: The module waits for a signal to start the process of receiving firmware data If there is a signal, switch the status to RECEIVE HEADER

The RX_RECEIVE HEADER function is responsible for receiving and verifying the firmware data header, which includes essential information such as code size and node ID After completing this verification process, it transitions back to the IDLE state, awaiting a response signal from the User Interface.

• RX_ACCEPT: Receives acceptance from the User Interface, the module transitions to RX_RECEIVE_DATA state

• RX_REJECT: Returns to the IDLE state.

In the RX_RECEIVE_PACKET state, the module actively receives and stores firmware data from the source while simultaneously verifying for errors to maintain data integrity.

• RX_END: The module transitions to the END state when the firmware data

 60  reception process is complete It signals that the process has finished and returned to the IDLE state

In progress, it also calculates the percentage of progress for the UI to show up on the screen via the following Formula 3.1:

This module follows a defined process to enhance system security by saving 16 bytes of firmware to a buffer and encrypting it using the AES-CBC-128 standard It then transitions the system state to SYS_SEND_UPDATE for the transfer of the encrypted buffer The module monitors the BufferFlag in RTE; if the data is not yet transferred, it sets the flag to "1" to avoid overwriting the buffer After successful data transfer, the flag is reset to "0," allowing the process to proceed.

Figure 3-26, the Transmit module has the following internal state operation:

• TX_IDLE: The module is in its default state, waiting for the Header flag to start the transmission process

When the activation signal is received from the TX_IDLE state, the module enters the TX_TRANSMIT HEADER state, where it gets ready to send the data header.

• TX_TRANSMIT DATA: The module moves to the TX_TRANSMIT DATA state after successfully transmitting the header In this state, it sends

 63  the encrypted data buffer from the Encrypt module to the MCU

The TX_END module indicates the completion of data transmission by transitioning to the TX_END state, signaling that the transmission process has concluded and the system has reverted to the TX_IDLE state.

Figure 3-27 : User Interface Module Flowchart

Based on flowchart Figure 3-27, The User Interface module has the following internal state operation:

• UI_IDLE: Display default idle screen

RESULTS AND EVALUATIONS

REQUIREMENTS OF RESULT

Upon completing the system, both the software and hardware of the FOTA system have been meticulously verified to ensure compliance with the requirements outlined in the FOTA process flowchart from Chapter 3, as illustrated in Figure 4-1.

• The telecommunication unit must be able to detect if new firmware has been uploaded to Firebase

• The gateway should display which MCU the firmware is for and how long the update will take

• FOTA performance should be fast or close to the expected time displayed to the user

• MCU functions should work properly without any issues

• If an update error or firmware is invalid, the MCU must automatically roll back to the previous firmware

GATEWAY UI SEQUENCE

Our system relies on OLED to communicate update notifications effectively and provide real-time FOTA progress updates

While idle, the Gateway awaits notification from the Telecommunication Unit The oled screen displays an idle state, as Figure 4-2

When the Telecommunication Unit triggers a UART interrupt to signal a new update, the gateway promptly alerts the user, who has the option to accept or decline the update, as illustrated in Figure 4-3.

When a software update becomes available, users are prompted to either accept or reject it Accepting the update initiates the download of the new code, with progress indicated on the OLED display, as shown in Figure 4-4 Conversely, if the update is rejected, the gateway will halt any installation processes and remain inactive.

After the download, the update will be encrypted and forwarded to the target ECU for installation, as shown in Figures 4-5

After the installation process is finished, the gateway will inform the user that the update has been successfully installed Following this notification, the gateway will revert to its idle state.

COMMUNICATION SEQUENCE

Our microcontroller units (MCUs) utilize advanced protocols for the efficient transmission and reception of data packets, preventing overload on transmitters and receivers We employ HyperTerminal and Arduino IDE for monitoring UART transmissions, while the Linux terminal is used to observe CAN Bus communications.

When new firmware is detected, the Telecommunications Unit sends a "Header Send Request" signal to the Gateway, confirming the firmware's readiness for update Upon receiving this request, the Telecommunications Unit begins the transfer process by transmitting a 5-byte Header, which includes vital information about the firmware The first four bytes indicate the firmware size, while the last byte specifies the MCU ID, both of which are crucial for the Gateway to accurately receive and process the firmware update.

Figure 4-8 : UART Send Data Packet

The firmware file transfer from the Telecommunications Unit to the Gateway is depicted in Figures 4-8 and 4-9, involving the transmission of 1024-byte packets The process begins when the Gateway signals its readiness to receive the next packet, prompting the Telecommunications Unit to send it Upon receipt of each packet, the Gateway confirms successful processing by sending an ACK "Packet Received" signal This cycle continues until the last packet is received by the Gateway.

Figure 4-9 : UART Finish Transfer Process

When the Gateway receives the final packet of a firmware update, it should respond with "Last Packet Received" to confirm all packets have been received This response is crucial for successfully completing the update process After processing the last packet, an ACK "Finish" message must be sent to indicate the conclusion of the firmware receiving process, enabling the device to move on to the next stage of the update.

Figures 4-10 and 4-11 demonstrate the data transfer process from the Gateway to the MCU Upon completing UART data transmission, the Gateway transmits a CAN signal known as "Diagnostic Session Control," encoded as 0x10, onto the CAN bus Each MCU is assigned a distinct CAN ID by the Gateway; for example, the Collision System MCU receives data with an ID of 0x50, while the Lighting System is assigned an ID of 0x60 This unique identification ensures that only the intended MCU responds to the FOTA request, allowing other MCUs to disregard irrelevant CAN bus signals For instance, the Gateway with ID 0x50 specifically communicates with the Collision System MCU designated by the same ID.

101) If ID is 102, it is Lighting System

Once the MCU (0x50) sends an acceptance signal, the Gateway will transmit a

"Request Download" signal with code 0x34 If the response is 0x73, a header containing the firmware size (4 bytes) and a CRC code (4 bytes) is sent to the MCU to check for errors

Upon receiving an ACK of 0x74, data transmissions commence, utilizing the AES_CBC_128 encoding standard and sending data in 8-byte chunks Following each transmission, the Gateway issues a "Transfer Data" signal with the code 0x36 Once the MCU acknowledges this with a response of 0x75, the Gateway transmits the next 8 bytes of data and awaits an ACK of 0x76 This cycle persists until the final 8 bytes of firmware are successfully transmitted.

After the firmware transfer to the MCU is complete, the gateway sends a "Request Transfer Exit" signal (0x37) to indicate the end of the transmission The FOTA process concludes when the MCU acknowledges with an ACK (0x77), as shown in Figure 4-11 Subsequently, the MCU will restart and initiate the update process.

TEST CASE

Test case with Wi-Fi speed of 10 kBps, UART speed of 11,520 kbps, and CAN Bus speed of 500 kbps We use STM32 STLINK Utility, the software provided by

The ST series of microcontrollers enables users to view and modify internal memory directly, facilitating the examination of STM32 Flash memory and the analysis of bootloader behavior in various scenarios.

We create the test case summary Table 4-1:

Table 4-1 : Test case summary table

Test Case Name Test Case Type Description Expected Result

Lighting System test case Functionality and Performance

Perform the FOTA process for the Lighting System

Perform the FOTA process for Collision Avoidance System

Modify the firmware to observe the bootloader behavior

Backup firmware will be used for MCU to work properly

Disconnect the power or reset the MCU when perform FOTA process

Main and backup firmware were broken

Both firmware are broken, observe the bootloader behavior

The MCU will stay in bootloader, ensuring only valid firmware works

The firmware of Lighting System has:

• Size: 0x2598 bytes (9,624 bytes in decimal)

• CRC code: 0x1671CADA (to check firmware validation)

• Feature: Blink LED 1 when pressing the button and open LED 2 and 3 when opening the switch

Figure 4-12 : Lighting System Estimate Update Time

The Lighting System, as depicted in Figure 4-13, completes its installation in just 15 seconds following the FOTA process This estimate considers the worst-case scenario of low Wi-Fi speeds and maximum delays during firmware transfer to the MCU, resulting in a faster installation time than anticipated.

Figure 4-14 : Active Flag in Lighting System

To verify the code size and CRC values in the Flash memory's Flag area, access Address 0x0801FC10, specifically offset 8 for the code size and offset C for the CRC values, ensuring they align with the calculated results Additionally, the memory area at 0x0801_FC14 reflects the current operating state of the firmware, confirming its integrity and functionality.

0xFFFF_FFF1 is the one that works properly

4.4.2 Collision Avoidance System Test Case

The firmware of Collision Avoidance System has:

• Size: 0x35f4 bytes (13,812 bytes in decimal)

• Feature: If the MCU detects a distance from the obstacle < 4cm, open the LED and active buzzer

Figure 4-15 : Collision Avoidance System Estimate Update Time

The Collision System, as depicted in Figure 4-16, undergoes a swift FOTA (Firmware Over-The-Air) process After initiating the FOTA and choosing the new firmware for the MCU, the installation is completed in just 20 seconds once the process is initiated.

 84  the "Accept" button This is a relatively shorter time than the expected duration of

The FOTA process takes just 33 seconds, allowing for a swift and efficient firmware installation This rapid installation minimizes downtime, ensuring that the MCU is promptly updated with the latest firmware and remains operational without interruptions.

Figure 4-17 : Active Flag in Collision Avoidance System

When checking the Flash memory in the Flag area, the code size and CRC values align with the calculated figures The memory address 0x0801_FC14 indicates the current operating state of the firmware, while the firmware value 0xFFFF_FFF1 signifies proper functionality.

4.4.3 Update Fail Handle Test Case

This test case is divided into three cases: Firmware invalid, FOTA process interruption, both main and backup firmware are corrupted

In this experiment, we modify specific bytes in the firmware to observe the bootloader's response during its validity check Specifically, we alter 2 bytes at the address 0x0800_5000, changing their value from 5000 to 5432.

Figure 4-19 : Flag region in case MCU’s firmware was manipulated

In the Flag area, the bootloader computes the CRC code of the entire firmware and compares it to the correct CRC in the Active area, starting at 0x0801_FC10 If a discrepancy is detected, indicating that the firmware has changed, the bootloader refrains from booting that firmware and sets the flag to 0xFFFF_FFF4 Subsequently, it verifies the Backup area, beginning at 0x0801_FC30 If the Backup is found to be functional, the bootloader copies the Backup firmware to the Active area and proceeds with normal operation.

Figure 4-20 : Flag region in case FOTA process interruption

If the FOTA process is interrupted by power failure, interference, or physical impact, the MCU may experience firmware corruption For instance, in Figure 4-20, an MCU with a firmware size of 0x2756 bytes and a CRC code of 0xE326C2AB is affected when the reset button is pressed during firmware data transfer Upon bootloader execution, it detects corruption in the Active area due to incomplete firmware transfer The system then checks the Backup area and, if the Backup firmware is valid, it restores the Active area to ensure functionality.

4.4.3.3 Main Firmware and Backup Firmware are corrupted

Figure 4-21 : Flag region in case both firmware are invalid

In the event that both the Active and Backup firmware areas become corrupted, the bootloader will detect invalid firmware through CRC calculations and will not initiate any firmware boot Instead, it will remain in the bootloader mode by setting the Bootloader flag to 0x0000_0000 This ensures that the MCU stays in the bootloader until the firmware is fully updated, promoting safe booting However, in the current implementation, the MCU will remain in this state indefinitely unless manually addressed, as the bootloader feature to resolve this issue has not yet been developed but is planned for future enhancements.

TEST CASE EVALUATIONS

After successfully implementing the FOTA process for 2 MCUs, Lighting System and Collision System, with the same Wi-Fi speed, UART transfer speed, speed on CAN bus

We have made a comparison and evaluation of Table 4-2:

Table 4-2 : FOTA Process Evaluation Table

Lighting System Collision System Code size 9,624 bytes 13,812 bytes

Code CRC 0x1671CADA 0xE326C2AB

The FOTA procedure was conducted three times for both MCUs, revealing that the update speeds were 15 seconds for the MCU Lighting and 21 seconds for the MCU Collision Avoidance This indicates that the FOTA process speed is influenced by firmware size; larger firmware results in slower updates due to increased data download requirements Additionally, the speed of Wi-Fi, UART, and CAN interfaces also plays a critical role in the overall FOTA process speed Therefore, it is crucial to consider these factors during the design of the FOTA process to achieve optimal performance.

CONCLUSION

CONCLUSION

The research thesis successfully met its objectives by implementing the FOTA model on two test case MCUs, demonstrating the system's feasibility FOTA technology plays a crucial role in the development and integration of embedded system solutions Throughout the dissertation process, we acquired significant knowledge and achieved several important milestones.

• Read the user manual and datasheet of MCU

• The bootloader design supports the CAN protocol, which supports rollback if an error occurs

• Learn about AUTOSAR and implement the RTE layer into the Gateway

• Implement security between the Gateway and the MCU using the AES_CBC_128 algorithm

• Connect to Firebase via Wifi

• Use Git to manage the version of all source code

However, due to time constraints, the system may be designed to be unstable, not optimal, and still has many limitations:

• The connection to Firebase is unstable

• Because the OLED screen is too small and cannot display information about firmware changes updated with the current firmware

• There is no security method between the Firebase and the Telecommunication Unit

• It is not possible to detect multiple firmware for multiple MCUs at the same time

• Users cannot actively roll back the MCU to the previous version because no

• UART is not anti-interference

• No measures have been taken against channel interference

• PCB circuits have not been aesthetically pleasing.

PROJECT IMPROVEMENT

Upon achieving financial objectives and meeting targeted milestones, the project outlines future directions and developmental steps aimed at establishing a comprehensive system that addresses all facets of practical implementation.

• Develop additional firmware version control functionality on the Gateway so users know the current firmware version, allowing owners to choose which updates to install

• Shows the difference between the current version and the version to be updated

• Allows users to restore to an earlier version of any MCU when necessary

• Implement firmware security when posted to the database, using more robust encryption and authentication methods to protect vehicle data

• Integrating the FOTA system with other systems is considered limited such as navigation systems and entertainment systems

• Provides new, limited services to vehicle owners such as remote vehicle retrieval and technical support

• The optimization feature is used when updating, improving update speed, and reducing estimation time errors

• Sensors need to improve accuracy

• Create an application for the user's mobile device to notify the user about updates, allowing remote updates through the app.

3 Source Code: https://github.com/DatChauThanh/FoTA.git

[1] STMicroelectronics, "Datasheet stm32f103x," DS5319 Datasheet,

[2] Espressif Systems "ESP32 Series Datasheet," ESP32 Datasheet, Feb

Project Handbook," Thesis, Mansoura University, Egypt, 2021

[4] NXP editor, "Firmware Over-the-Air (FOTA),"[Online] Available: https://www.nxp.com [Accessed 10 March 2024]

[5] Vaibhav, "Understanding FOTA in the Times of ‘Connected Cars’," embitel.com, 10 July 2018 [Online]

Available:https://www.embitel.com [Accessed 29 March 2024]

[6] N Carmine, "Interrupts Management" and "Booting Process," in

Mastering STM32, Second Edition, Italy, leanpub, 2022, pp 144-

[7] J Beningo, "Bootloader Design for MCUs in Embedded Systems,"

26 June 2015 [Online] Available: https://www.beningo.com [Accessed 01 April 2024]

[8] Wikipedia, "Unified Diagnostic Services," [Online] Available: https://en.wikipedia.org/wiki/Unified_Diagnostic_Services [Accessed 1 April 2024]

[9] AUTOSAR, "AUTOSAR Introduction," [Online] Available: https://www.autosar.org [Accessed 5 April 2024]

[10] Wikipedia, "CAN Bus," [Online] Available: https://en.wikipedia.org/wiki/CAN_bus [Accessed 5 April 2024].

[11] S Afzal, "I2C Primer: What is I2C?," Analog Devices, 2 Sep 2016

[Online] Available: https://www.analog.com [Accessed 6 April 2024].

[12] Rohde-Schwarz, "Understanding UART," [Online] Available: www.rohde-schwarz.com [Accessed 6 April 2024]

[13] GeeksForGeeks, "Firebase – Introduction," 15 July 2021 [Online]

Available: https://www.geeksforgeeks.org/firebase-introduction/ [Accessed 6 April 2024]

[14] Wikipedia, "Advanced Encryption Standard," [Online] Available: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard [Accessed 18 April 2024]

[15] HEAVY AI Editor, "Vehicle Telematics Definition," HEAVY AI,

[Online] Available: https://www.heavy.ai [Accessed 7 April 2024]

[16] Solomon Systech, "SSD1306 Advance Information," SSD1306

[17] Texas Instruments, "3.3v CAN Transceivers," SLOS346G

[18] A J Bhosale, Class Lecture, Topic: "Automotive Accessories &

Lighting Systems", Unit3, Dept of Automobile Engineering,

Government College of Engineering and Research, Maharastra, India [Online] Available: https://www.gcoeara.ac.in [Accessed 9 April 2024]

[19] Wikipedia , "DIP switch", 14 November 2023 [Online] Available: https://en.wikipedia.org/wiki/DIP_switch [Accessed 10 April

[20] Components101, "5mm Round LED," 29 July 2018 [Online]

Available: https://components101.com/diodes/5mm-round-led [Accessed 10 April 2024]

[21] Wikipedia, "Collision avoidance system," [Online] Available: https://en.wikipedia.org/wiki/Collision_avoidance_system [Accessed 10 April 2024]

[22] Microcontrollerslab, "HC-SR04 Ultrasonic Sensor with STM32

Blue Pill", [Online] Available: https://microcontrollerslab.com [Accessed 11 April 2024]

[23] STMicroelectronics, "Reference manual," RM0008 Manual, Sep

[24] Researchgate editors, “The AUTOSAR layered architecture”,

[Online] Available: The AUTOSAR layered architecture,[Accessed

[25] Wikipedia editors, “Symmetric-key algorithm”, Wikipedia.com

[Online] Available: Symmetric-key algorithm, [Accessed 15 April 2024]

[26] Wikipedia editors, “Block cipher mode of operation”,

Wikipedia.com [Online] Available: Block cipher mode of operation, [Accessed 15 April 2024]

[27] Xilinx editors, “AES Decryption Algorithms”,xilinx.github.io,

[Online] Available: AES Decryption Algorithms, [Accessed 15 April 2024]

[28] “STM32F411 Black Pill Development Board”, [Online]

Available: STM32F411 Black Pill, [Accessed 15 April 2024]

[29] Smishad Thomas, “Automotive ECU: An Inevitable Part of the

Automobiles,” January 30, 2020 [Online], Available: https://www.einfochips.com/blog/automotive-ecu-an-inevitable- part-of-the-automobiles/ [Accessed: 7 June 2024].

Ngày đăng: 19/12/2024, 15:07

Nguồn tham khảo

Tài liệu tham khảo Loại Chi tiết
[1] STMicroelectronics, "Datasheet stm32f103x," DS5319 Datasheet, July 2007 [Revised Sept. 2023] Sách, tạp chí
Tiêu đề: Datasheet stm32f103x
[2] Espressif Systems "ESP32 Series Datasheet," ESP32 Datasheet, Feb 2007 [Revised Sept. 2023] Sách, tạp chí
Tiêu đề: ESP32 Series Datasheet
[3] A. M. Abdelhady, M. H. Mohamed. A. M. Abdelhady, "FOTA Project Handbook," Thesis, Mansoura University, Egypt, 2021 Sách, tạp chí
Tiêu đề: FOTA Project Handbook
[4] NXP editor, "Firmware Over-the-Air (FOTA)," [Online]. Available: https://www.nxp.com [Accessed 10 March 2024] Sách, tạp chí
Tiêu đề: Firmware Over-the-Air (FOTA)
[5] Vaibhav, "Understanding FOTA in the Times of ‘Connected Cars’," embitel.com, 10 July 2018. [Online].Available: https://www.embitel.com [Accessed 29 March 2024] Sách, tạp chí
Tiêu đề: Understanding FOTA in the Times of ‘Connected Cars’
[6] N. Carmine, "Interrupts Management" and "Booting Process," in Mastering STM32, Second Edition, Italy, leanpub, 2022, pp. 144- 147, 558-562 Sách, tạp chí
Tiêu đề: Interrupts Management" and "Booting Process
[7] J. Beningo, "Bootloader Design for MCUs in Embedded Systems," 26 June 2015. [Online]. Available: https://www.beningo.com.[Accessed 01 April 2024] Sách, tạp chí
Tiêu đề: Bootloader Design for MCUs in Embedded Systems
[8] Wikipedia, "Unified Diagnostic Services," [Online]. Available: https://en.wikipedia.org/wiki/Unified_Diagnostic_Services [Accessed 1 April 2024] Sách, tạp chí
Tiêu đề: Unified Diagnostic Services
[9] AUTOSAR, "AUTOSAR Introduction," [Online]. Available:https://www.autosar.org. [Accessed 5 April 2024] Sách, tạp chí
Tiêu đề: AUTOSAR Introduction
[10] Wikipedia, "CAN Bus," [Online]. Available:https://en.wikipedia.org/wiki/CAN_bus [Accessed 5 April 2024] Sách, tạp chí
Tiêu đề: CAN Bus
[11] S. Afzal, "I2C Primer: What is I2C?," Analog Devices, 2 Sep 2016. [Online]. Available: https://www.analog.com [Accessed 6 April 2024] Sách, tạp chí
Tiêu đề: I2C Primer: What is I2C
[12] Rohde-Schwarz, "Understanding UART," [Online]. Available: www.rohde-schwarz.com [Accessed 6 April 2024] Sách, tạp chí
Tiêu đề: Understanding UART
[13] GeeksForGeeks, "Firebase – Introduction," 15 July 2021. [Online]. Available: https://www.geeksforgeeks.org/firebase-introduction/[Accessed 6 April 2024] Sách, tạp chí
Tiêu đề: Firebase – Introduction
[14] Wikipedia, "Advanced Encryption Standard," [Online]. Available: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard.[Accessed 18 April 2024] Sách, tạp chí
Tiêu đề: Advanced Encryption Standard
[15] HEAVY AI Editor, "Vehicle Telematics Definition," HEAVY AI, [Online]. Available: https://www.heavy.ai. [Accessed 7 April 2024] Sách, tạp chí
Tiêu đề: Vehicle Telematics Definition
[16] Solomon Systech, "SSD1306 Advance Information," SSD1306 Datasheet, March 2001 [Revised Aug. 2010] Sách, tạp chí
Tiêu đề: SSD1306 Advance Information
[17] Texas Instruments, "3.3v CAN Transceivers," SLOS346G Datasheet 2001, Oct 2007 [Revised June. 2002] Sách, tạp chí
Tiêu đề: 3.3v CAN Transceivers
[18] A J Bhosale, Class Lecture, Topic: "Automotive Accessories &amp; Lighting Systems", Unit3, Dept. of Automobile Engineering ,Government College of Engineering and Research, Maharastra, India [Online]. Available: https://www.gcoeara.ac.in. [Accessed 9 April 2024] Sách, tạp chí
Tiêu đề: Automotive Accessories & Lighting Systems
[19] Wikipedia , "DIP switch", 14 November 2023 . [Online]. Available: https://en.wikipedia.org/wiki/DIP_switch. [Accessed 10 April 2024] Sách, tạp chí
Tiêu đề: DIP switch
[20] Components101, "5mm Round LED," 29 July 2018 . [Online]. Available: https://components101.com/diodes/5mm-round-led.[Accessed 10 April 2024] Sách, tạp chí
Tiêu đề: 5mm Round LED

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w