-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.py
More file actions
54 lines (43 loc) · 1.45 KB
/
Copy pathconfig.py
File metadata and controls
54 lines (43 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# config.py
import os
# === File Paths ===
# Base directory (project root, where this file lives)
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# Base output directory
OUTPUT_DIR = os.path.join(BASE_DIR, 'outputs')
# Specific paths
DB_PATH = os.path.join(OUTPUT_DIR, 'DB', 'Bledb.db')
DOCS_DIR = os.path.join(OUTPUT_DIR, 'Docs')
FOTOS_DIR = os.path.join(OUTPUT_DIR, 'images')
PCAP_FILE = os.path.join(BASE_DIR, 'wireLogs', 'watch_capture.pcapng')
# Ensure output directories exist (optional helper)
def ensure_output_dirs():
os.makedirs(os.path.dirname(DB_PATH), exist_ok=True)
os.makedirs(DOCS_DIR, exist_ok=True)
os.makedirs(FOTOS_DIR, exist_ok=True)
REPLAY_TIME_WINDOW_SEC = 5
# === BLE Distance Estimation Parameters ===
RSSI_REFERENCE = -59 # Measured RSSI at 1 meter
ENVIRONMENTAL_FACTOR = 2 # Path-loss exponent (1.6–3.3 typical)
# === Hashing Fields (for traceability if needed later) ===
USE_HASH_FIELDS = [
'timestamp', 'dmac', 'uuids_16', 'uuids_32', 'uuids_128',
'company_id', 'manufacturer_data', 'rssi'
]
# Configuration settings for BLE Analysis Project
# Visualization settings
VISUALIZATION_DPI = 300
FIGURE_SIZE = (15, 10)
# Analysis thresholds
FINGERPRINT_CHANGE_THRESHOLD = 1
DMAC_ANOMALY_THRESHOLD = 1
PACKET_COUNT_THRESHOLD = 10
# Colors for visualization
COLORS = {
'primary': '#1f77b4',
'danger': '#d62728',
'warning': '#ff7f0e',
'success': '#2ca02c',
'info': '#17becf',
'purple': '#9467bd'
}