API Codec Quick Start Guide - NCD - Io
API Codec Quick Start Guide - NCD - Io
io)
Jacob Youngblood(https://ncd.io/author/jacob/)
March 1, 2017(https://ncd.io/2017/03/01/) 5:24 pm
Device Identification
Not all controllers support the API Codec. Click Device Identification
and look at the API Support status field. All NCD devices with
firmware version 3.2 or later will support API Communications. If
your controller supports the API Codec, the word “Supported” will be
displayed as shown below:
API in Base Station
Beginning with Version 3.2 of Base Station, the Base Station software
attempts to communicate all commands in API format if API mode is
supported. The “Use API Mode when Possible” check box will be
checked by default and all subsequent portions of Base Station will
communicate in API mode when possible.
The top of all forms that support API will indicate (API Mode) as
shown here indicating all communication is formatted in API Format.
You may turn this off by unchecking the “Use API Mode when
Possible” on the main Base Station screen.
The API decoded data that you actually want to obtain and use is
shown at the bottom text field (102 48 48 38 21 22 10 255).
Standard Command
Send Bytes: Byte 1: Byte 2:
Receive Byte: 85
Byte 1: 170 (API Header) Enter API Encoding Format Command
Byte 1: 170 (API Header) Controller will encode the Response
Beginning with 170 as a Header
Byte 3: 86 (Payload) 86 is the actual data byte you will receive
from the controller
Checksum Notes
Some standard commands (Non-API) may require a Checksum to
process properly. This checksum must be wrapped into the API
Codec, so essentially these commands will have two checksums. The
first checksum will be required as part of the original command, the
second checksum will be required by the API Codec. Make sure both
checksums are included or the API Codec will not function properly.
Testing for API Support
To ask the controller if API Mode is supported, read EEPROM
Location 246 and Test Bit 8 (the most significant bit). If Bit 8 is High,
API is supported by the controller. Please refer to the EEPROM Quick
Start Guide for complete details.
Updated API Structure for E3C
DropNet Devices
In September of 2015, an updated API Protocol was introduced to
cover E3C DropNet Devices, which is included with ALL devices sold
as E3C DropNet Devices. The current API Protocol is still valid, and
works with all DropNet devices without interruption; however, a
shortcut was introduced to consolidate device targeting and
command processing as a single unified command. By using the
updated API Structure, users may effectively target and control a
device using one command. Older versions of firmware required two
commands: One for targeting a device and one for controlling a
device. Using the updated API Structure for E3C DropNet Devices,
you can effectively double communication speed with minimal
changes to the API Structure.
This portion of the guide explains the updated API Packet Structure:
SUPPORT TOOLS
Follow(https://store.ncd.io/wp-
Travis json/follow/v1/travis)
Follow (https://store.ncd.io/wp-
DeeAnnjson/follow/v1/deeann)
Follow (https://store.ncd.io/wp-
Bhaskarjson/follow/v1/bhaskar)
Load
(https://store.ncd.io/wp-
Travis's
json/cart/v1/travis)
Cart
Load
(https://store.ncd.io/wp-
DeeAnn's
json/cart/v1/deeann)
Cart
Load
(https://store.ncd.io/wp-
Bhaskar's
json/cart/v1/bhasker)
Cart
(https://ncd.io/contact-us)
ncd.io
(https://ncd.io/contact-us)
( p
(866) 960-1270 (https://ncd.io/contact-us)
)
National Control Devices, LLC
(https://ncd.io/contact-us)
Open 9AM to 4:30PM CST
(https://ncd.io/contact-us)
(htt
(htt
ps://
©2021 (https://ncd.io/contact-us)
ww ps:// (htt (htt
w.yo ww ps:// ps://
utub w.fa twitt gith
e.co ceb er.c ub.c
m/u ook. om/ om/
ser/I com ncdi ncd-
ORe /ncd ot) io)
lay) .io)
(https://ncd.io/why-choose-ncd/)
(https://ncd.io/info/warranty-return-policy/)
(https://ncd.io/iso-9001-certification/)
(https://ncd.io/about-us/)
(https://ncd.io/info/shipping-
information/)