Update README.md

README.md fixes
This commit is contained in:
TC² 2024-06-28 08:35:19 -04:00
parent df340d25d6
commit f10495a974

184
README.md
View file

@ -21,65 +21,69 @@ If you're a Docker user, TC²-BBS Meshtastic is available on Docker Hub!
### Installation ### Installation
1. Clone the repository: 1. Clone the repository:
```sh ```sh
cd ~git clone https://github.com/TheCommsChannel/TC2-BBS-mesh.gitcd TC2-BBS-mesh cd ~
``` git clone https://github.com/TheCommsChannel/TC2-BBS-mesh.git
cd TC2-BBS-mesh
```
2. Set up a Python virtual environment: 2. Set up a Python virtual environment:
```sh ```sh
python -m venv venv python -m venv venv
``` ```
3. Activate the virtual environment: 3. Activate the virtual environment:
- On Windows: - On Windows:
```sh ```sh
venv\Scripts\activate venv\Scripts\activate
``` ```
- On macOS and Linux:
- On macOS and Linux:
```sh
source venv/bin/activate ```sh
``` source venv/bin/activate
```
4. Install the required packages: 4. Install the required packages:
```sh ```sh
pip install -r requirements.txt pip install -r requirements.txt
``` ```
5. Set up the configuration in `config.ini`: 5. Set up the configuration in `config.ini`:
**[interface]** **[interface]**
If using `type = serial` and you have multiple devices connected, you will need to uncomment the `port =` line and enter the port of your device. If using `type = serial` and you have multiple devices connected, you will need to uncomment the `port =` line and enter the port of your device.
Linux Example: Linux Example:
`port = /dev/ttyUSB0` `port = /dev/ttyUSB0`
Windows Example: Windows Example:
`port = COM3` `port = COM3`
If using type = tcp you will need to uncomment the hostname = 192.168.x.x line and put in the IP address of your Meshtastic device If using type = tcp you will need to uncomment the hostname = 192.168.x.x line and put in the IP address of your Meshtastic device.
**[sync]** **[sync]**
Enter a list of other BBS nodes you would like to sync messages and bulletins with. Separate each by comma and no spaces as shown in the example below. Enter a list of other BBS nodes you would like to sync messages and bulletins with. Separate each by comma and no spaces as shown in the example below.
You can find the nodeID in the menu under `Radio Configuration > User` for each node, or use this script for getting nodedb data from a device: You can find the nodeID in the menu under `Radio Configuration > User` for each node, or use this script for getting nodedb data from a device:
[Meshtastic-Python-Examples/print-nodedb.py at main · pdxlocations/Meshtastic-Python-Examples (github.com)](https://github.com/pdxlocations/Meshtastic-Python-Examples/blob/main/print-nodedb.py) [Meshtastic-Python-Examples/print-nodedb.py at main · pdxlocations/Meshtastic-Python-Examples (github.com)](https://github.com/pdxlocations/Meshtastic-Python-Examples/blob/main/print-nodedb.py)
Example Config: Example Config:
```ini
[interface] ```ini
type = serial [interface]
# port = /dev/ttyUSB0 type = serial
# hostname = 192.168.x.x # port = /dev/ttyUSB0
# hostname = 192.168.x.x
[sync]
bbs_nodes = !f53f4abc,!f3abc123 [sync]
```` bbs_nodes = !f53f4abc,!f3abc123
```
### Running the Server ### Running the Server
@ -91,46 +95,56 @@ python server.py```
Be sure you've followed the Python virtual environment steps above and activated it before running. Be sure you've followed the Python virtual environment steps above and activated it before running.
## Automatically run at boot ## Automatically run at boot
If you would like to have the script automatically run at boot, follow the steps below: If you would like to have the script automatically run at boot, follow the steps below:
1. **Edit the service file** 1. **Edit the service file**
First, edit the mesh-bbs.service file using your preferred text editor. The 3 following lines in that file are what we need to edit: First, edit the mesh-bbs.service file using your preferred text editor. The 3 following lines in that file are what we need to edit:
```sh ```sh
User=pi User=pi
WorkingDirectory=/home/pi/TC2-BBS-mesh WorkingDirectory=/home/pi/TC2-BBS-mesh
ExecStart=/home/pi/TC2-BBS-mesh/venv/bin/python3 /home/pi/TC2-BBS-mesh/server.py ExecStart=/home/pi/TC2-BBS-mesh/venv/bin/python3 /home/pi/TC2-BBS-mesh/server.py
``` ```
The file is currently setup for a user named 'pi' and assumes that the TC2-BBS-mesh directory is located in the home directory (which it should be if the earlier directions were followed) The file is currently setup for a user named 'pi' and assumes that the TC2-BBS-mesh directory is located in the home directory (which it should be if the earlier directions were followed)
We just need to replace the 4 parts that have "pi" in those 3 lines with your username. We just need to replace the 4 parts that have "pi" in those 3 lines with your username.
2. **Configuring systemd** 2. **Configuring systemd**
From the TC2-BBS-mesh directory, run the following commands: From the TC2-BBS-mesh directory, run the following commands:
`sh sudo cp mesh-bbs.service /etc/systemd/system/` ```sh
sudo cp mesh-bbs.service /etc/systemd/system/
`sh sudo systemctl enable mesh-bbs.service` ```
`sh sudo systemctl start mesh-bbs.service` ```sh
sudo systemctl enable mesh-bbs.service
The service should be started now and should start anytime your device is powered on or rebooted. You can check the status ofk the service by running the following command: ```
`sh sudo systemctl status mesh-bbs.service` ```sh
sudo systemctl start mesh-bbs.service
If you need to stop the service, you can run the following: ```
`sh sudo systemctl stop mesh-bbs.service` The service should be started now and should start anytime your device is powered on or rebooted. You can check the status ofk the service by running the following command:
If you make changes to the watchlist.txt file, you will need to restart the service with the following command: ```sh
sudo systemctl status mesh-bbs.service
`sh sudo systemctl restart mesh-bbs.service` ```
If you need to stop the service, you can run the following:
```sh
sudo systemctl stop mesh-bbs.service
```
If you make changes to the watchlist.txt file, you will need to restart the service with the following command:
```sh
sudo systemctl restart mesh-bbs.service
```
## Features ## Features