Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unet-dune-bridge

A bridge that lets DUNE / Neptus (OceanScan's LAUV and Manta software) drive an acoustic link over UnetStack modems. A small UnetStack agent runs on each modem, speaks IMC to the co-located DUNE over TCP, and forwards traffic acoustically to the peer modem — so the acoustic link looks to DUNE like a plain Transports.TCP.Client.

  LAUV DUNE ──IMC/TCP :9999──▶ LAUVModem  ≈))) acoustic (((≈  MantaModem ◀──IMC/TCP :9998── topside DUNE / Neptus
                                node 1                            node 2

  down:  UamTxFrame / UamTxRange  →  transmit acoustically
  up:    UamRxFrame / UamRxRange  ←  received acoustically

Requirements

  • Groovy + Java 8+ to run the self-test on your laptop. Recommend using SDKMAN to install Java8 and Groovy3.
  • curl and a classic GitHub token with read:packages to fetch imcjava.
  • JDK 8 only when compiling the agents for a real modem (they run OpenJDK 8).

Quick start

# 1. fetch the two UnetStack-side jars into ./lib
export GITHUB_ACTOR=<your-github-username>
export GITHUB_TOKEN=<classic-PAT-with-read:packages>
./scripts/fetch-jars.sh

# 2. run the self-test against a running bridge (see the two options below).
groovy -cp "lib/*" test/bridge_selftest.groovy

You should see a "Connection refused" message suggesting that Test agents compiled successfully and were looking for a Unet modem.

Two ways to run the bridge

In the simulator (no hardware) — boot a 2-node UnetStack sim, then self-test:

export UNET_HOME=/path/to/unet-community-3.4.4/unet-3.4.4   # the inner install dir

# Make sure you have run `chmod +x ./scripts/run-sim.sh` before running the script.
./scripts/run-sim.sh                                        # foreground; leave it up
# ...then in another terminal:
groovy -cp "lib/*" test/bridge_selftest.groovy

You should see PASS — bridge round-trips both ways message confirming the bridge is working fine.

Full walkthrough → docs/simulator.md.

On real modems — compile the agents (JDK 8), upload classes + jars + startup to each modem, reboot, then self-test with the modem IPs:

LAUV_HOST=10.0.XXX.XXX MANTA_HOST=10.0.XXX.XXX groovy -cp "lib/*" test/bridge_selftest.groovy

Full walkthrough → docs/deploy-to-modems.md.

Connect DUNE / Neptus

Each DUNE connects to its own modem's bridge; the modems carry the traffic acoustically. Config for both sides → docs/DUNE-INTEGRATION.md.

Side DUNE connects to Port
LAUV LAUV modem IP 9999
topside Manta modem IP 9998

Configuration reference

Defaults come from the agent constructors — keep DUNE and the agents in sync.

Side Agent Node addr TCP port selfSysName sysDstName
LAUV LAUVModem 1 9999 lauv-01 manta-01
topside MantaModem 2 9998 manta-01 lauv-01

Repository layout

unet-dune-bridge/
├── README.md
├── src/                          # bridge agents (AbstractModem, LAUVModem, MantaModem)
├── test/bridge_selftest.groovy   # local check: fake-DUNE round trip, both directions
├── sim/bridge-sim.groovy         # 2-node UnetStack simulation
├── scripts/
│   ├── fetch-jars.sh             # download imcjava + minimal-json into ./lib
│   └── run-sim.sh                # compile agents + boot the sim
├── deploy/                       # startup-lauv.groovy, startup-manta.groovy
├── docs/                         # simulator.md, deploy-to-modems.md, DUNE-INTEGRATION.md
└── lib/                          # jars (filled by fetch-jars.sh)

Troubleshooting

  • UnsupportedClassVersionError ... 55.0 ... up to 52.0 running the self-test - Groovy on Java 8. Please make sure you have Java 8 installed with Groovy 3.x, you can check both by running the following commands from your terminal - java -version and groovy --version.
  • fetch-jars.sh 401 / "not a valid jar" — the token is expired, not classic, or lacks read:packages. imcjava version is pinned to 5.5.5-unify; override with IMC_VERSION=<v> ./scripts/fetch-jars.sh.
  • Self-test gets UamTxStatus but no UamRxFrame — the TCP server is up but nothing transmitted. In the sim, the stack didn't load (ps should show phy, ranging, router, bridge); on hardware, the far modem's agent isn't running or the modems are out of range.
  • UnsupportedClassVersionError on the modem — agents compiled with a JDK newer than 8. Please recompile using JDK 8.

License

This project is licensed under the MIT License.

About

UnetStack – Dune integration

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages