This commit is contained in:
rcarteraz 2024-10-16 12:21:49 -07:00
parent 6abec896cf
commit ffe031e553
2 changed files with 22 additions and 18 deletions

View file

@ -3,7 +3,7 @@ id: discrete-event-sim
title: Discrete Event Simulator Usage Guide title: Discrete Event Simulator Usage Guide
sidebar_label: Discrete Event Simulator sidebar_label: Discrete Event Simulator
sidebar_position: 1 sidebar_position: 1
description: Discrete Event Simulator usage guide, simulating radio communications with configurable parameters and node behaviors. description: A usage guide for simulating radio communications with configurable parameters and node behaviors.
--- ---
The discrete-event simulator mimics the radio section of the device software. It is currently based on Meshtastic 2.1. The discrete-event simulator mimics the radio section of the device software. It is currently based on Meshtastic 2.1.

View file

@ -3,7 +3,7 @@ id: interactive-sim
title: Interactive Simulator Usage Guide title: Interactive Simulator Usage Guide
sidebar_label: Interactive Event Simulator sidebar_label: Interactive Event Simulator
sidebar_position: 2 sidebar_position: 2
description: Interactive Simulator usage guide for simulating multiple Meshtastic instances with TCP-based communication and configurable pathloss models. description: A usage guide for simulating multiple Meshtastic instances with TCP-based communication and configurable pathloss models.
--- ---
The Python script _`interactiveSim.py`_ uses the [Linux native application of Meshtastic](https://meshtastic.org/docs/software/linux-native) to simulate multiple instances of the device software. These instances communicate using TCP via the script, simulating the LoRa chip. The simulator forwards messages from the sender to all nodes within range, based on their simulated positions and the selected pathloss model (see [Pathloss Model](#pathloss-model)). **Note:** Packet collisions are not yet simulated. The Python script _`interactiveSim.py`_ uses the [Linux native application of Meshtastic](https://meshtastic.org/docs/software/linux-native) to simulate multiple instances of the device software. These instances communicate using TCP via the script, simulating the LoRa chip. The simulator forwards messages from the sender to all nodes within range, based on their simulated positions and the selected pathloss model (see [Pathloss Model](#pathloss-model)). **Note:** Packet collisions are not yet simulated.
@ -20,16 +20,20 @@ The Python script _`interactiveSim.py`_ uses the [Linux native application of Me
The simulator runs the Linux native application of Meshtastic firmware. You can use either [PlatformIO](https://meshtastic.org/docs/development/firmware/build) or [Docker](https://meshtastic.org/docs/software/linux-native#usage-with-docker) to run the firmware: The simulator runs the Linux native application of Meshtastic firmware. You can use either [PlatformIO](https://meshtastic.org/docs/development/firmware/build) or [Docker](https://meshtastic.org/docs/software/linux-native#usage-with-docker) to run the firmware:
- **Using PlatformIO:** ### Using PlatformIO
Select 'native' and click 'build.' Locate the generated binary file, likely in `_Meshtastic-device/.pio/build/native/_`. Select 'native' and click 'build.' Locate the generated binary file, likely in `_Meshtastic-device/.pio/build/native/_`.
Copy the `program` file to the directory where you'll run the Python script, or provide the path as an argument with `-p`: Copy the `program` file to the directory where you'll run the Python script, or provide the path as an argument with `-p`:
```bash ```bash
python3 interactiveSim.py 3 -p /home/User/Meshtastic-device/.pio/build/native/program python3 interactiveSim.py 3 -p /home/User/Meshtastic-device/.pio/build/native/program
``` ```
- **Using Docker:** ### Using Docker
The simulator pulls a Docker image that builds the latest Meshtastic firmware. The simulator pulls a Docker image that builds the latest Meshtastic firmware.
Ensure the Docker SDK for Python is installed: Ensure the Docker SDK for Python is installed:
```bash ```bash