The goal with the project is create an network interface where IP packets can be sent concurrently between the mobile unit and the base station, with Enhanced ShockBurst™ packets (see the datasheet):
ping –I longge –c 3 8.8.8.8where:
-I <interface>is either the interface name or address-c <count>stops after<count>replies
For our individual goals, see the individual goals markdown file.
The following dependencies are needed:
And the following programs are needed:
The library for the nRF24l01+ network card is a modified version of an existing Rust library. The following commands should not be needed, however they can sometimes fix a lot of problems if the project is not build correctly:
cargo clean # Clean the project
cd rust-nrf24l01 # Move to the library directory
cargo clean # Clean the library
cd .. # Move back to the root directory
cargo build # Build the projectIf that doesn't work either, the library may need to be build after the second cargo clean command.
The project code is written in Rust, and is built using cross for the aarch64-unknown-linux-gnu architecture. Make sure that docker is installed and running.
Build and deploy the project by running the following commands from the root directory:
make build
make deploy-mobile # To deploy only to the mobile unit
make deploy-base # To deploy only to the base station
make deploy # To deploy to both unitsFor SSH to work both in the lab, and at home, we use tailscale. To SSH into a Raspberry Pi, the correct SSH keys are needed. Then run:
make connect-mobile # To connect to the mobile unit
make connect-base # To connect to the base station- Enable SPI bus 0 and 1 with 1 CS pin.
- Add a service file called
longge.service, corresponding to the content from either the filedeploy/longge-base.serviceordeploy/longge-mobile.service, depending on what unit is being configured. Then run:
sudo systemctl daemon-reload # To read in the new service file
sudo systemctl enable longge.service # To enable autostartThe service should now start automatically on boot. To start the service manually and check that it is working, you can run:
sudo systemctl start longge.service # To start the service
sudo systemctl status longge.service # To check the statusThis will run the eitn30-internet-inside script from the eitn30 directory. The script can also be tested manually by running:
cd eitn30 # To move to the eitn30 directory
make run-mobile # On the mobile unit
make run-base # On the base stationDNS must be configured correctly to use longge together with tailscale.
sudo nvim /etc/NetworkManager/NetworkManager.confAdd the following line to the file:
dns=defaultThen run the following commands:
sudo systemctl restart NetworkManager
sudo nvim /etc/resolv.confAdd the following line to the file
nameserver 8.8.8.8
nameserver 8.8.4.4Then reboot!
CI/CD is as simple as rebuilding and redeploying the code!
make build deployTo monitor the network traffic on the longge interface, run the following commands of your choice on one of the PIs:
sudo tcpdump -i longge # add dst 10.0.0.<transmitter_address> to see only received packages, and src 10.0.0.<receiver_address> to see only sent packages
sudo iptables -S # to see the iptables rules
ip addr # to show all interfaces
netstat -r # to show the routing tableThe following components are used in the project:
The transcievers are connected to each Pi as follows:
| inuti24 (Mobile) | SPI bus | SPI device | Device Number | CE GPIO | Position (relative to inuti24 text) |
|---|---|---|---|---|---|
| Transmitter | 0 | 0 | 1 | 7 | Top |
| Receiver | 1 | 0 | 2 | 17 | Bottom |
| inuti32 (Base) | SPI bus | SPI device | Device Number | CE GPIO | Position (relative to inuti24 text) |
|---|---|---|---|---|---|
| Transmitter | 0 | 0 | 1 | 17 | Top |
| Receiver | 1 | 0 | 2 | 7 | Bottom |