Industrial ControllerOPTO22 SNAP UP1 ADS Read Network Settings Using LINUX

Introduction: Industrial ControllerOPTO22 SNAP UP1 ADS Read Network Settings Using LINUX

About: Projects, Articles & tech reviews for Home & Industry


Opto22 and its industrial hardware is known for its openness in protocols, documentation and bug reports. The haven't a complete Linux based suite to work with their equipment, however they produced some specific linux apps!.

For more info, please visit:


Here is the list for the required components for this project with the absolute lowest prices! If you find something cheaper somewhere, please msg me!

Step 2: SNAP UP1 ADS


This device is a combination of a controller (CPU) and I/O. This is not an Opto22's last generation equipment, and is not recommended for new designs, however still in production and supported. Due to its great flexibility to program diverse communication protocols, it's very attractive for developing Internet Of Things (IoT) gateways

The SNAP UP1 ADS have an on-board Ethernet. Its primary use is for general setup, download of control strategies and remote monitoring HMI. When the controller is in an Ethernet network, the manufacturer provides a Windows app named PAC MANAGER (part of a PAC PROJECT free suite), used to detect devices plugged into the network.

The main problem with the application, is that the device must have similar network settings to the computer running the app! (same network segment settings).If not the device isn't detected. If the network parameters of the device are unknown, there are only 2 alternatives:

  • Reset device to default settings to set a new known network parameters (erasing control strategy and other configurations)

  • Use another application via serial port to get the parameters

The application is OptoFlash-ENET, used to read and modify network parameters, get hardware info and update firmware for compatible devices: SNAP Ethernet brains, SNAP Ultimate and M4SENET-100 card

To communicate the application with the device a serial cable must be built. If there is no available serial port in the computer an USB to RS232 cable could be used, and if no solder is desired a convenient way is to use a DB-9 breakout connector!



OptoFlash-ENET uses an ASCII protocol to establish communications with the hardware. ASCII protocols are easy to analyse and the app provides a debugging window where all the communication frames can be seen. The app does 3 things:

1. Send "Power Up Clear" command

2. Send Hardware info query

3. Send Network Settings info query

Opto22 literature says "power up clear" command clears a flag that is set every time a controller is turned on or rebooted. With this flag the monitoring app knows that something happened. If the acknowledgement of power up isn't sent, the controller refuses to execute any other command, so the application sends power up clear before any other query.

"power up clear" frame:


Last four digits are CRC-16

Network settings query frame


Again last four digits are CRC-16.



In the debugging window of OptoFlash-ENET app is noted that the serial communication parameters are 19200,8,N,1. Pretty common setup in industrial hardware!

Due to the communication frames are ASCII representation of HEX numbers, a serial port terminal program in Linux able to send characters is enough to establish communication.In this case CUTECOM was used

First "power up clear" command must be sent


The device’s answer similar to this:



Next, network settings info query is sent:


The device’s answer similar to this:

>00010420AAAA000000000000E55C >00010410AAAAFFFFF0200000004A00000101000000000001050002004000008F070107D20100000 0C0A80268FFFFFF00C0A8020100000000000000000000000000000000FFFFFFFF008900170000000 00079FFFF00A03D007DC15952

The windows app showed the actual network parameters, so there is known strings to search in the received frames, the most obvious is:

>00010420AAAA000000000000E55C >00010410AAAAFFFFF0200000004A00000101000000000001050002004000008F070107D20100000 0C0A80268FFFFFF00C0A8020100000000000000000000000000000000FFFFFFFF008900170000000 00079FFFF00A03D007DC15952

Which is the MAC shown in the Windows app

As the frame is the ASCII representation of HEX numbers, IP address and other network parameters must be encoded in that way!.

OptoFlash-ENET ip address displayed as encoded in HEX: C0A80268. Looking for this string in the received frame:

>00010420AAAA000000000000E55C >00010410AAAAFFFFF0200000004A00000101000000000001050002004000008F070107D20100000 0C0A80268FFFFFF00C0A8020100000000000000000000000000000000FFFFFFFF008900170000000 00079FFFF00A03D007DC15952

Looking closely the following characters FFFFFF00C0A80201 are HEX representation of and so the blocks that match actual network parameters settings were found!. The remaining characters in the frame probably are another info not shown in OptoFlash-ENET or are placeholders to add more information in the future.

This information is the first step to develop a Linux app that automatizes de process of sending, receiving and frame analysis

More test with different hardware models are required to see if the frame structure and size is the same, or if is different for other type of hardware

For more info, please visit:

Be the First to Share


    • Fruits and Veggies Speed Challenge

      Fruits and Veggies Speed Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Stone Concrete Cement Contest

      Stone Concrete Cement Contest