Using the Database Connector
The SorusBoxScan DB Connector is a tool based on the SorusBoxScan Python SDK that stores each received signal in a MariaDB database.
Prerequisites
- Python 3.8+
-
If you're using Linux, install the MariaDB binary libraries:
Create the database structure
Run the following SQL script in your MariaDB instance:
CREATE TABLE signals (
id INT(11) NOT NULL AUTO_INCREMENT,
lat DECIMAL(10,6) DEFAULT NULL,
lon DECIMAL(10,6) DEFAULT NULL,
datetime DATETIME DEFAULT NULL,
alt DECIMAL(10,2) DEFAULT NULL,
speed DECIMAL(10,2) DEFAULT NULL,
course DECIMAL(10,2) DEFAULT NULL,
system_mode VARCHAR(50) DEFAULT NULL,
operation_mode VARCHAR(50) DEFAULT NULL,
mcc VARCHAR(10) DEFAULT NULL,
mnc VARCHAR(10) DEFAULT NULL,
tac VARCHAR(10) DEFAULT NULL,
scell_id VARCHAR(50) DEFAULT NULL,
pcell_id VARCHAR(50) DEFAULT NULL,
frequency_band VARCHAR(50) DEFAULT NULL,
earfcn VARCHAR(50) DEFAULT NULL,
dlbw VARCHAR(50) DEFAULT NULL,
ulbw VARCHAR(50) DEFAULT NULL,
rsrq VARCHAR(50) DEFAULT NULL,
rsrp VARCHAR(50) DEFAULT NULL,
rssi VARCHAR(50) DEFAULT NULL,
rssnr VARCHAR(50) DEFAULT NULL,
snr VARCHAR(50) DEFAULT NULL,
scs VARCHAR(50) DEFAULT NULL,
nr_dl_bw VARCHAR(50) DEFAULT NULL,
PRIMARY KEY (id)
);
Configure Environment Variables
Create a .env
file in the project root. You can use .env.example
as a template.
Run the Project
Use the following command to start the connector: