DejaOS Documentation

website·Indexed 31 days ago

https://dejaos.com

An operating system for embedded devices featuring AI-assisted development and a JavaScript-based environment. It includes the dxUi module (a wrapper for the LVGL C library), a visual UI Editor for VSCode, and a system module library with utilities like dxStd, dxEventBus, and dxOta, as well as hardware support for NFC, fingerprint (dxFingerMz, dxFingerZaz), and facial recognition.

Tokens
90.2K
Snippets
365
Records
679
Agent score
52%

What's inside DejaOS

  1. Overview of dxGpio for GPIO output control

    The dxGpio module provides control over GPIO output pins in the dejaOS system. It is used to drive hardware to a high level (1) or low level (0), such as relays for door locks or electric strikes. Unlike dxGpioKey (which handles digital inputs), dxGpio is specifically for output control. It is compatible with dejaOS v2.0+ devices. To avoid hard-coding device-specific pin numbers, developers should use constants provided by the dxDriver module.
  2. Overview of the DejaOS NFC Card Reading Demo

    The NFC card reading demo application for DejaOS demonstrates hardware interaction, UI management, and data processing in a multi-threaded environment. It is specifically optimized for the FC6820 device (480*320 resolution). Key capabilities include real-time sensing of NFC cards, extraction of card UID, type (e.g., Mifare One), SAK value, and ID length, and reading formatted data block content of M1 cards via RPC calls.
  3. Overview of the Face Feature Extraction Service

    The Face Feature Extraction Service (Face Server) is a standalone backend for CentOS that processes uploaded photos to return a cropped face thumbnail and a 1024-byte feature vector. This service is specifically designed for preparing data for VF-series DejaOS face devices (Linux-based), excluding Android models. It allows developers to reduce bandwidth by pushing small thumbnails (~20 KB) or feature vectors to devices instead of high-resolution original photos.
  4. Overview of dxLogger for dejaOS

    dxLogger is a system module for dejaOS designed to replace standard console.log with a reliable logging functionality. It is a stateless utility, making it cross-thread safe. All log levels (DEBUG, INFO, ERROR) are enabled by default and support strings, numbers, objects, arrays, and Error objects.
  5. Overview of DejaOS Runtime

    DejaOS is a JavaScript runtime environment for resource-constrained embedded devices. It is based on the QuickJS engine for execution and the LVGL graphics engine for GUI rendering. It allows developers to implement business logic by importing JavaScript modules, shielding the developer from hardware-specific C/C++ driver implementations.
  6. Overview of the Video Intercom Server

    The video intercom server coordinates the full communication flow, providing three primary functions:

    1. Signaling and Sessions: Handles call setup, media negotiation (SDP/ICE), hang-ups, and general control.
    2. Media and NAT Traversal: Manages WebRTC functions and STUN/TURN services for connectivity.
    3. Web and Operations: Provides H5 call pages, an admin console, and system logs.

    These capabilities are integrated into a single service stack called webrtc-services.

  7. Overview of the Offline Smart Locker System

    The Smart Locker system is a production-ready embedded application for the FC6820 device. This offline version operates independently without network connectivity, performing all operations directly on the device. It provides a touchscreen interface for users to store and retrieve items and an administrative panel for system management.
  8. Overview of the DejaOS Simulator

    The DejaOS Simulator is a native desktop UI runtime integrated into the VSCode DejaOS Plugin (v1.0.44+). It allows developers to preview and interact with device UIs before deploying to physical hardware by executing project JavaScript via QuickJS and rendering dxUi through LVGL's Windows driver.

    Supported Platform: Local Windows x64 VSCode environments only. Remote SSH, WSL, VSCode Web, and macOS are not supported.

    Key Capabilities:

    • Native QuickJS execution and LVGL/dxUi rendering.
    • Support for SDK 2.0 UI Workers and SDK 4.0 unified runtime.
    • Loading .ui files via uiLoader.
    • Support for project images, TTF fonts, mouse interaction, buttons, text input, JS UI events, animations, and timers.
    • Use of the project's dxmodules/dxDriver.js for display configuration (width, height, DPI, and board constants).
    • Runtime logs available in the VSCode DejaOS Simulator output channel.
  9. Overview of dxConfiguration for dejaOS

    dxConfiguration is a thread-safe, instance-based configuration management module for dejaOS (v2.0+). It uses dxEventBus and a dedicated background Worker to ensure all file I/O operations are executed sequentially, preventing race conditions. Key features include:

    • Thread-Safety: Sequential file writing via a single worker.
    • Instance-Based: Ability to manage multiple configuration files (e.g., system.json, user.json) as separate instances.
    • Self-Healing: Automatically falls back to default values if a JSON file is corrupted.
    • Flexible Saving: Supports both immediate autosave and batched save() strategies.

    Dependencies: dxStd, dxMap, dxEventBus.

  10. Overview of DejaOS Host Demo

    DejaOS Host Demo is a lightweight, visual host application for DejaOS devices that functions as an app-launcher. It allows devices to configure network settings and backend services, discover and install micro apps at runtime, and launch them from a home screen without requiring a restart of the Host application. It is built using the DejaOS SDK 2.0, utilizing dxUi, dxEventBus, dxHttpClient, and specific worker boundary guidelines.
  11. Overview of dxEventBus for dejaOS

    dxEventBus is a system module for dejaOS (v2.0+) used for multi-threaded event communication. It uses the main thread as a message relay to enable full-duplex event notifications between the main thread and Worker sub-threads. It supports main-to-worker, worker-to-main, and intra-main-thread communication, as well as a built-in RPC (Remote Procedure Call) mechanism for safe cross-thread function calls.
  12. Overview of dxQueue for dejaOS

    dxQueue is a system module for dejaOS used to create thread-safe, in-memory, topic-based FIFO (First-In, First-Out) queues. It allows multiple JavaScript threads to safely exchange data without conflicts. Key features include automatic serialization/deserialization of common data types, namespace isolation via queue names, and fixed-size limits to prevent uncontrolled memory growth.