This shows you the differences between two versions of the page.
|
pm:prj2026:theodor_ioan.buliga:catalin.manole1211 [2026/05/27 02:50] catalin.manole1211 |
pm:prj2026:theodor_ioan.buliga:catalin.manole1211 [2026/05/27 04:29] (current) catalin.manole1211 |
||
|---|---|---|---|
| Line 32: | Line 32: | ||
| ===== Hardware Design ===== | ===== Hardware Design ===== | ||
| - | |||
| - | Da, are sens sa trecem si bateriile separat ca piese distincte de suport, mai ales ca tipul lor (NiMH 1.2V) este important pentru logica de alimentare pe care ai explicat-o mai jos in pagina. Am pus 8 bucati in total (cate 4 pentru fiecare dintre cele 2 statii). | ||
| - | |||
| - | Uite tabelul complet actualizat pentru wiki, gata de inlocuit: | ||
| | Component | Quantity | Description | Interface | | | Component | Quantity | Description | Interface | | ||
| Line 57: | 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 66: | 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 94: | 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 103: | 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 phase, the 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 121: | 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 131: | 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> | ||