Skip to content

Commit

Permalink
Implement rntimatcher workflow
Browse files Browse the repository at this point in the history
* Implement Traffic pattern sending
* Add RntiMatcher states, traffic_generator, matching
* Implement basic_filter for TrafficCollection
  * Add BasicFilterStatistics struct to track changes
* Implement TrafficPatterns A-F
  -> incremental pattern with several configurations
* Implement matrices-based feature distance calculation

Python:

* Add pandas-based visualization script for RNTI matching log
* Add several plotting functions (line, scatter, histogram)
* Add mode: diashow
  -> skim recordings
* Add mode: standardize
  -> retrieve feature mean + standard deviation
* Add mode: export
  -> create unfiltered, filtered, and single RNTI plots

Moreover:

* Fix DCI time delay issue by adapting ngcontrol.fetcher sleep time
* Improve threads error handling by introducing RunArgs
* Add printout thread PID to determine load distribution
 -> Use nix::unisted based gettid()
    Warning: This works only for Linux as it uses an OS-specific API!
* Fix ue_dci and ue_config ngscope messsage output in ngcontrol
* Introduce global is_debug() using lazy_static craate
* Adapt println and debug to print_info and print_debug
* Detect tx_dci bus overflow and print message
* Print >1s DCI diff properly
  • Loading branch information
bastian-src committed Jun 19, 2024
1 parent e89ec9c commit 1159912
Show file tree
Hide file tree
Showing 18 changed files with 3,544 additions and 440 deletions.
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,25 @@ edition = "2021"
[dependencies]
anyhow = "1.0.80"
bus = "2.4.1"
casual_logger = "0.6.5"
chrono = "0.4.38"
clap = { version = "4.5.4", features = ["derive", "color", "env", "help"] }
clap-serde = "0.5.1"
confy = { version = "0.6.1", default-features = false, features = ["yaml_conf"] }
ctrlc = "3.4.4"
derive = "1.0.0"
features = "0.10.0"
kanal = "0.1.0-pre8"
lazy_static = "1.4.0"
libc = "0.2.155"
nalgebra = "0.32.6"
nix = "0.28.0"
regex = "1.10.4"
reqwest = { version = "0.12.3", features = ["json"] }
serde = { version = "1.0.197", features = ["derive"] }
serde_derive = "1.0.198"
serde_json = "1.0.116"
serde_libconfig = "0.0.1"
serde_libconfig = "0.0.2"
serde_yaml = "0.9.34"
strum_macros = "0.26.2"
tokio = { version = "1.37.0", features = ["full", "sync"] }
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,44 @@ smartphone IP. It shows the dns routes per interface:
sudo resolvectl dns
```

In case your device gets only an IPv6 address, you can request an IPv6 by
configuring the network interface further. Therefore, add the following
udev rule to apply a static naming schema to your USB interface:

``` /etc/udev/rules.d/99-usb-tethering.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="rndis_host", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="usb_tether"
```

```
sudo udevadm control --reload-rules
sudo udevadm trigger
```

Now, your device should show up as "usb_tether". So, you can configure
the interface to request an IPv4 DHCP:

``` /etc/netplan/01-usb-tethering.yaml
etwork:
version: 2
ethernets:
usb_tether:
dhcp4: true
dhcp6: true
```

```
sudo netplan apply
```


### Disable IPv6

According to [link](https://itsfoss.com/disable-ipv6-ubuntu-linux/).

```
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
```

The configuration can be made persistently by editing/adding `/etc/sysctl.d/`.
18 changes: 15 additions & 3 deletions scripts/api_test_device_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,24 @@

# Predefined response
cell_data = [
{"id": 1, "type": "LTE", "earfcn": "Neuron A"},
{
"id": 62,
"type": "LTE",
"arfcn": 3350,
"band": "7",
"rssi": 110.7,
"rsrp": 90.7,
"rsrq": 11.3,
},
]

@app.route('/api/v1/celldata')
def get_cell_data():
def get_cell_data_all():
return jsonify(cell_data)

@app.route('/api/v1/celldata/connected/all')
def get_cell_data_connected_all():
return jsonify(cell_data)

if __name__ == '__main__':
app.run(debug=True)
app.run(debug=True, port=7353)
6 changes: 6 additions & 0 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
flask
marshmallow
matplotlib
jsonlines
seaborn
json
linecache
pandas
Loading

0 comments on commit 1159912

Please sign in to comment.