Update README.md

This commit is contained in:
mudhorn 2024-10-31 15:49:07 -07:00
parent a1cb88a8b9
commit 8d2bf23e30

500
README.md
View file

@ -1,250 +1,250 @@
# TC²-BBS Meshtastic Version ~~# TC²-BBS~~ N2DRC-BBS Meshtastic Version
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/B0B1OZ22Z) [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/B0B1OZ22Z)
This is the TC²-BBS system integrated with Meshtastic devices. The system allows for message handling, bulletin boards, mail systems, and a channel directory. This is a fork of the TC²-BBS system integrated with Meshtastic devices. The system allows for message handling, bulletin boards, mail systems, and a channel directory.
### Docker ### Docker
If you're a Docker user, TC²-BBS Meshtastic is available on Docker Hub! If you're a Docker user, TC²-BBS Meshtastic is available on Docker Hub!
[![Docker HUB](https://icon-icons.com/downloadimage.php?id=151885&root=2530/PNG/128/&file=docker_button_icon_151885.png)](https://hub.docker.com/r/thealhu/tc2-bbs-mesh) [![Docker HUB](https://icon-icons.com/downloadimage.php?id=151885&root=2530/PNG/128/&file=docker_button_icon_151885.png)](https://hub.docker.com/r/thealhu/tc2-bbs-mesh)
## Setup ## Setup
### Requirements ### Requirements
- Python 3.x - Python 3.x
- Meshtastic - Meshtastic
- pypubsub - pypubsub
### Update and Install Git ### Update and Install Git
```sh ```sh
sudo apt update sudo apt update
sudo apt upgrade sudo apt upgrade
sudo apt install git sudo apt install git
``` ```
### Installation ### Installation
1. Clone the repository: 1. Clone the repository:
```sh ```sh
cd ~ cd ~
git clone https://github.com/TheCommsChannel/TC2-BBS-mesh.git git clone https://github.com/TheCommsChannel/N2DRC-BBS-mesh.git
cd TC2-BBS-mesh cd N2DRC-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 ```sh
source venv/bin/activate 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. Rename `example_config.ini`: 5. Rename `example_config.ini`:
```sh ```sh
mv example_config.ini config.ini mv example_config.ini config.ini
``` ```
6. Set up the configuration in `config.ini`: 6. Set up the configuration in `config.ini`:
You'll need to open up the config.ini file in a text editor and make your changes following the instructions below You'll need to open up the config.ini file in a text editor and make your changes following the instructions below
**[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 ```ini
[interface] [interface]
type = serial type = serial
# port = /dev/ttyUSB0 # port = /dev/ttyUSB0
# hostname = 192.168.x.x # hostname = 192.168.x.x
[sync] [sync]
bbs_nodes = !f53f4abc,!f3abc123 bbs_nodes = !f53f4abc,!f3abc123
``` ```
### Running the Server ### Running the Server
Run the server with: Run the server with:
```sh ```sh
python server.py 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.
## Command line arguments ## Command line arguments
``` ```
$ python server.py --help $ python server.py --help
████████╗ ██████╗██████╗ ██████╗ ██████╗ ███████╗ ███╗ ██╗██████╗ ██████╗ ██████╗ ██████╗ ██████╗ ██████╗ ███████╗
╚══██╔══╝██╔════╝╚════██╗ ██╔══██╗██╔══██╗██╔════╝ ████╗ ██║╚════██╗██╔══██╗██╔══██╗██╔════╝ ██╔══██╗██╔══██╗██╔════╝
██║ ██║ █████╔╝█████╗██████╔╝██████╔╝███████╗ ██╔██╗ ██║ █████╔╝██║ ██║██████╔╝██║ █████╗██████╔╝██████╔╝███████╗
██║ ██║ ██╔═══╝ ╚════╝██╔══██╗██╔══██╗╚════██║ ██║╚██╗██║██╔═══╝ ██║ ██║██╔══██╗██║ ╚════╝██╔══██╗██╔══██╗╚════██║
██║ ╚██████╗███████╗ ██████╔╝██████╔╝███████║ ██║ ╚████║███████╗██████╔╝██║ ██║╚██████╗ ██████╔╝██████╔╝███████║
╚═╝ ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═══╝╚══════╝╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
Meshtastic Version Meshtastic Version
usage: server.py [-h] [--config CONFIG] [--interface-type {serial,tcp}] [--port PORT] [--host HOST] [--mqtt-topic MQTT_TOPIC] usage: server.py [-h] [--config CONFIG] [--interface-type {serial,tcp}] [--port PORT] [--host HOST] [--mqtt-topic MQTT_TOPIC]
Meshtastic BBS system Meshtastic BBS system
options: options:
-h, --help show this help message and exit -h, --help show this help message and exit
--config CONFIG, -c CONFIG --config CONFIG, -c CONFIG
System configuration file System configuration file
--interface-type {serial,tcp}, -i {serial,tcp} --interface-type {serial,tcp}, -i {serial,tcp}
Node interface type Node interface type
--port PORT, -p PORT Serial port --port PORT, -p PORT Serial port
--host HOST TCP host address --host HOST TCP host address
--mqtt-topic MQTT_TOPIC, -t MQTT_TOPIC --mqtt-topic MQTT_TOPIC, -t MQTT_TOPIC
MQTT topic to subscribe MQTT topic to subscribe
``` ```
## 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 ```sh
sudo cp mesh-bbs.service /etc/systemd/system/ sudo cp mesh-bbs.service /etc/systemd/system/
``` ```
```sh ```sh
sudo systemctl enable mesh-bbs.service sudo systemctl enable mesh-bbs.service
``` ```
```sh ```sh
sudo systemctl start mesh-bbs.service sudo systemctl start 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 of the service by running the following command: The service should be started now and should start anytime your device is powered on or rebooted. You can check the status of the service by running the following command:
```sh ```sh
sudo systemctl status mesh-bbs.service sudo systemctl status mesh-bbs.service
``` ```
If you need to stop the service, you can run the following: If you need to stop the service, you can run the following:
```sh ```sh
sudo systemctl stop mesh-bbs.service sudo systemctl stop mesh-bbs.service
``` ```
If you need to restart the service, you can do so with the following command: If you need to restart the service, you can do so with the following command:
```sh ```sh
sudo systemctl restart mesh-bbs.service sudo systemctl restart mesh-bbs.service
``` ```
2. **Viewing Logs** 2. **Viewing Logs**
Viewing past logs: Viewing past logs:
```sh ```sh
journalctl -u mesh-bbs.service journalctl -u mesh-bbs.service
``` ```
Viewing live logs: Viewing live logs:
```sh ```sh
journalctl -u mesh-bbs.service -f journalctl -u mesh-bbs.service -f
``` ```
## Radio Configuration ## Radio Configuration
Note: There have been reports of issues with some device roles that may allow the BBS to communicate for a short time, but then the BBS will stop responding to requests. Note: There have been reports of issues with some device roles that may allow the BBS to communicate for a short time, but then the BBS will stop responding to requests.
The following device roles have been working: The following device roles have been working:
- **Client** - **Client**
- **Router_Client** - **Router_Client**
## Features ## Features
- **Mail System**: Send and receive mail messages. - **Mail System**: Send and receive mail messages.
- **Bulletin Boards**: Post and view bulletins on various boards. - **Bulletin Boards**: Post and view bulletins on various boards.
- **Channel Directory**: Add and view channels in the directory. - **Channel Directory**: Add and view channels in the directory.
- **Statistics**: View statistics about nodes, hardware, and roles. - **Statistics**: View statistics about nodes, hardware, and roles.
- **Wall of Shame**: View devices with low battery levels. - **Wall of Shame**: View devices with low battery levels.
- **Fortune Teller**: Get a random fortune. Pulls from the fortunes.txt file. Feel free to edit this file remove or add more if you like. - **Fortune Teller**: Get a random fortune. Pulls from the fortunes.txt file. Feel free to edit this file remove or add more if you like.
## Usage ## Usage
You interact with the BBS by sending direct messages to the node that's connected to the system running the Python script. Sending any message to it will get a response with the main menu. You interact with the BBS by sending direct messages to the node that's connected to the system running the Python script. Sending any message to it will get a response with the main menu.
Make selections by sending messages based on the letter or number in brackets - Send M for [M]ail Menu for example. Make selections by sending messages based on the letter or number in brackets - Send M for [M]ail Menu for example.
A video of it in use is available on our YouTube channel: A video of it in use is available on our YouTube channel:
[![TC²-BBS-Mesh](https://img.youtube.com/vi/d6LhY4HoimU/0.jpg)](https://www.youtube.com/watch?v=d6LhY4HoimU) [![TC²-BBS-Mesh](https://img.youtube.com/vi/d6LhY4HoimU/0.jpg)](https://www.youtube.com/watch?v=d6LhY4HoimU)
## Thanks ## Thanks
**Meshtastic:** **Meshtastic:**
Big thanks to [Meshtastic](https://github.com/meshtastic) and [pdxlocations](https://github.com/pdxlocations) for the great Python examples: Big thanks to [Meshtastic](https://github.com/meshtastic) and [pdxlocations](https://github.com/pdxlocations) for the great Python examples:
[python/examples at master · meshtastic/python (github.com)](https://github.com/meshtastic/python/tree/master/examples) [python/examples at master · meshtastic/python (github.com)](https://github.com/meshtastic/python/tree/master/examples)
[pdxlocations/Meshtastic-Python-Examples (github.com)](https://github.com/pdxlocations/Meshtastic-Python-Examples) [pdxlocations/Meshtastic-Python-Examples (github.com)](https://github.com/pdxlocations/Meshtastic-Python-Examples)
**JS8Call:** **JS8Call:**
For the JS8Call side of things, big thanks to Jordan Sherer for JS8Call and the [example API Python script](https://bitbucket.org/widefido/js8call/src/js8call/tcp.py) For the JS8Call side of things, big thanks to Jordan Sherer for JS8Call and the [example API Python script](https://bitbucket.org/widefido/js8call/src/js8call/tcp.py)
## License ## License
GNU General Public License v3.0 GNU General Public License v3.0