Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2026:theodor_ioan.buliga:catalin.manole1211 [2026/05/27 02:44]
catalin.manole1211
pm:prj2026:theodor_ioan.buliga:catalin.manole1211 [2026/05/27 04:29] (current)
catalin.manole1211
Line 3: Line 3:
 ===== Introduction ===== ===== Introduction =====
  
-The **Secure Communication Terminal** project is a fully digital, ​hardware-secured wireless communication device. Unlike a classic radio station, the device allows real-time voice capture, P2P transmission,​ and playback only if the user passes a **biometric authentication** filter. The system integrates a permission-based access hierarchy (Admin vs. User) and is controlled by an ESP32 microcontroller.+The **Secure Communication Terminal** project is a digital, secured wireless communication device. Unlike a classic radio station, the device allows real-time voice capture, P2P transmission,​ and playback only if the user passes a **biometric authentication** filter. The system integrates a permission-based access hierarchy (Admin vs. User) and is controlled by an ESP32 microcontroller.
  
 **What is its purpose:** **What is its purpose:**
Line 29: Line 29:
 If the device is unlocked (a user is logged in), the incoming audio is actively played through the speaker. Once authenticated,​ the user can receive and transmit freely for a **2-minute session** before the system automatically times out, locks itself, and requires re-authentication. If the device is unlocked (a user is logged in), the incoming audio is actively played through the speaker. Once authenticated,​ the user can receive and transmit freely for a **2-minute session** before the system automatically times out, locks itself, and requires re-authentication.
  
-The reset button must be held for 5 seconds to perform a full reset of the system. The user data is lost upon resetting.+The reset button must be held for 5 seconds to perform a full reset of the system.
  
 ===== Hardware Design ===== ===== Hardware Design =====
  
 | Component | Quantity | Description | Interface | | Component | Quantity | Description | Interface |
 +| --- | --- | --- | --- |
 | **ESP32 DevKit V1** | 2 | Main Microcontroller (WROOM-32) | - | | **ESP32 DevKit V1** | 2 | Main Microcontroller (WROOM-32) | - |
 | **AS608 Sensor** | 2 | Optical Biometric Fingerprint Sensor | UART | | **AS608 Sensor** | 2 | Optical Biometric Fingerprint Sensor | UART |
Line 41: Line 42:
 | **Mini Speaker** | 2 | 20x30mm Rectangular Speaker (1W) | Analog | | **Mini Speaker** | 2 | 20x30mm Rectangular Speaker (1W) | Analog |
 | **Tactile Buttons** | 6 | PTT, Admin Mode, Reset | GPIO | | **Tactile Buttons** | 6 | PTT, Admin Mode, Reset | GPIO |
-| **Battery Holder** | 2 | 4 x AA (for 4.8V NiMH Rechargeable) | Power | +| **Battery Holder** | 2 | 4 x AA Slots Enclosure | Power | 
-| **Custom Enclosure**| 2 | 3D Printed Case & Breadboard Assembly | Mechanical |+| **NiMH AA Batteries** | 8 | 1.2V Rechargeable Cells (4.8V pack per terminal) | Power | 
 +| **Custom Enclosure** | 2 | 3D Printed Case & Breadboard Assembly | Mechanical |
 | **DuPont Wires** | Set | Male-to-Male / Male-to-Female Jumpers | Wiring | | **DuPont Wires** | Set | Male-to-Male / Male-to-Female Jumpers | Wiring |
  
Line 51: Line 53:
  
 **Detailed Pin Mapping & Motivation:​** **Detailed Pin Mapping & Motivation:​**
- 
 ^ Component ^ Peripheral Pin ^ ESP32 Pin ^ Signal Type ^ Design Motivation ^ ^ Component ^ Peripheral Pin ^ ESP32 Pin ^ Signal Type ^ Design Motivation ^
 | **Power Supply** | Plus (+) Bat. | VIN | Power (4.8V) | System power. Feeds Amp directly and ESP32 regulator. | | **Power Supply** | Plus (+) Bat. | VIN | Power (4.8V) | System power. Feeds Amp directly and ESP32 regulator. |
Line 60: Line 61:
 | **Microphone (INMP441)**| VDD | 3V3 | Power (3.3V) | Native digital power. | | **Microphone (INMP441)**| VDD | 3V3 | Power (3.3V) | Native digital power. |
 | ::: | L/R | GND | Config | Tied to GND to configure transmission on the Left Channel (Mono). | | ::: | L/R | GND | Config | Tied to GND to configure transmission on the Left Channel (Mono). |
-| ::: | WS | D25 | I2S Clock | Allocated to standard output-capable pins for I2S0 Master mode. | +| ::: | WS | D33 | I2S Clock | Allocated to standard output-capable pins for I2S0 Master mode. | 
-| ::: | SCK | D32 | I2S BClock | ::: | +| ::: | SCK | D18 | I2S BClock | ::: | 
-| ::: | SD | D33 | I2S Data | ::: |+| ::: | SD | D32 | I2S Data | ::: |
 | **Amplifier (MAX98357A)**| VIN | VIN | Power (4.8V) | Powered directly from batteries to prevent ESP32 brownouts. | | **Amplifier (MAX98357A)**| VIN | VIN | Power (4.8V) | Powered directly from batteries to prevent ESP32 brownouts. |
-| ::: | LRC / WS | D14 | I2S Clock | Allocated to the secondary I2S1 bus for independent audio output streaming. | +| ::: | LRC / WS | D26 | I2S Clock | Allocated to the secondary I2S1 bus for independent audio output streaming. | 
-| ::: | BCLK | D26 | I2S BClock | ::: | +| ::: | BCLK | D27 | I2S BClock | ::: | 
-| ::: | DIN | D27 | I2S Data | ::: |+| ::: | DIN | D14 | I2S Data | ::: |
 | **Speaker** | Positive (+) | Amp OUT+ | Analog | Driven directly by the Class D Amplifier for high-efficiency output. | | **Speaker** | Positive (+) | Amp OUT+ | Analog | Driven directly by the Class D Amplifier for high-efficiency output. |
 | ::: | Negative (-) | Amp OUT- | Analog | ::: | | ::: | Negative (-) | Amp OUT- | Analog | ::: |
Line 88: Line 89:
 The application backbone runs through transitions between 4 distinct states: The application backbone runs through transitions between 4 distinct states:
  
-* **STATE_LOCKED / ST_LOCKED:​** Default state. The system is completely isolated ​(hardware Zero-Trust). The I2S output is muted, and the system polls the AS608 sensor via UART.+* **STATE_LOCKED / ST_LOCKED:​** Default state. The system is completely isolated. The I2S output is muted, and the system polls the AS608 sensor via UART.
 * **STATE_UNLOCKED / ST_UNLOCKED:​** Reached after a valid fingerprint match. A timer is started (2 minutes). * **STATE_UNLOCKED / ST_UNLOCKED:​** Reached after a valid fingerprint match. A timer is started (2 minutes).
 * **STATE_WAIT_ADMIN / ST_ADMIN:** An intermediate state triggered when the Admin ID (ID 1) is recognized. Enables '​Enroll'​ and '​Delete'​ functions via the Action Button. Features an automatic 5-minute timeout. * **STATE_WAIT_ADMIN / ST_ADMIN:** An intermediate state triggered when the Admin ID (ID 1) is recognized. Enables '​Enroll'​ and '​Delete'​ functions via the Action Button. Features an automatic 5-minute timeout.
Line 97: Line 98:
   * **Long Press (> 5s):** If in ''​ST_ADMIN'',​ it triggers `fingerprintDelete(USER_ID)` to wipe the database.   * **Long Press (> 5s):** If in ''​ST_ADMIN'',​ it triggers `fingerprintDelete(USER_ID)` to wipe the database.
  
-==== Task Distribution ​(Dual-Core) ====+==== Hardware-Level Encryption ​(AES-128) ====
  
-To ensure "​zero-latency"​ audio, the software is split between ​the two cores of the ESP32: +To prevent unauthorized interception of the radio traffic (packet sniffing), the system implements ESP-NOW'​s native **AES-128** encryption at the MAC layer. 
-  * **Core 0 (Communication Task):** Handles the **ESP-NOW** stack, packet encryption ​(if implemented)and sending/​receiving audio buffers+  * **Symmetric Keying:** A 16-byte secret key (''​secretKey''​is hardcoded ​and shared between the ALPHA and BRAVO terminals. This acts as both the Primary Master Key (PMK) and the Local Master Key (LMK)
-  * **Core 1 (System Task):** Handles ​the Fingerprint UART polling, OLED I2C updates, and monitoring ​the GPIO buttons.+  * **Secure Payload:** By setting ''​peerInfo.encrypt = true''​ during ​the peer registration phasethe ESP32'​s Wi-Fi hardware automatically encrypts the outgoing 240-byte audio payloads ​and decrypts them upon arrival. This zero-overhead hardware encryption ensures that the P2P voice stream remains strictly confidential.
  
 ==== Communication Protocol & Audio Flow ==== ==== Communication Protocol & Audio Flow ====
Line 115: Line 116:
 * **How:** The ''​display.display()''​ command was strictly restricted only to the moments when the device changes its state (e.g., transition from TX to RX). * **How:** The ''​display.display()''​ command was strictly restricted only to the moments when the device changes its state (e.g., transition from TX to RX).
 * **Why:** I2C is a much too slow bus compared to the frequency of the incoming radio packets (dozens per second). Updating the screen for every packet would have led to "CPU starvation",​ severely fragmenting the audio playback fluency. * **Why:** I2C is a much too slow bus compared to the frequency of the incoming radio packets (dozens per second). Updating the screen for every packet would have led to "CPU starvation",​ severely fragmenting the audio playback fluency.
- 
-* **Where:** Audio Feedback Loop (Sidetone Cancellation). 
-* **How:** The local playback of the microphone through its own speaker was completely suppressed in the code during transmission. 
-* **Why:** The physical proximity between the INMP441 and MAX98357A components inside the case instantly generated acoustic feedback (howling) and distortion. 
  
 * **Where:** Background Noise Management (I2S Speaker). * **Where:** Background Noise Management (I2S Speaker).
Line 125: Line 122:
  
 ===== Results ===== ===== Results =====
-Link for DEMO: https://​youtube.com/​shorts/​7HnLIHeZsL8?feature=share+Demo Link : https://​youtube.com/​shorts/​ny9w-C_flPQ?is=Uj0ZvqpBS-vCuD1a
  
-===== Conclusions ===== 
-TBD 
  
 ===== Download ===== ===== Download =====
 +Project files can be found here:
 +https://​github.com/​Catalin951/​Secure-Communication-Terminal/​tree/​main
  
-<note warning> 
-O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului:​ surse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-). 
- 
-Fişierele se încarcă pe wiki folosind facilitatea **Add Images or other files**. Namespace-ul în care se încarcă fişierele este de tipul **:​pm:​prj20??:​c?​** sau **:​pm:​prj20??:​c?:​nume_student** (dacă este cazul). **Exemplu:​** Dumitru Alin, 331CC -> **:​pm:​prj2009:​cc:​dumitru_alin**. 
-</​note>​ 
- 
-===== Journal ===== 
- 
-<note tip> 
-Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului. 
-</​note>​ 
  
-===== Bibliography/​Resources ===== 
  
-<​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​ 
pm/prj2026/theodor_ioan.buliga/catalin.manole1211.1779839055.txt.gz · Last modified: 2026/05/27 02:44 by catalin.manole1211
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0