Anytime Help Center

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support
  • Guest
  • Log In
English (US)
US English (US)
DE German
CN Chinese
MX Spanish (Mexico)
Chinese (Simplified)
  • AKG
    Microphones Wireless Integrated Systems Automatic Mixers Headphones Discontinued Products (AKG) General AKG Inquiries Certifications (AKG)
  • AMX
    Networked A/V Distribution (AVoIP) Traditional A/V Distribution Video Signal Processing Architectural Connectivity User Interfaces Control Processing Power (AMX) Programming (AMX) Software (AMX) Discontinued Products (AMX) General AMX Inquiries Certifications (AMX)
  • BSS
    Soundweb™ Omni Soundweb™ London Soundweb™ Contrio™ Software (BSS) Discontinued Products (BSS) General BSS Inquiries Certifications (BSS)
  • Crown
    CDi DriveCore Series CDi Series Commercial Series ComTech Series DCi DriveCore Series I-Tech HD Series XLC series XLi Series XLS DriveCore 2 Series XTi 2 Series Discontinued Products (Crown) Software (Crown) General Crown Inquiries Certifications (Crown)
  • dbx
    CX Series 500 Series DriveRack Personal Monitor Control ZonePRO Zone Controllers FeedBack Suppression Microphone Preamps Dynamics Processors Crossovers Equalizers Software (dbx) Discontinued Products (dbx) General dbx Inquiries Certifications (dbx)
  • Flux::
    Immersive Processing Analysis Subscriptions
  • JBL
    Cinema Sound Installed Live Portable Tour Sound Recording & Broadcast Software (JBL) Discontinued Products (JBL) Video Manual Series (JBL) General JBL Inquiries Certifications (JBL)
  • Lexicon
    Plugins Effects Processors Cinema Discontinued Products (Lexicon) Video Manual Series (Lexicon) General Lexicon Inquiries Certifications (Lexicon)
  • Martin
    Atomic ELP ERA Exterior MAC P3 VC VDO Tools Discontinued Products (Martin) General Martin Inquiries Certifications (Martin)
  • Soundcraft
    Digital Analog Connected Analog Only Discontinued Products (Soundcraft) Video Manual Series (Soundcraft) General Soundcraft Inquiries Certifications (Soundcraft)
  • General HARMAN Inquiries
    Dante
+ More
  • Home
  • AMX
  • Programming (AMX)
  • Programming

Netlinx Client IP Communications

Technical Support Guide

Written by Peter Stauber

Updated at February 3rd, 2026

Table of Contents

Brand: Models: Overview: ​Symptoms Resolution

Brand:

  • AMX

Models:

  • Netlinx 

Overview:

Netlinx Client IP Communications​


​Symptoms

  • An example is needed of how to handle client IP connections within NetLinx code.

Resolution

See the commented example below for a good example of how to handle client IP communications:


(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE dvIP = 0:2:0; // 0:2:0 is the first available IP port, 0:3:0 is the next, etc.
dvTP = 128:1:0; // The touch panel
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
// Booleans
TRUE = 1;
FALSE = 0;
// TCP/IP constants
TCP = 1;
UDP = 2;
// Time for wait before reopening connection.
RETRY_TIME = 300; // 30 seconds
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE
// IP address of server = 192.168.1.100 in this example
CONSTANT char cServerAddress[13] = '192.168.1.100';
// Using server port 23 (Telnet) in this example.
CONSTANT LONG lServerPort = 23;
INTEGER bClientOnline; // Flag: TRUE when client is connected
INTEGER bClientKeepOpen; // Flag: keep the client open at all times
(***********************************************************)
(* STARTUP CODE GOES BELOW *)
(***********************************************************)
DEFINE_START
// Attempt to open a TCP connection to the server.
IP_CLIENT_OPEN (dvIP.port,cServerAddress,lServerPort,TCP);
(***********************************************************)
(* THE EVENTS GOES BELOW *)
(***********************************************************)
DEFINE_EVENT DATA_EVENT [dvIP]
{
// Online handler runs when a successful connection is made.
ONLINE:
{
// We have communication. Can send strings to IP device now.
bClientOnline = TRUE;
}
// Offline handler runs when connection is dropped/closed.
OFFLINE:
{
// NOTE: Certain protocols (such as HTTP) drop the connection
// after sending a response to a request. For those protocols,
// this is a better place to parse the buffer than in the STRING
// handler. There will be a complete reply in the buffer.
bClientOnline = FALSE;
// Attempt to reestablish communications, if desired.
IF (bClientKeepOpen)
WAIT RETRY_TIME
IP_CLIENT_OPEN (dvIP.port,cServerAddress,lServerPort,TCP);
}
// Data event runs when we get messages from the server.
STRING:
{
// Buffer parsing goes here.
// May need to ACK initial message from server to establish connection.
// NOTE: Even if parsing responses in OFFLINE, you should still have
// an empty STRING handler to prevent mainline from running needlessly
// every time a string comes in.
}
// Onerror runs when attempt to connect fails.
ONERROR:
{
SWITCH (DATA.NUMBER)
{
// No need to reopen socket in response to following two errors.
CASE 9: // Socket closed in response to IP_CLIENT_CLOSE.
CASE 17: // String was sent to a closed socket.
{
}
DEFAULT: // All other errors. May want to retry connection.
{
IF (bClientKeepOpen)
WAIT RETRY_TIME
IP_CLIENT_OPEN (dvIP.port,cServerAddress,lServerPort,TCP);
}
}
}
}
BUTTON_EVENT [dvTP, 1] // Open client.
{
PUSH:
{
IF (!bClientOnline)
IP_CLIENT_OPEN (dvIP.port,cServerAddress,lServerPort,TCP);
bClientKeepOpen = TRUE;
}
}
BUTTON_EVENT [dvTP, 2] // Close client (and keep it closed).
{
PUSH:
{
IF (bClientOnline)
IP_CLIENT_CLOSE (dvIP.port);
bClientKeepOpen=FALSE;
}
}
​

 

 

Related Videos

framework blueprint

Was this article helpful?

Yes
No
Give feedback about this article

Table of Contents

Brand: Models: Overview: ​Symptoms Resolution

Related Articles

  • How do I program a CE series device to work with a Netlinx system?
  • SVSI N2600 series and Netlinx

Related Articles

  • How do I program a CE series device to work with a Netlinx system?
  • SVSI N2600 series and Netlinx
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand