An open API service indexing awesome lists of open source software.

https://github.com/aidanbh/strangenet

A free software solution for wireless IP networking over Digi's XBee API. (WIP)
https://github.com/aidanbh/strangenet

900mhz digimesh internet-of-things ip networking osi-layer rf xbee

Last synced: 8 months ago
JSON representation

A free software solution for wireless IP networking over Digi's XBee API. (WIP)

Awesome Lists containing this project

README

          

# StrangeBox
A free software solution for wireless IP networking over Digi's XBee API.

## XBee Setup

Set to "API mode (with Escapes)".

## Minimal Working Examples

_Note: These have been verified on Ubuntu 18.04 with [XBee-PRO 900HP](https://www.digi.com/products/models/xbp9b-dmst-002) units . If you can add instructions to broaden the scope of these examples, please do so._

There are two machines in the required setup that I will call "Client" and "Server". _It does not matter which XBee is connected where. It only matters that_ `openssh-client` _is installed on "Client", and_ `openssh-server` _is installed on "Server".

### Dependencies

On both "Client" and "Server", satisfy dependencies of StrangeNet with:

``` bash
sudo apt update && sudo apt install -y libpython3-dev python3-pip
sudo python3 -m pip install digi-xbee
sudo python3 -m pip install pypacker
sudo python3 -m pip install python-pytun
sudo apt install openssh-{client|server} # client on "Client", server on "Server"
```

Next, navigate to the `strangenet` folder in your local checkout of this repo. Before running, make sure that you have set the following environment variables correctly:

```
STRANGENET_XBEE_PORT
STRANGENET_XBEE_BAUD
STRANGENET_IP
```

The first two environment variables are determined by the tty device descriptor (e.g. `/dev/ttyUSB0`) and the baud rate specified in the XBee configuration (e.g. 230400), respectively. The third environment variable is whatever IPv4 descriptor you want for the StrangeNet interface.

For example, on the "Client", setup `STRANGENET_IP` by executing in your terminal window:

```bash
export STRANGENET_IP=10.0.0.1
```

Give the "Server" interface a different name on the same subnet:

```bash
export STRANGENET_IP=10.0.0.2
```

### Launch `strangenet`

From the current folder, navigate to the `strangenet` folder and then execute the following to launch `strangenet`:

```bash
python3 main.py
```

Now, you are setup to run a couple of quick IP networking commands: `ping` and `ssh`.

### `ping`

On either "Client" or "Server", try to ping the other machine with:

```bash
ping 10.0.0.{1|2} # 1 if pinging "Client" from "Server", 2 otherwise
```

### `ssh`

From "Client", connect to "Server" over `ssh` with:

```bash
ssh {username-on-server}@10.0.0.2 # username-on-server is whatever your username is on "Server"
```