Skip to main content

Connecting to AT1000 devices

This section describes how to find and connect to AT1000 devices on the network.

It's all TCP/IP under the hood

Under the hood, all interactions with AT1000 hardware happen over TCP/IP transactions. In stand-alone mode a project script runs in an isolated OCI container on the device itself; in remote mode the same script runs on a PC on the LAN.

The SDK papers over the difference: AT1000.isStandalone() tells you which mode you are in, and AT1000.findLocalDevice() resolves the device's own address directly (without mDNS) when running on-device. The same code is portable between stand-alone and remote operation:

import { AT1000 } from '@ikalogic/at1000';

let host;
if (AT1000.isStandalone()) {
host = await AT1000.findLocalDevice(); // on-device: resolve own address, no mDNS
} else {
const devices = await AT1000.findDevices();
host = devices[0]; // remote: first device found on the LAN
}

Discovering AT1000 Devices​

Before a test sequence can be launched (controlling outputs and measuring inputs), a device needs to be found on the network.

Discovery returns a list of host strings (e.g. AT1032S-000022.local) - not connected devices. Enumerating the network never takes control of anything. The following code lists every device found and prints its host:

import { AT1000 } from '@ikalogic/at1000';
let hosts = await AT1000.findDevices(500); // timeout in milliseconds → host strings
if (hosts.length === 0) {
console.log("No devices found");
process.exit(1);
}
// Loop through discovered devices and print their host strings
hosts.forEach((host, index) => {
console.log(`Device ${index + 1}: ${host}`);
});

Opening a device​

To control a device, open it with AT1000.open(host). Opening takes exclusive access of the device (last-open-wins - see Device access control) and returns a tester object. The example below picks the first discovered device, opens it, resets it to a known state, and reads its identity from tester.info:

import { AT1000 } from '@ikalogic/at1000';
let hosts = await AT1000.findDevices();
let tester = await AT1000.open(hosts[0]); // Open the first device (takes exclusive access)
await tester.reset(); // Reset the device to its default state
console.log(`Connected to ${tester.info.model} (Serial: ${tester.info.serial_number})`);

Exclusive access & read-only mode​

A normal open() takes exclusive control of the device: any client that opened it earlier is revoked. When you only need to monitor a device - read pin states, watch power telemetry, subscribe to events - open it read-only. A read-only client mints no session, sends no session header, and never takes control away from whoever is driving the device:

const monitor = await AT1000.open(hosts[0], { readonly: true });

See Device access control for the full model.

Note

Some code examples in the next sections of this documentation assume that a tester variable representing an opened AT1000 device already exists (created with AT1000.open(...) as shown above). The discovery-and-open preamble may not be repeated in every example for simplicity and readability.