Connecting to a Phidget SBC Directly by IP Address in Phidget22

Daniel Price2 min read
Industrial NetworkingOther ManufacturerTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Direct IP Connection Overview

In Phidget22, a Phidget SBC does not need to be discovered through the local network server list to be reached. The Networking API lets you register a remote server explicitly by IP address and port, then target that server when opening a channel. This is the supported method when the SBC sits on a known, static address and you want a deterministic connection target instead of relying on discovery.

Registering the SBC with AddServer

Call AddServer from the Phidget22 Networking API and pass the server's name together with the SBC's IP address and port. The server name you supply here is an application-side identifier; it becomes the handle you reference later when opening devices on that SBC.

// Generic Phidget22 pattern — adapt to your language binding
Net.AddServer(serverName, ipAddress, port, password, flags);

Opening a Phidget Against That Server

When opening the Phidget channel, set the ServerName property to the exact same name you gave the server in the AddServer call. Phidget22 then routes the open request to the SBC at that registered IP address and port rather than searching locally.

// Match ServerName to the name used in AddServer
channel.ServerName = serverName;  // same name registered above
channel.Open(timeout);

Verification

Confirm the Open call completes without a timeout and that the attached event fires for the expected device. If the open fails, verify the IP address and port used in AddServer match the SBC's actual network configuration and that the name passed to ServerName is identical to the registered server name.

FAQ

How do I connect to a Phidget SBC at a specific IP address in Phidget22?

Use the Networking API's AddServer call to register the SBC by IP address and port, then set the channel's ServerName property to the same server name before opening the Phidget.

Which Phidget22 API registers a network server by IP and port?

The AddServer function in the Phidget22 Networking API. It takes a server name along with the target IP address and port, creating an application-side reference for later channel opens.

Why does my Phidget channel fail to open after calling AddServer?

Check that the ServerName property on the channel exactly matches the name used in the AddServer call, and confirm the registered IP address and port match the SBC's actual network settings.

Back to blog