This is a guide to setting up all nodes using Le Potatoes.
This guide will be assuming ubuntu 22.04 server, as described in the libre compute docs
- When setting up 22.04 server, set eth0 to use DHCP in the cloud init config (before flashing)
- Flash SD card as described in their docs
- Connect Potato to Ethernet
- Install Docker
- Add user to docker group
- reboot
- Clone timebay
- Add a cronjob to enable uarta with:
ltdo enable uarta
on boot (must be in superusers crontab) - Delete /usr/lib/systemd/network/80-adhoc (If this is not done, then the wireless adapter will be dropped from bat0 if BATMAN is used)
- Add a cronjob to run scripts/run_sensor_node.bash Node_ID or scripts/run_gateway_node.bash depending on node type on boot
- Ensure this node id is unique, or else the system will not work correctly
- If setting up a gateway node, apply the kernel parameters:
This can be done by adding a rule to sysctl.d, and adding a udev rule to load that rule when br_netfilters is loaded.
net.bridge.bridge-nf-call-iptables=0 net.bridge.bridge-nf-call-ip6tables=0 net.bridge.bridge-nf-call-arptables=0
- Finally, reboot with an ethernet cable connected to an uplink, and wait 10 minutes or so for the docker container to complete its first build. The potato is now ready!
If you want a box to hold the node in use, see the resources in the CAD folder.
To run the node after the above is setup:
- Connect the Wi-Fi adapter to a usb port
- Connect the TF-Luna to either GPIO or via a usb to UART converter (Timebay will select whichever is used)
- Before powering on, ensure there is an object within 12m in front of the laser. If not, the laser will obtain a zero of 0, and not detect anything
- If this is not done correctly or the course is changed, simply correct the issue and zero the sensor via the GUI
- Connect the potato to a power source, and wait ~3 minutes for it to boot and mesh
To update the potato to the latest Timebay version:
- Turn on the node with an ethernet cable connected
- If Timebay on the node is not in sync with origin, then it will pull the changes and rebuild the correct Docker container
- This can take ~10 minutes, so go make a sandwich or something
- You are now up-to-date!
- If the blue LED on the potato is not blinking, then the board has died (it is solid when booting however)
- This indicates a power issue, so you'll need to make sure your source has >1A of current @ 5v. USB cables have been an issue for me before, so check that too.
- To debug most networking issues, just connect the Potato to a monitor. Docker logs can display the sensor node executables output.
- If the gateway node has a working layer 2 but not layer 3, (IE wireshark shows ARP but not pings), ensure the kernel parameters were actually applied.
- If the sensors appear to be ignoring the vehicle, ensure they both have an object within 10m, and that object is > 20cm away from the vehicle.
- If you want to create many sensor nodes, it is possible to set one node up
, then copy that sd card to a file with
dd
, then copy that file back to another sd card withdd
. Just make sure to change the node id. - Sensors connected to uarta will appear on /dev/ttyAML6. This interface does not have a udev id, so you'll just need to hardcode the path.
- Potatoes seem to be quite picky with power, although not as much as a pi. 1.5A mobile batteries and a quality usb cable seem to work for me, although it can still die if plugging in a keyboard.
- If you are using the reference image (not public atm) it is currently setup using the above guidelines.
- Username is ubuntu, and password is timebay