How uliprantz/signagedisplayhpi works
• USB Insertion & Storage Monitoring: Represent the USB ports which, when a device is inserted, serve as the trigger for the process.
• PDF File Handler: This component is responsible for scanning the USB’s file system for the PDF, checking its name against the “allowed” list, and preparing it for the next stage.
• Signature Verification Module: Highlight the segment of the script (within SignageDisplay.py) that uses a public key on the Pi to verify the PDF’s signature before display.
• Renderer: Show how the validated PDF is rendered to the screen using direct access to the framebuffer (via tools like “fbi”).
• Service/Startup Management: Indicate how the systemd service (SignageDisplay.service) and startup_script.sh are used to integrate and auto-launch the script on boot.
• Dependency & Environment Setup: Optionally include a block for “Python Dependencies” (from requirements.txt and pip3 command) and OS-level configuration (e.g. mounting USB, frame buffer access, user groups).
Relationships and Data Flow
• File handler to the “Signature Verification Module” to show that the PDF is only passed on if verified.
• Overlay a background process managed by the “systemd service” that ensures the SignageDisplay.py script runs automatically at startup.
Architectural Patterns & Design Principles
• Separation of Concerns: The key functionalities (USB monitoring, PDF handling, signature verification, and display output) are clearly separated in the code.
• Event-Driven Design: The script reacts to USB insertions, triggering the sequence of operations.
• System Service Integration: Emphasize the use of the systemd service for auto-start functionality and OS-level integration.
• Security: The public key verification step is crucial and should be visually distinct to stress the project’s emphasis on secure file handling.
Relevant Technologies and Frameworks
• Python: The project logic is implemented in Python (SignageDisplay.py).
• Systemd: SignageDisplay.service shows how the service is managed.
• fbi: Used to interact with the framebuffer for displaying images/PDF pages.
• Linux (Raspberry Pi OS): The commands and instructions assume usage on Raspbian.
• (Optional) 3D Printing/Case Design: Incorporate references to the RaspberryPiCase STL files to show that hardware casing is part of the overall design.