Skip to content

telamon/snail

Repository files navigation

SNAIL

status: reverse iteraton: 1

snail is a relayed protocol for portable unsupervised sneakernet devices.

This repository contains an implemenation that uses hacked Wifi NAN for peer discovery and communication in order to iterate and simplify.

What you need

For now, an ESP32 + battery and an MicroSD for storage.

Optionally supported addons:

  • in: Button
  • out: RGB-Led(SK6812)
  • out: OLED Display (SH1107)

Flashing instructions

Prebuilt Firmware - Don't ask, just flash!

Pick a firmware:

pip install esptool
esptool.py -b 300000 write_flash -z 0x0 DOWNLOADED_FILENAME_BIN

From Source

1. Clone this repo

git clone --recurse-submodules https://git.sr.ht/~telamohn/snail

2.a) The easy way

Get PlatformIO

Open project and find the upload button.

or via commandline:

pio run -t upload

2.b) The other way

Setup esp-idf then:

idf.py build && idf.py flash

Device Config

See snail section in:

LC_ALL=en_US.UTF8 idf.py menuconfig

Design

Sneakernet is the art of transferring data using physical transportation and without the use of internet. We'll rely on eventual message delivery within geographical bounds. - unless you travel further

The snail protocol itself is simple:
Search for beacons, Notify presence, Attach to peer, Inform news, Leave and repeat.

Message Format

TDB

Checking Inbox

TDB Longpress on button interrupts the SNAIL cycle and puts the device into private mode.

Interaction with a smartphone.

  • Android 8+ has builtin NAN support, Apple requires SoftAP?
  • BLE
  • USB-C
  • Wifi Direct

References / Journey

Iteration 2 - Websockets and NAND Flash

Iteration 1 - Bye NAN hello SWAP

Nan is truly glitchy. It's cool to sync clocks over a wide area but it does not relay data or service info. We're not building a mesh, we're bulding a Swarm.

  • OUI & VSIE allows snail beacons to be distinguished between nodes.
  • The dual v-netif APSTA mode allows efficient discovery and exchange.
  • Always on AP solves mobile connectivity (for now).

Iteration 0 - Exploring the boundaries of Wifi NAN

Funding

Appreciated

# BTC
bc1qqjgz9fqqxj7kndqelecxmdtqgvtzqrukma5599

License

Apache-2.0 © Decent Labs 2024 | AGPL