-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qm sub-package qm_dropin_mount_bind_ttyUSB0
Another ready to use example in-tree to users. Execute: make qm_dropin_mount_bind_ttyUSB0 and voi-la. Signed-off-by: Douglas Schilling Landgraf <[email protected]>
- Loading branch information
Showing
3 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_ttyUSB0.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Drop-in configuration for Podman to mount bind /dev/ttyUSB0 from host to QM | ||
# Containers. | ||
# | ||
# USB (Universal Serial Bus) can be used in two main modes: as a standard USB | ||
# device or for serial communication. | ||
# | ||
# 1. USB as a Standard Device | ||
# ------------------------- | ||
# Most USB devices (e.g., flash drives, keyboards, mice) communicate using | ||
# the USB protocol. These devices use their own drivers and are typically | ||
# represented by device files such as /dev/sda for storage devices, or | ||
# /dev/input/ for input devices. Standard USB devices offer high data | ||
# transfer rates and advanced features like plug-and-play. | ||
# | ||
# 2. USB for Serial Communication | ||
# ----------------------------- | ||
# USB can also be used to emulate traditional serial communication (e.g., RS-232). | ||
# This is common when using USB-to-serial adapters or devices like OBDII | ||
# (On-Board Diagnostics) interfaces, which convert vehicle diagnostic information | ||
# from the OBDII port to serial, then to USB, allowing the computer to read the data. | ||
# In this case, Linux creates device files like /dev/ttyUSB0 or /dev/ttyUSB1, | ||
# which represent virtual serial ports. These ports allow software to interact | ||
# with the OBDII device as if it were using a classic serial connection. | ||
# | ||
# Please NOTE | ||
# ------------ | ||
# You can find ready-made ELM327 OBD2 (Serial) to USB cables available for | ||
# purchase, so there’s no need to build one from scratch unless you really want to. | ||
# Just make sure that the cable is compatible with your vehicle's manufacturer. | ||
# | ||
# | ||
# 3. ASCII Diagram | ||
# ------------- | ||
# See below an ASCII diagram to show ELM327 cable connected into OBDII Diagnostic | ||
# Port and USB computer port and shared to QM container and it's nested containers. | ||
# | ||
# +----------------------------------+ | ||
# | Vehicle | | ||
# | +----------+ | | ||
# | | OBDII | | The Vehicle OBDII Diagnostic Port is | ||
# | | Diagnostic| | usually *under the dashboard* near the | ||
# | | Port | | the driver's seat. | ||
# | +-----+-----+ | | ||
# | | | | ||
# +----------------------------------+ | ||
# | | ||
# | ELM327 Cable (OBDII to USB) | ||
# +----------------------------------+ | ||
# | | ||
# v | ||
# +------------------------------------------------------------+ | ||
# | Laptop Machine | | ||
# | | | ||
# | /dev/ttyUSB0 <-- USB device for ELM327 | | ||
# | | | ||
# | +-----------------------------------------+ | | ||
# | | QM Container | | | ||
# | | | | | ||
# | | /dev/ttyUSB0 <-- Shared USB device | | | ||
# | | | | | ||
# | | +-----------------------------+ | | | ||
# | | | Nested Container | | | | ||
# | | | | | | | ||
# | | | /dev/ttyUSB0 <-- Shared | | | | ||
# | | | USB device | | | | ||
# | | +-----------------------------+ | | | ||
# | +-----------------------------------------+ | | ||
# +------------------------------------------------------------+ | ||
# | ||
# | ||
[containers] | ||
devices = [ | ||
"/dev/ttyUSB0:/dev/ttyUSB0" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters