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

Errors Returned When IP Connection Fails

Frequently Asked Questions

Written by Will Fraser

Updated at February 3rd, 2026

Table of Contents

Brand: Models: Question:   Answer: Download: 822-DL1-IP_Error_Reporting.zip

Brand:

  • AMX

Models:

  • Netlinx

Question:  

When an IP_CLIENT_OPEN is attempted and an ONERROR is returned, a numeric error value is returned. Why?


Answer:

This will show as Device.Number in the ONERROR event. The 822-DL1-IP Error Reporting.zip example shows an IP_CLIENT_OPEN with a function that will print the errors to the debug port as SEND_STRING 0s. Enable Internal Diagnostics or enable MSG ON in terminal or telnet to see the messages.

Download:

822-DL1-IP_Error_Reporting.zip

PROGRAM_NAME='IP Error Reporting'
(***********************************************************)
(*  FILE CREATED ON: 04/10/2007  AT: 18:41:07              *)
(***********************************************************)
(***********************************************************)
(***********************************************************)
(*  FILE_LAST_MODIFIED_ON: 04/11/2007  AT: 10:20:54        *)
(***********************************************************)
(* System Type : NetLinx                                   *)
(***********************************************************)
(* REV HISTORY:                                            *)
(***********************************************************)
(*
   $History: $
*)
(***********************************************************)
(*          DEVICE NUMBER DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_DEVICE
dvIP_DEVICE  =  0:3:0   // IP DEVICE
(***********************************************************)
(*               CONSTANT DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_CONSTANT
#WARN 'SET ADDRESS AND PORT HERE'
CHAR cIP_ADDRESS[50] = '192.168.1.240' // IP DEVICE ADDRESS
INTEGER nPORT_NUMBER = 23        // IP DEVICE PORT
(***********************************************************)
(*              DATA TYPE DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_TYPE
(***********************************************************)
(*               VARIABLE DEFINITIONS GO BELOW             *)
(***********************************************************)
DEFINE_VARIABLE
INTEGER nCONNECTION // TRACKS ONLINE STATUS
(***********************************************************)
(*        SUBROUTINE/FUNCTION DEFINITIONS GO BELOW         *)
(***********************************************************)
(* EXAMPLE: DEFINE_FUNCTION <RETURN_TYPE> <NAME> (<PARAMETERS>) *)
(* EXAMPLE: DEFINE_CALL '<NAME>' (<PARAMETERS>) *)
// PRINTS IP ERRORS TO DIAGNOSTICS
DEFINE_FUNCTION CHAR[100] IpError (LONG lERR)
{
 Switch (lERR)
 {
   Case 0:
     RETURN "";
   Case 2:
     RETURN "'IP ERROR (',ITOA(lERR),'): General Failure (IP_CLIENT_OPEN/IP_SERVER_OPEN)'";
   Case 4:
     RETURN "'IP ERROR (',ITOA(lERR),'): unknown host or DNS error (IP_CLIENT_OPEN)'";
   Case 6:
     RETURN "'IP ERROR (',ITOA(lERR),'): connection refused (IP_CLIENT_OPEN)'";
   Case 7:
     RETURN "'IP ERROR (',ITOA(lERR),'): connection timed out (IP_CLIENT_OPEN)'";
   Case 8:
     RETURN "'IP ERROR (',ITOA(lERR),'): unknown connection error (IP_CLIENT_OPEN)'";
   Case 14:
     RETURN "'IP ERROR (',ITOA(lERR),'): local port already used (IP_CLIENT_OPEN/IP_SERVER_OPEN)'";
   Case 16:
     RETURN "'IP ERROR (',ITOA(lERR),'): too many open sockets (IP_CLIENT_OPEN/IP_SERVER_OPEN)'";
   Case 10:
     RETURN "'IP ERROR (',ITOA(lERR),'): Binding error (IP_SERVER_OPEN)'";
   Case 11:
     RETURN "'IP ERROR (',ITOA(lERR),'): Listening error (IP_SERVER_OPEN)'";
   Case 15:
     RETURN "'IP ERROR (',ITOA(lERR),'): UDP socket already listening (IP_SERVER_OPEN)'";
   Case 9:
     RETURN "'IP ERROR (',ITOA(lERR),'): Already closed (IP_CLIENT_CLOSE/IP_SERVER_CLOSE)'";
 Case 17:
     RETURN "'IP ERROR (',ITOA(lERR),'): Local port not open, can not send string (IP_CLIENT_OPEN)'"; 
   Default:
     RETURN "'IP ERROR (',ITOA(lERR),'): Unknown'";
 }
}
(***********************************************************)
(*                STARTUP CODE GOES BELOW                  *)
(***********************************************************)
DEFINE_START
// OPENS CONNECTION ON BOOT
IP_CLIENT_OPEN(dvIP_DEVICE.PORT,cIP_ADDRESS,nPORT_NUMBER,IP_TCP)
(***********************************************************)
(*                THE EVENTS GO BELOW                      *)
(***********************************************************)
DEFINE_EVENT
DATA_EVENT[dvIP_DEVICE]
{
ONLINE:
{
 nCONNECTION = 1
} 
OFFLINE:
{
 nCONNECTION = 0
 // REOPENS CONNECTION IF DROPS
 IP_CLIENT_OPEN(dvIP_DEVICE.PORT,cIP_ADDRESS,nPORT_NUMBER,IP_TCP)
}
ONERROR:
{
 IpError (DATA.NUMBER) // SENDS STRING TO DIAGNOSTICS ON ERROR
}
}
(***********************************************************)
(*            THE ACTUAL PROGRAM GOES BELOW                *)
(***********************************************************)
DEFINE_PROGRAM
(***********************************************************)
(*                     END OF PROGRAM                      *)
(*        DO NOT PUT ANY CODE BELOW THIS COMMENT           *)
(***********************************************************)

Related Videos

guide inquiry

Was this article helpful?

Yes
No
Give feedback about this article

Table of Contents

Brand: Models: Question:   Answer: Download: 822-DL1-IP_Error_Reporting.zip

Related Articles

  • AMX Subroutine Name Length
  • How To Send DGX Shell Commands From NetLinx Code
  • How to use #IF_DEFINED to set pre-compile conditions
  • Using a NetLinx Master to Monitoring a System
  • Using an Active Bargraph to Control Levels by Touching the Bargraph

Related Articles

  • AMX Subroutine Name Length
  • How To Send DGX Shell Commands From NetLinx Code
  • How to use #IF_DEFINED to set pre-compile conditions
  • Using a NetLinx Master to Monitoring a System
  • Using an Active Bargraph to Control Levels by Touching the Bargraph
Copyright © HARMAN Professional. All rights reserved. Privacy Policy | Terms of Use
Expand