---
title: Connect a Device
slug: bhdo/connect-a-device
createdAt: 2022-05-13T19:50:45.000Z
---

You can connect devices by navigating to **DeviceHub&#x20;**> **Devices**.&#x20;

# Before You Begin

Make sure you configure the physical device and collect the appropriate connection parameters. Refer to the [Industrial Systems Connection Guide](https://public-docs.litmus.io/bhdo/industrial-systems-connection-guide) and locate your device for specific instructions.&#x20;

# Step 1: Select Device to Connect

You will first need to select the device type you want to connect and enter a name and description.&#x20;

**To connect a device:**

1. From th&#x65;*&#x20;DeviceHub* pane, click the **Connect a Device** box.&#x20;
   The *Connect Device* dialog box appears.

   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/AWO6zT2ol3JRIXQ1sLSgR_adddeviceicon.png" size="80" width="1316" height="527" caption="Connect a Device box" position="center" showCaption="true"}
2. Click the **Device Type** drop-down list and select a Device Type from the list.
3. Click the **Driver Name** drop-down list, and select a Driver Name from the list.
4. Enter a name and description for the device. The name can have numbers, uppercase and lowercase characters, and special characters. It can't start or end with whitespaces.&#x20;

# Step 2: Define Device-Specific Parameters

Depending on the type of device you are connecting, you will need to define specific parameters.&#x20;

Refer to the following resources for information on specific drivers and use cases:

- [Industrial Systems Connection Guide](https://public-docs.litmus.io/bhdo/industrial-systems-connection-guide)
- [DeviceHub Use Cases](https://public-docs.litmus.io/bhdo/devicehub-use-cases)&#x20;
- [Gen1 and Gen2 Driver Differences](https://public-docs.litmus.io/bhdo/gen1-and-gen2-driver-differences)&#x20;

### Device Discovery Tool

Depending on the device and driver you select, you may have the option of using the [Device Discovery Tool](https://public-docs.litmus.io/bhdo/device-discovery-tool), which searches for devices and pre-fills network parameters to connect the device to Belden Horizon Data Operations.&#x20;

Refer to the table below for the required and optional parameters for device types.&#x20;

| **Device Type**             | **Required and Optional Parameters**                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ethernet device<br /><br /> | - **Network Address:** Enter a network address. This is the IP address for the device.<br />- **Network Port:** Enter a network port.<br />- **Slot Number&#x20;**(Optional): Enter a value that indicates the position of the CPU located in a slot.                                                                                                                                                                           |
| Serial device<br /><br />   | - **Communication Port:&#x20;**&#x45;nter up to three characters, and then select an available port.<br />- **Baud Rate** (Optional): Enter a value.<br />- **Data Bits**: Enter a value.<br />- **Parity&#x20;**(Optional): Select a value from the drop-down list.<br />- **Slot Number** (Optional): Enter a value that indicates the position of the CPU located in a slot.<br />- **Stop Bits** (Optional): Enter a value. |
| CAN device<br /><br />      | - **Channel:** Make sure that there is a can bus module already available as a part of the hardware by checking that there is a value in the field.<br />- **Bit Rate:** Enter a value.                                                                                                                                                                                                                                         |
| File-based device<br />     | - **Path:** Enter the shared path.<br />- **Min Req Number** (Optional): Enter a value.<br />- **Max Req Number** (Optional): Enter a value.                                                                                                                                                                                                                                                                                    |

# Step 3: Define Optional Parameters

You can select optional parameters for your device connection.&#x20;

## Meta Data

The *Meta Data&#x20;*&#x6F;ption summarizes basic information about data. It enables you to define key-value pair data for the device output payload later on. It can then be used to find, use, and reuse particular instances of data.

See [Device and Tag Metadata Use Case](https://public-docs.litmus.io/bhdo/device-and-tag-metadata-use-case) to learn more. &#x20;

If you select the **Meta Data&#x20;**&#x63;heckbox, the section expands with parameters to complete. By default, the list of Meta Data key-value pairs displays *No records defined*.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/6FaLUzMqRl6yuFKKNHm4U_image.png" size="80" width="1136" height="732" caption="The Meta Data section" position="center" showCaption="true"}

**To define meta tags:**

1. In the *Key&#x20;*&#x66;ield, enter the meta tag key.&#x20;
2. In the *Value&#x20;*&#x66;ield, enter the meta tag value.&#x20;
3. Click **+ Add**.&#x20;
4. Continue adding key-value pairs you want to add.&#x20;

## Status Register

The *Status Register* option allows you to define a register for keeping track of the device status (either connected or disconnected).&#x20;

See [Status Register Use Case](https://public-docs.litmus.io/bhdo/status-register-use-case) to learn more.&#x20;

If you select the **Status Register** check box, the section expands.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/Y8JXAnbIy88ABzLTieTZn_image.png" size="80" width="1164" height="772" caption="The Status Register section" position="center" showCaption="true"}

**To define the Status Register option:**

Depending on the device and your selections for *Name&#x20;*&#x61;nd *Value Type*, the following parameters may have to be configured:

- **Name**: Depending on the device, either enter a name or select from the drop-down list.&#x20;
- **Value Type**: Select the register data type.
- **Polling Interval**
- **Description**
- **Address**
- **Formula**
- **Min Value**
- **Max Value**
- **Count**: Enter the array size, so that you can read an array from the selected register.&#x20;

As long as the above register responds to polling by DeviceHub, the device appears in the UI as
*Connected*, regardless of the status of any other tags added to that device.

## Enable Alias Topics

The *Enable alias topics* option allows you to substitute long, unreadable device and tag IDs with human-readable device and tag names in topic names. See [Default Topics and Descriptions](https://public-docs.litmus.io/bhdo/default-topics-and-descriptions) for more information.&#x20;

For Belden Horizon Data Operations version 3.5.2 and later, the **Enable alias topics** check box is selected by default. &#x20;

:::hint{type="info"}
**Notes:**

- When you enable alias topics, DeviceHub stops publishing to raw topics and publishes only to alias topics.
- Belden Horizon Data Operations substitutes all special characters in aliases with "\_" (underscore).
- When alias topics are enabled for a device, you can't use batch write topics. To use batch write topics, you must not select the **Enable alias topics** check box in the device configuration. See [Default Topics and Descriptions](https://public-docs.litmus.io/bhdo/default-topics-and-descriptions) for more information.&#x20;
:::

## Enable Data Store

The Enable Data Store option allows you to define how long you want to store data locally.&#x20;

To enable this option, select the **Enable Data Store** check box, and then define the number of hours in the **Retention Hours** field.&#x20;

After creating the device, a data store icon appears in the top-right corner of the device tile.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/N7_pDCKBhSYHHCzIRc_s9_image.png" size="60" width="428" height="328" caption="The Enable Data Store icon" position="center" showCaption="true"}

## Enable Logging

:::hint{type="info"}
**Note**:&#x20;

- The Logs feature is available for Belden Horizon Data Operations version 3.5.2 and later.&#x20;
- If you download a file a logs, the file will have a maximum of 50 entries.&#x20;
:::

The Enable Logging option is available only for Gen 2 drivers. Once you connect the device, click the device tile and select the **Logs&#x20;**&#x74;ab to view the log.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/tKVh_Gd-95oyjoFT6Y9NE_image.png" size="80" width="1599" height="642" caption="Logs tab" position="center" showCaption="true"}

# Step 4: Create Device

When done defining the new device, click **Add Device**. A tile for the new device appears in the *Devices&#x20;*&#x70;ane. A green **CONNECTED** indicator means that a connection to the device has been established. You can stop a device to disconnect it.&#x20;

