LoopIT

Quickstart

neuroConn GmbH

2026-06-05

Quickstart

Two short paths to a working result: control a device from your PC, and run your first onboard script. Pick whichever you need — they are independent.

Before you start

  • A LoopIT device on the same network, and its IP address.
  • On the device’s touchscreen, enable remote control; it shows a six-digit one-time password (the token every message carries).
  • For scripting, the ralgolitc compiler — download it for Linux or Windows.

Path A — control a device in 5 minutes

The device speaks JSON over TCP on port 1219. A message addresses a parameter by module, instance index, and field. This Python client connects, discovers what the device offers, and sets a parameter:

import json, socket

HOST, PORT, TOKEN = "192.0.2.10", 1219, "123456"   # device IP and the touchscreen token

def request(sock, obj):
    obj = {"token": TOKEN, **obj}                   # every message carries the token
    sock.sendall(json.dumps(obj).encode("ascii"))
    buf = b""
    while True:                                      # a reply is complete once it parses
        buf += sock.recv(4096)
        try:
            return json.loads(buf)
        except json.JSONDecodeError:
            continue

s = socket.create_connection((HOST, PORT), timeout=5)

# 1. discover the device's modules and parameters
print(request(s, {"?": {"!": "conf"}}))

# 2. set a parameter (use a module/field the discovery step reported)
print(request(s, {"current_source": {"0": {"stimulation": False}}}))

Run it, read the configuration it prints, and address the modules it actually reports. That’s the whole model: discover, then read (null value) or set (a real value). The parameter server guide covers authentication, replies, errors, and stimulation commands in full.

Path B — your first onboard script

For real-time, closed-loop logic you write a short RALGOL script that runs on the device every millisecond. Here is one that counts cycles and streams the count over LSL:

1w interface {
  1w emit unsigned ticks;
} ral;

script {
  std::add(ral.ticks, 1) -> ral.ticks;
};

Save it as counter.ralgol and check it with the compiler:

ralgolitc counter.ralgol

It prints the compiled form on success, or a diagnostic with a line, column, and error code (for example error[E303]: missing semicolon) that tells you exactly what to fix. Edit, re-run, repeat — a clean compile means the script is well-formed. To get the same checks in the editor each time you save, install the VS Code extension.

Deploy it by writing the script text to the ral module’s .protocol field over the same JSON connection:

s = socket.create_connection((HOST, PORT), timeout=5)
script = open("counter.ralgol").read()
print(request(s, {"ral": {"0": {".protocol": script}}}))

The device compiles and admits it, and the reply reports the script’s per-cycle runtime. The scripting guide builds from here to live-signal processing and rolling-window analysis.

Next steps

LoopIT documentation · neuroConn