Using the NAI Software Support Kit 2.X

This guide will explain how to use the NAI Software Support Kit 2.X alongside other tools from NAI to develop your application.

NAI SSK 2.x is intended for use with boards such as: 68G6, 68ARM2, 68ARM4, 68INT6, NIU3A.

If you have not already NAI recommends using the NAI Embedded Soft Panel to kickstart development. Via a GUI it allows users to quickly configure and operate NAI products. The API Logger tool within the NAI Embedded Soft Panel will allow you to kickstart writing your program as it will record the API calls made as you use the GUI to configure and operate your hardware.

If you do not yet have your hardware you can still use the NAI Embedded Soft Panel to kickstart your development via the Demo Panel.

If you do not yet know details about your hardware and have already started using the NAI Embedded Soft Panel you can skip to Starting Development. If you want help setting up the environment you can simply pick your preferred OS and follow the corresponding instructions before continuing to Starting Development. The code you write will be fully portable.

To download the NAI Software Support Kit click here.

Environment Setup

These sections will explain how to setup your environment to begin development for your chosen OS. If you do not know what OS you will use yet simply pick your preferred OS, all written .c files will are fully portable.

Starting Development

If you have not already NAI recommends using the NAI Embedded Soft Panel to kickstart development. Via a GUI it allows users to quickly configure and operate NAI products. The API Logger tool within the NAI Embedded Soft Panel will allow you to kickstart writing your program as it will generate and save the API calls you make via the GUI as you configure and operate your hardware.

Now that your enviroment is set up and your project has been configured according to your hardware you can begin development. If you do not know yet what hardware you will be using you can begin development now and go through configuration later. The development process is universal for all configurations.

For development we will be using the NAI Software Support Kit.

Software Support Kit 1.X Library API Documentation

Software Support Kit 2.X Library API Documentation

NAI recommends that you begin with our selection of sample applications. The full collection can be found here.

First select a sample application from the family that you wish to develop for. For the sake of example we will use the discrete I/O family. The particular file we are using is DT_BasicOps.c

While the precise functionality is specific to the discrete I/O family, most sample applications use a similar structure.

For more generic board level functionality NAI offers guides on interrupts, watchdog timers, NAI ethernet protocols, BIT, multicore applications, and backplane reset.

Setup Menu

While reading this section please read along in the source code here at the same time to best understand how to then develop your own application.

Once you run the sample application you will be presented with a configuration menu. The first question will ask what your system is.

  • Nano

A Nano unit is a small, rugged multifunction I/O system.

nano NIU2A NIU1A

  • SIU

An SIU is a large rugged system containing multiple open backplane boards.

siu SIU34 SIU32S

  • Board

A board is a single board computer.

In this example we are using a board so we input B. We then selected the board we were using, a 75G5.

To connect you then must enter what ethernet protocol you are using, your type of ethernet port, and the IP address of the board.

If all of the above information was correct you will then connect to the board and see the following configuration menu.

Please then select which module you would like to configure.

We then selected which channel we would like configure and the following configuration menu opened, containing all of the settings to configure the module’s channel.

As an example we then selected DT Set Lower Threshold Voltage and made our configuration change.

With this sample application as the basis please refer to other sample applications for more information.

While this sample application was a configuration app there are also specific examples of how to use features of a given module.

For example if you want to implement ethernet IDR with discrete I/O NAI offers a corresponding sample application.

For more generic board level functionality NAI offers guides on interrupts, watchdog timers, NAI ethernet protocols, BIT, multicore applications, and backplane reset.

Once you have completed your application and want to test it it is time to build and export your program.

Connecting to the System

To learn how to get connected via the Software Support Kit please click here.

To set up a remote serial and ethernet connection please follow the following steps.

Remote Connection

The serial connection and Ethernet port are accessed through the HDMI connector on ARM target boards. For ruggedized ARM enclosures, both ports are routed to a MIL connector. You may need an external adapter board (see below) to convert the HDMI connector to a serial and Ethernet port.

CAUTION

Ensure that target board is powered off, until directed to power it on.

HDMI ConnectorMIL Connector

Note

The USB-A connector on the adapter board is not supported by the ARM target board.

Adapter Board

Serial Port

    1. Install minicom through the terminal:
|$ sudo yum install minicom
  1. Check for all available serial ports:
|$ dmesg \| grep tty
  1. Run minicom with the desired serial port.
|$ sudo minicom -s /dev/<Serial Port>
  1. Select ‘Serial port setup’
  1. Set Serial Device to the serial port name found by using the dmesg | grep tty command. Leave Calling Program and Callout Program empty. Set Bps/Par/Bits to 115200 8N1. Set Hardware Flow Control to ‘No’. Set ‘Software Flow Control to ‘No’. Next to ‘Change which setting?’ type in the letter of the setting that will be altered. Press ‘Enter’ to exit ‘Serial port settings’

  2. Select ‘Save setup as _dev_ttyUSB0’ in the main configuration menu.

  1. Select ‘Modem and dialing’ in the main configuration menu.

  2. Every setting from A to H should be empty.

  1. Select ‘Exit’ and then Power Cycle the board.

Ethernet Port

  1. Connect the Ethernet port from target board and Host PC to a local network.
  2. Open shell terminal on Host PC and type the following command:
ssh root@<IP address of the target board>

Note

The default IP address of the target board is available on the label or it can be obtained by running the ifconfig command from shell terminal.

Changing the Ethernet IP Addresses

The target board contains 2 Ethernet Interfaces. Each Ethernet Interface is assigned a unique MAC address and static IP address. The MAC addresses and static IP addresses are stored on the motherboard EEPROM. The static IP address can be changed using an EEPROM update utility provided with the unit. The MAC addresses should not be changed.

To access the EEPROM utility from the Linux shell terminal, proceed as follows:

  1. Log in as a root user to the target board. The default password is root.
  2. Display the MBCore version by typing:

naiMBEEPROMUtil version

  • The following information will display:
root@68arm2-bsp:~# naiMBEEPROMUtil version


===================== MBCore ===================================================
  ExecutionContext:                 Platform ARM-P0 ULTRASCALE+ Master Linux
  Application Built For Target:     68ARM2
  Application Name:                 naiMBEEPROMUtil
  Application Revision:             1.0
  Application Build DateTime:       May 22 2025  10:26:58
  MBCore-Lib Build Revision:        00004.00197
  MBCore-Lib Build Date:            May 22 2025  10:26:55
  NAIBSP Lib Version:               2.23
--------------------------------------------------------------------------------

  1. Then, display the contents of the motherboard EEPROM by typing:

naiMBEEPROMUtil formatteddisplay

  • The following or something similar (your model may vary) displays:
root@68arm2-bsp:~# naiMBEEPROMUtil formatteddisplay

Displaying Motherboard EEPROM - Formatted - Start
naibsp_dev_eeprom_Read() 128 bytes succeeded on A-cycle attempt# 1

naibsp_dev_eeprom_Read() 128 bytes succeeded on B-cycle attempt# 1

Displaying Motherboard EEPROM Data - Formatted
  0000:  MB Special Option Code  :NONE:
  000c:  MBStartupInitOnlyFlag  :0:
  000e:  ARM Processor Count  :1:
  0010:  Product Serial No  :0:
  0014:  Platform  :68:
  0018:  Model  :ARM:
  001c:  Generation  :2:
  0020:  Processor Count  :1:
  0022:  Ether Interface Count  :2:
  0024:  Module Slot Count  :3:
  0026:  ARMPlatform  :Xilinx2:
  0028:  Eth-A MAC  :aa:bb:cc:dd:ee:ff:
  002e:  Eth-A Misc Settings  :StaticIP:enabled, AutoNeg:On, Speed:autoneg, Duplex:autoneg
  0030:  Eth-A Name  :eth0:
  0038:  Eth-A IPv4Address     :192.168.1.16:
  003c:  Eth-A IPv4SubnetMask  :255.255.255.0:
  0040:  Eth-A IPv4Gateway     :192.168.1.1:
  0044:  Eth-A IPv6Address  :2002:c0a8:0101:0000:7c99:d118:9058:1235:
  0054:  Eth-A IPv6Prefix  :64:
  0058:  Eth-B MAC  :11:22:33:44:55:66:
  005e:  Eth-B Misc Settings  :StaticIP:enabled, AutoNeg:Off, Speed:1000 Mbps, Duplex:??
  0060:  Eth-B Name  :eth1:
  0068:  Eth-B IPv4Address     :192.168.2.16:
  006c:  Eth-B IPv4SubnetMask  :255.255.255.0:
  0070:  Eth-B IPv4Gateway     :192.168.2.1:
  0074:  Eth-B IPv6Address  :2002:c0a8:0102:0000:7c99:d118:9058:1235:
  0084:  Eth-B IPv6Prefix  :64:
  0089:  OpMode Listeners at Startup  :0x0f: (TCP1-Yes, TCP2-Yes, UDP1-Yes, UDP2-Yes)
  0094:  OpMode TCP1 Port  :52801:
  0096:  OpMode TCP2 Port  :52802:
  0098:  OpMode UDP1 Port  :52801:
  009a:  OpMode UDP2 Port  :52802:
  009c:  ConfigMode TCP1 Command Port  :52710:
  009e:  ConfigMode TCP1 File Port     :52711:
  00a0:  ConfigMode TCP2 Command Port  :52720:
  00a2:  ConfigMode TCP2 File Port     :52721:
  00a6:  EthAEthB IPv4 Address Assignment Alg :0000:  (EthA-00 - NONE)  (EthB-00 - NONE)
  00ac:  MB EEPROM Schema Revision Major :4:
  00ae:  MB EEPROM Schema Revision Minor :4:
  00c0:  LabelSerialNo  :N4315170005:
  00d0:  LabelPartNo    :68ARM2-IO-C-B003:
  00e8:  LabellRevision :C6:
  00ec:  LabelDateCode  :2425:
  00fc:  MB EEPROM CRC-32  :e8bb75be:

Displaying Motherboard EEPROM - Formatted - End

As you can see, the current Eth-A IPv4Address prints as 192.168.1.16.

As you can see, the current Eth-B IPv4Address prints as 192.168.2.16.

To update the static IP addresses, enter the following commands (substitute your desired IP addresses):

root@68arm2-bsp:~# naiMBEEPROMUtil set EthA_IPv4Address 192.168.1.16

root@68arm2-bsp:~# naiMBEEPROMUtil set EthA_IPv4SubnetMask 255.255.255.0

root@68arm2-bsp:~# naiMBEEPROMUtil set EthB_IPv4Address 192.168.2.16

root@68arm2-bsp:~# naiMBEEPROMUtil set EthB_IPv4SubnetMask 255.255.255.0

The updated IP addresses will take effect on the next system reset.

CAUTION

The naiMBEEPROMUtil program will allow you to erase the entire contents of the EEPROM. DO NOT do this as it will erase important system parameters including the Ether Interface MAC addresses. The ARM board will not function without these settings.

DO NOT alter any of the other EEPROM fields as the ARM board will not function without the correct settings.

Building and Running a Project

Running from the System

If you do not want to use your host pc terminal and would like to run an application you have loaded onto your single board computer, NAI SIU, or NAI NIU follow this guide.