EC300 User Manual

EC300 User Manual

Edge Computer EC300 Series

User Manual

(Applicable for IEOS V2.0.0 and above)

Version1.1, February 2024

www.inhand.com

The software described in this manual is provided according to the license agreement and can only be used according to the terms of the agreement.

Copyright Notice

© 2024 InHand Networks.All rights reserved.

Trademarks

The InHand logo is a registered trademark of InHand Networks.

All other trademarks or registered trademarks in this manual belong to their respective manufacturers.

Disclaimer  

InHand Networks reserves the right to change this manual, and the product is subject to subsequent changes without prior notice. We will not be responsible for any direct, indirect, intentional, or unintentional damages and hidden dangers caused by improper installation and use.

1 Introduction

This user's manual is for the Arm architecture based edge computer EC300 and covers a complete set of instructions for all supported models. Before referring to these chapters, verify that the hardware specifications of your computer model support the features covered.

In order to facilitate user configuration, InHand has developed a set of IEOS system programs, providing a web interface, users can easily through the web network management and system management, The IEOS is based on debian 11, so it can use native Linux commands for network management and system administration.but it should be noted that when the IEOS function is enabled, IEOS will take over the network management and system management. At this time through the Linux native command for network management and system management may fail; IEOS is enabled by default, if users need to perform network management and system management based on Linux native command line, they need to close IEOS first.

2 Hardware installation instructions 

In this chapter, we will cover the external interface instructions of EC300, an edge computer based on Arm architecture.

2.1 Introduction

The following sections describe the application of external connectors and pin assignment.

2.2 EC300 panel

2.2.1 Front panel

2.2.2 Left panel

2.2.3 Right panel

2.3 EC300 external interface

2.3.1 Ethernet

This is a dual RJ45 connector for Ethernet connection

The EC300 has 2 RJ45 Ethernet ports and supports 10M/100M adaptive rates.

Yellow light: LINK indicator light, the end device is on when the interface is 1000M, and the end device is off when the interface is 10/100M.

Green light: ACT light, flashing when there is data

2.3.2 Serial port

EC300 supports up to four serial ports: two standard serial ports and two expandable serial ports.

COM1(standard): RS-232 / RS-485 (RX1 TX1 / A1 B1),you can only choose to access RS-232 or RS-485 at the same time, they can't work at the same time.

COM2(standard): RS-485 (A2 B2)

COM3(extensible): RS232 / RS485 (Extended interface PIN1   Extended interface PIN2)

COM4(extensible): RS232 / RS485 (Extended interface PIN5   Extended interface PIN6)

2.3.3 CAN

The EC300 optionally supports the expansion of up to 3 CAN bus interfaces, compatible with CAN 2.0A/B standard and CAN FD, with a maximum speed of 5Mbps.

CAN1: Extended interface PIN1   Extended interface PIN2

CAN2: Extend interface PIN5   Extend interface PIN6

CAN3: Expand interface PIN9   Expand interface PIN10

2.3.4 Digital Input interface 

Parameter

Description

Min

Type

Max

Unit

Vds

Drain source voltage

48

V

VIN Low

Maximal input voltage recongnized as LOW

3

V

VIN High

Minimal input voltage recognized as HIGH

10

30

V


Interface identification

Features

Description

GND

Power reference ground

4 digital input DI,

Wet contact state


"1":+10~+30V/-30 ~ -10VDC

"0": 0 ~ +3V/-3 ~ 0V

Isolate 3000VDC

DICOM

Input public side

DI0

Digital input port 0

DI1

Digital input port number 1

DI2

Digital input port number 2

DI3

Digital input port number 3


Typical wiring example(Only wet nodes are supported)

2.3.5 Digital Output Interface 

Interface identification

Features

Description

DO0

Digital output port 0

4 DO OD output, isolated 3000VDC

DO1

Digital output port number 1

DO2

Digital output port 2

DO3

Digital output port No. 3

GND

End of ground


Typical wiring example

2.3.6 USB

The EC300 provides a USB 2.0 Host port.

2.3.7 LED

EC300 has 8 LED lights to indicate the power supply and system operation status respectively.

Signage

Name

Definition

PWR

Power indicator

Power on and always on

STATUS

System operating status indicator light

When the system starts normally, the STATUS blinks. If the system fails to start due to an exception in the system startup phase; Or when the factory recovery operation has not been completed, STATUS is long out.

WARN

Warning indicator light

When a warning anomaly occurs in the system, the WARN light flashes. Warning anomalies include: the system is being upgraded, factory reset has not been completed yet, and there is an abnormal dialing (cellular function needs to be enabled).

NET

Cellular connection status indicator

Dialing function not enabled, extinguished.


Dialing in progress, flashing.


Dialing successful, constantly lit.

User1

User programmable indicator light 1

It is off by default and can be controlled by user programming

User2

User programmable indicator light 2

It is off by default and can be controlled by user programming

User3

User programmable indicator light 3

It is off by default and can be controlled by user programming

User4

User programmable indicator light 4

It is off by default and can be controlled by user programming

2.3.8 User programmable keys

ARM computers provide programmable buttons, which are provided to users for development and use using the event event process. The event corresponding to the button is /dev/input/event0.

2.3.9 DC input

The EC300 supports 9 to 48V DC input

2.3.10 SIM card slot

The EC300 supports 2 SIM card slots, and the SIM card needs to be installed with power off by pressing the SIM card into the slot.

2.3.11 MicroSD card slot

The EC300 has a slot for the MircoSD card, SD does not support hotplugging and needs to be plugged in and out with power off.

2.3.12 Restore the factory keys

There is a reset button for the system to restore the factory. Refer to The system restores factory Settings to do so.

2.3.13 Antenna interface

There are 5 antenna interfaces in EC300, and the number of antennas standard with different models is different. Screw the antenna into the corresponding antenna interface to complete the antenna installation.

Identification

Name

ANT1

4G LTE main antenna /5G antenna

ANT2

4G LTE diversity receive antenna /5G antenna

GPS

GPS antenna(Please use passive GPS antenna)

Wi-Fi

WiFi antenna

Lora

Lora antenna

2.3.14 Extended interface

EC300 can support interface extension. See the product specification for details of the selection. At present, the extension modules supported are as follows:
Extension module
Feature
NAAD
2x 4-20mA analog input+4x DI+4x DO
N44C
2x RS-485+1x CAN FD
N4CC
1x RS-485+2x CAN FD
N44D
2x RS-485+4x DI+4x DO
NONE

The extension interface is defined as follows:


PIN

Extension module&Interface Definition

NAAD

N44C

N4CC

N44D

1

AIN1+

A_485_A

A_485_A

A_485_A

2

-

A_485_B

A_485_B

A_485_B

3

AIN1-

-

-

-

4

GND

GND

GND

GND

5

AIN2+

B_485_A

CAN2_H

B_485_A

6

-

B_485_B

CAN2_L

B_485_B

7

AIN2-

-

-

-

8

GND

GND

GND

GND

9

-

CAN3_H

CAN3_H

-

10

-

CAN3_L

CAN3_L

-

11

DO0

-

-

DO0

12

DO1

-

-

DO1

13

DO2

-

-

DO2

14

DO3

-

-

DO3

15

DI0

-

-

DI0

16

DI1

-

-

DI1

17

DI2

-

-

DI2

18

DI3

-

-

DI3

19

DI_COM

-

-

DI_COM

20

GND

-

-

GND

3 Getting Started

In this chapter, we will cover the basic configuration of EC300, an edge computer based on Arm architecture.

3.1 Connect to the EC300

You will need a computer that you can use to connect to the EC300 and log in to the command line interface. It can be connected by means of an Ethernet cable.

Factory default username and password:

Username: edge

Password: security@edge

EC300 devices are factory created root by default, but login is disabled. If you need to use the root user, change the system configuration manually and type sudo -s to switch to the root user. The user edge is in the sudo group, so you can use sudo under the edge user to execute system-level commands. See the sudo Mechanism section in Chapter 5 for additional details.

Tips:

When command not found appears, type sudo -s to switch to the root user or use the sudo command to operate.

Note:

For security reasons, we recommend that you disable the default user account and create your own.

3.1.1 Connecting via the SSH Console

The EC300 supports SSH connections over Ethernet. Connect to the EC300 using the following default IP address.

Port

Default IP

ETH 1 

192.168.3.100

ETH 2 

192.168.4.100

3.1.1.1 Linux users

Tips

These steps apply if you are connecting to EC300 on a Linux PC. Please do not apply these steps to the EC300 device itself. Before you run the ssh command, be sure to configure your PC's Ethernet port IP address to be within a specific range. ETH1:192.168.3.0/24, ETH2:192.168.4.0/24.

Use the ssh command to access the ETH1 port of the EC300 on a Linux PC.

Type yes to continue to complete the connection.

When the terminal prompt edge@edge-computer:~$appears and shell commands can be entered, the connection is successful.

3.1.1.2 Windows users

Tips:

These steps apply if you are connecting the EC300 on a Windows PC. Please do not apply these steps to the EC300 device itself.

Make the following steps on your Windows PC

Click the link http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html, download PuTTY (free) software, SSH command in Windows environment to establish a connection to the edge computer EC300. The following is an example of using SSH to connect:

3.2 User Account management

3.2.1 Switch to the root user

You can use the sudo -s command to switch to the root user. For security reasons, do not operate all commands as root.

Tips:

Click on the link for more information on sudo commands.

https://wiki.debian.org/sudo

Pay attention to:

You may get a "permission denied" message when using some pipe or redirect behavior without root permissions. In this case, you must use 'sudo su -c' instead of '>','<','>>','<<','etc', etc. You need to include the full command in single quotes.

3.2.2 Creating and deleting user accounts

You can use the useradd and userdel commands to create and delete a user's account. Be sure to use these commands in the home screen to set the relevant access rights for that account. Here is an example of how to create test1 in the sudo group (the default login environment for test1 users is bash and their home directory is /home/test1)

To change test1's password, use the passwd command, enter the new password and repeat to confirm the change

If you want to remove user test1, use the command userdel

3.2.3 Disable the default user account

Note

You should first create a user account before disabling the default account

Use the passwd command to lock the default user account so that edge users cannot log in

Unlock the edge user

3.3 Network administration and system administration

3.3.1 web Management based on IEOS

IEOS is a set of network management and system management program running on Linux system developed by InHand. IEOS provides web interface, users can access Ethernet port ip address, cellular dial-up, Wi-Fi Station, DHCP Client/Server, static routing, and network management through the web. Firewalls and other network configuration; System time, time zone, firmware upgrade and system restart can also be operated; In addition, IEOS also supports docking with InHand device management platform DeviceLive. Users can remotely monitor and manage EC300 devices through DeviceLive platform.

IEOS adopts the design scheme of status and configuration separation, which is divided into three functional sections: network management, system management and status. The network management menu and the system management menu can only be used for network and system related configuration, and the status information needs to be unified to the status page.

Important note: When using IEOS program to manage network configuration and system configuration, if you use Linux native commands at the same time, the two may affect each other, resulting in abnormal running state. It is recommended that the configuration supported by IEOS be managed through IEOS web, and the configuration not supported by IEOS, such as VPN, can be combined with native Linux commands to achieve the configuration goal.

3.3.1.1 Login to the web

Considering that the user's program may need to use the standard HTTP/HTTPS port number 80/443, IEOS uses the port number 9100 as the HTTPS connection port, and does not support access through HTTP; When the user uses HTTP to access the web, it will automatically jump to HTTPS. This document uses eth2's default address of 192.168.4.100 as an example.

Login Address:https://192.168.4.100:9100

login account: adm

login password: 123456

Important note: When IEOS program is enabled, it will reserve some port numbers for internal communication. The reserved port number ranges from 9100 to 9200. After IEOS is enabled, the client's program should avoid using these port numbers, otherwise it may cause conflicts and malfunction.

3.3.1.2 Network management

3.3.1.2.1 Configuring the Ethernet interface

Configure the eth1 interface with a static IP address

Configure the eth1 interface with a DHCP Client

Start the dhcp server function on the eth1 interface and assign an address to the eth1 unhooked device

DHCP Server configuration parameters description:

Enable DHCP Server: The switch of DHCP Server function

Starting Address: Starting base address of DHCP Server address pool, network segment + starting address = starting ip address of address pool. In the screenshot, the network segment of eth1 is 192.168.3.0/24, and the base address is 1, then the starting address of the address pool is 192.168.3.1/24.

Max Address Number: The maximum number of addresses in the address pool.

Lease period: The length of the lease period

3.3.1.2.2 Configure cellular dialing

Cellular network parameters Description:

Enabled: The switch of cellular function; Enabled by default.

Profiles: A set of dial parameters used to configure APN, username, password, and authentication methods when dialing a dedicated network card. If you are not a dedicated network card, you usually do not need to change the configuration here. You can add up to 10 records to the dial-up parameter set.

Network Mode: The network mode of the cell, you can choose 3G, 4G and other related network mode, such as LTE, WCDMA, etc. If it is not clear which network mode to choose, select automatic; The program will automatically select the most appropriate network mode. The default is automatic.

Enable Default Route: Enable the add default route function, when enabled, when the dial is successful, it will add a default route of the cellular port. The default route is enabled.

Metric: This is the metric for the default routing of the cellular port. When default routing is configured on the cellular, Wi-Fi, and Ethernet ports, the metric with the lowest value is used.

Dual SIM Enabled: Dual Sim enabled. In order to improve the reliability of the network, EC300 supports dual SIM and single dial. Two sim cards need to be inserted into the device. If the sim1 card fails to dial because of unpaid charges, it will automatically switch to the sim2 card for dialing. By default, it is off.

Main SIM: The main sim card, when dialing, the selected sim card will be preferred for dialing. When dialing fails to reach a certain number of times, when switching to another sim card for dialing, the default is to use sim1 for dialing.

Max Number of Dials: When the dual-SIM single-dial function is enabled, the current sim card will be dialed to another sim card for dialing when the number of dials reaches a specified number.

APN Profile: sim card selected dialing parameters set, the default value is automatic. Usually special network card usually need to configure the dial parameter set, and select the Index of the dial parameter set here.

PIN Code: The PIN code of the sim card.

Wireless cellular networks are complex, sometimes there will be dial-up false connection, that is, the dial-up state is successful, but the target address can not be ping; When this happens, you can simply dial again and get back to normal. IEOS cellular dialing supports ICMP probing to detect spurious connections. It is recommended that customers with cellular connections enable ICMP probing so that false connections can be quickly recovered.

ICMP probe parameters:

ICMP Detection Server Probes: ICMP probe address; 2 probe addresses can be configured, as long as 1 address is successfully probed, it means that there is no fake connection in the cell. When neither address is configured, ICMP probing is turned off.

Detection Interval: How often should ICMP probes be performed?

Detection Timeout: The duration of ICMP probe timeout. If no probe response packet is received, the probe is considered to have failed

Detection Max Retries: the maximum number of probes; When a probe fails to reach this value, a redial is triggered. Range [1,5]

Detection Strict: Whether strict detection is enabled. When strict detection is turned off, the detection program will detect whether the packet received by the cellular interface has changed in each detection cycle. If there is a change, it means that the cellular network is working, and ICMP packets will not be sent for detection, so as to save some traffic; If the probe is turned on, ICMP probe packets will be sent periodically regardless of whether the number of packets received by the cellular interface has changed. By default, it is off.

In Advanced configuration are some less commonly used Settings options.

Debug Mode enabled: Whether the debug function is enabled. After enabled, some dial-related debugging information will be added to the log, and it is disabled by default.

Enable Infinitely Redial:  In some cases, dialing will be in an abnormal state, which can be restored by rebooting the system; By default infinite redialing is turned off, and the system will be restarted to try to recover after a certain number of dialing failures. Since dialing is enabled by default, some customers without sim card, dialing failure, the system will restart, in this case, you can open unlimited redialing; In this way, no matter how many times the dialing fails, the system will not restart.

Dial Interval; But if a dial fails, the amount of time to wait before making another dial.

Signal Query Interval: Signal query interval. When the signal is bad, you may have problems with false connections; At this time, redialing has a certain probability to solve the problem of false connection. The dialing program will check the signal strength at regular intervals; here, the signal detection period is configured.

3.3.1.2.3 Configure the Wi-Fi Station

Enable Wi-Fi: Enable the switch; Off by default

Client SSID: The ssid you want to connect to, you can enter it manually; You can also use the scan button to get nearby SSIDs that you can connect to

Enable Default Route: Enable the function of adding default route. If enabled, when the wifi connection is successful, a default route of wlan port will be added. The default route is enabled.

Metric: This is the metric for the default route of the wifi port. When the default route is configured for the cellular, Wi-Fi, and Ethernet ports, the metric with the lowest value is applied.

Auth Method: Auth method, supports no auth, WPA-PSK, WPA2-PSK, WPA-PSK/WPA2-PSK Mixed

Encrypt Mode:CCMP, TKIP, TKIP and CCMP are supported

WPA/WPA2 PSK Key: Key information

3.3.1.2.4 Configuring static routes

This is a static routing for Ethernet. When the default routing for Ethernet, cellular, and wifi is configured, the default route with the lowest metric value will take effect. You need to make sure that the Metric value of the default route is different.

Static route configuration parameters:

Interface: The outgoing interface of the static route

Target: The target network

Netmask: Target network mask

Gateway: Next hop address

Metric: The metric for the static route

3.3.1.2.5 Configuring the firewall

Only the iptables command is currently supported for configuration.

3.3.1.2.6 Configuring DNS

DNS Servers: DNS Server address, up to 4 can be configured

Domain name hijacking: Domain name hijacking function, can realize the binding between IP address and domain name.

3.3.1.2.7 Network diagnostics

Network diagnostics support ping, traceroute and nslookup functions.

3.3.1.3 System administration

3.3.1.3.1 Basic configuration

Cloud management

Enabled: the enable switch that connects to the DeviceLive platform; DeviceLive is the remote monitoring and management platform of Inhantong equipment;

Cloud Server: DeviceLive platform has 2 addresses; One is the address of the domestic platform, the other is the address of the overseas platform; Here you choose which platform to connect to.

Time zone and NTP client

A maximum of 10 NTP Server addresses can be configured, and the program periodically sends synchronization requests to each server address in turn. After the synchronization is successful, the system time is written to the RTC and no longer continues to send synchronization requests to the later NTP servers.

In addition to using NTP to synchronize the time, there is a synchronization button in the Device Info status page to synchronize the time manually, but only when the device time and the local time (the time of accessing the computer used by the device) differ by more than 3s, this synchronization button will be displayed.

Configuration import, export and factory restore are supported here.

3.3.1.3.2 Firmware upgrade

The automatic restart option is turned off by default. After upgrading the firmware, you need to manually restart the system to take effect; When the automatic restart option is enabled, the system will be restarted automatically after the firmware upgrade is successful.

3.3.1.3.3 Others

This page has 2 functions: restart the system and reset the system. Resetting the system needs to be used carefully. The resetting system function will restore the system configuration status and file system status to the factory, which means that the software installed by the user will also be cleared.

3.3.1.4 Status

3.3.1.4.1 Equipment information

The device information status page shows hostname, device model, serial number, firmware version, kernel version, filesystem version, and an overview of CPU, memory, and disk space usage.

3.3.1.4.2 Cellular dialing status information

The cellular dial status page shows the sim card, IMIE, IMSI, ICCID, signal strength used by the current dial, as well as the IP address, DNS and other information obtained by the dial.

3.3.1.4.3 Wi-Fi Station status information

The Wi-Fi status page shows the IP address, gateway, and DNS information obtained after the Wi-Fi connection was successful.

3.3.1.4.4 DHCP Server status information

The DHCP Server status page shows the assigned IP address of the device as a DHCP Server, the client hostname, the client host mac, and the expiration time.

3.3.1.4.5 Routing status information

The route status page displays IPv4 direct route, static route and route neighbor information.

3.3.1.4.6 Firewall status information

Firewall status information shows filtering rules, IP address mapping rules and other information.

3.3.1.4.7 Log information

The log page can view the system log, user log and set the log level, including Error, Info, Debug and other levels. Logs can also be downloaded locally.

3.3.2 Linux-based command-line management

When using the Linux command line for network and system configuration, the first thing you need to do is close the IEOS program. IEOS is managed through systemctl,

Shutting down IEOS is done as follows:

systemctl stop ieos_daemon

This shutdown only applies to this startup, and IEOS programs will still start after the system is rebooted. Here's how to prevent IEOS programs from starting:

systemctl disable ieos_daemon

Important note: After IEOS is turned off, wireless networking functions such as dialing and Wi-Fi require native Linux commands, and there is no way to remotely manage devices on the DeviceLive platform.

3.3.2.1 Network management

3.3.2.1.1 Set up a static IP address

If you want to set static IP address for EC300, through the command vim/etc/network/interfaces. D/eth1 or vim/etc/network/interfaces. D/for eth2 modify the corresponding network configuration file to the default gateway for Ethernet interface, address, Network and subnet mask. As an example, let's set a static IP address for the eth2 port:

After changing the interface IP configuration, run /etc/init.d/networking restart to restart the network service for the configuration to take effect.

3.3.2.1.2 Set up a dynamic IP address

If you want to set dynamic IP address for EC300, through the command vim/etc/network/interfaces. D/eth1 or vim/etc/network/interfaces. D/for eth2 modify the corresponding network configuration file, Setting it to DHCP after inet will automatically get the IP address.

Here is an example of setting a dynamic IP to the eth1 port.

After changing the interface IP configuration, run /etc/init.d/networking restart to restart the network service for the configuration to take effect.

3.3.2.3 System administration

3.3.2.3.1 Querying the firmware version

To check the computer firmware version for the EC300, type:

3.3.2.3.2 Check available disk space

To determine the amount of available drive space, use the df command with the -h option. The system will return the amount of drive space broken down by file system. For EC300 products, the disk partition available to users is /dev/mmcblk0p8. Here's an example:

3.3.2.3.3 Adjust the time

The EC300 has two time Settings. One is system time and the other is RTC (Real Time Clock) time, which is maintained by the EC300's hardware. Use the date command to query the current system time or to set a new system time. Use the hwclock command to query the current RTC time or set a new RTC time.

Set the system time with the command date MMDDhhmmYYYY:

MM: month

DD: day

hh: hour

mm: minutes

YYYY: Year

RTC time can be set to system time using the following command

Click on the link below for more details about the date and time:

https://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html

https://wiki.debian.org/DateTime

3.3.2.3.4 set time zone

There are two ways to configure the time zone for the EC300. One is to use the command tzselect. The other is to use the /etc/localtime file.

3.3.2.3.5 Use the tzselect command

When you type the tzselect command, you will be taken to the area selection screen. Select the approximate area (divided by continent and ocean) and enter the number in front of the continent or ocean

Then select the continent or the country under the ocean

Follow the steps above to get the China time zone keyword Asia/Shanghai and execute the following command to set the time zone

3.3.2.3.6 Using a localtime file

The localtime file is stored in /etc/localtime, which is used by the GNU libraries for C (glibc) if no value has been set for the TZ environment variable. localtime files are either copies of /usr/share/zoneinfo/file or symbolic links to /usr/share/ zoneinfo/file. If the EC300 cannot find the /usr/share/zoneinfo/ file, you can download the required time zone information file from this site https://www.iana.org/time-zones and relink it to the localtime file in the EC300.

Note:

After successfully downloading the required time zone information file, unzip it, and then compile and generate the corresponding binary file using zic command. The generated time zone file is "/usr/share/zoneinfo/custom time zone filename".

4 Advanced configuration of the peripheral interface

In this chapter, we will introduce the advanced configuration of peripheral interfaces for EC300, an edge computer based on Arm architecture.

This chapter covers the following topics:

4.1 Serial Ports

EC300 has four serial ports, one serial port supports RS485, three serial ports support RS-232 or RS-485 mode.

The corresponding device node for COM1 is /dev/ttyS4

The device node for COM2 is /dev/ttyS5

The device node for COM3 is /dev/ttyS6

COM4 is represented by /dev/ttyS8

4.1.1 Change the serial port Settings

View and set the serial port with the stty command

To see the details, type sudo stty --help:

4.1.2 View the serial port information

4.1.3 Set the baud rate of COM1 serial port

Note

Details about the stty command are available at the following link

http://www.gnu.org/software/coreutils/manual/coreutils.html

4.2 the USB interface

The EC300 provides a USB 2.0 Host interface, which is mainly used to expand storage devices

The EC300 supports USB storage device hotplugging.

Note

Remember to enter the sync sync command before disconnecting your USB mass storage device to prevent data loss. When you disconnect the storage device, exit from the mount directory.

4.3 Mount the micro SD card

The EC300 supports micro SD memory cards without hotplugging. Mount the reference https://www.man7.org/linux/man-pages/man8/mount.8.html

4.4 CAN bus interface

The three-way CAN port of the EC300 supports the CAN bus.

4.4.1 Configure the connection CAN interface

By default, the CAN port will be initialized. If you need any other configuration, check the CAN device using the ip link command. To check the status of the CAN device, use the ip link command:

To configure a CAN device, use ip link set can* down to first turn off the device

Where can* down is selected from can1, can2, or can3.

Then configure the bit rate (here's a 50k bit rate example) :

Finally turn the device back on

4.5 IO Debugging

The EC300 supports 4-way IO input and 4-way IO output.

Port number

Device description file

DI0

/sys/class/gpio/gpio454/value

DI1

/sys/class/gpio/gpio455/value

DI2

/sys/class/gpio/gpio456/value

DI3

/sys/class/gpio/gpio457/value

DO0

/sys/class/gpio/gpio323/value

DO1

/sys/class/gpio/gpio453/value

DO2

/sys/class/gpio/gpio465/value

DO3

/sys/class/gpio/gpio461/value

Reading the DI status can be done using cat "Device profile";

DO status can be controlled by using echo 1 > "Device Profile" or echo 0 > "Device Profile" as root user

4.6 AIN Debugging

EC300 supports up to two AIN analog current signals with input range of 4-20mA. It adopts TI TLA2022 12-bit ADC with sampling rate of 1.6KHz, resolution of 16.6uA and accuracy of 1%. The hardware connection corresponds to the expansion interface in section 2.3.15.

Port number

Device description file

AIN1

/dev/ain1

AIN2

/dev/ain2

The cat "device profile" can be used to read AIN current values.


The return value represents the current channel current in microampere (uA).

4.7 Super-Capacitor

4.7.1 Specifications

4.7.1.1 Capacitance specifications

The specifications of the super-capacitor are: 10.8V/5F.

4.7.1.2 Power-down retention

The power-down retention module can maintain system operation for 20-30 seconds after power failure, depending on the load.

4.7.2 Functions

4.7.2.1 Power failure alarm

The EC300 supports the power-down alarm function. When the external power supply is disconnected, the system will send a UDP broadcast message ‘power_down’ to port 9107 of IP address 255.255.255.255.

4.7.2.2 Safe shutdown

Power failure refers to the continuous disconnection of the external power supply for more than 0.5 seconds. After sending the UDP broadcast message, the system waits for 3 seconds and actively performs a poweroff.

5 Security

In this chapter, we will introduce the security mechanism of EC300, an edge computer based on ARM architecture.

5.1 sudo mechanism

In EC300, the root user is banned for better security. Sudo is a program that lets the system administrator allow an approved user to execute some commands as the root user or another user. The most basic rule is to give as few privileges as possible to get the job done. Using sudo is more secure than root session opening for a number of reasons, including:

• Grant privileges to normal users without having to know the root password (sudo will prompt for the current user's password)

• It's easy to run privileged commands via sudo, and the rest of the time, work as an unprivileged user, reducing potential damage due to wrong operations.

5.2 Firewalls

Netfileter/iptables is an excellent and free firewall tool based on packet filtering which comes with nuix/linux system. It is very powerful and flexible, and can control the data packets flowing in, out and through the server in fine detail.

5.3 TPM2.0

TPM stands for "Trusted Platform Module" and it is a hardware security module designed to provide security and encryption capabilities for computer systems. It is a secure microcontroller that can be embedded in a computer system or sold as a standalone hardware device. It contains a cryptographic coprocessor for storing encryption keys, digital certificates, and other secure data, as well as supporting multiple cryptographic algorithms and security protocols. On EC300, the standard TPM2 protocol stack and TPM2 tools have been integrated for user use.


ARM computers provide TPM2.0 hardware support and are pre-installed with the tpm2-tools tool, which can be used to test and verify TPM2.0.

Generate random numbers


NOTE 

For more information on how to use tpm2-tools, please refer to https://tpm2-tools.readthedocs.io/en/latest/

6 The system restores factory Settings 

In this chapter, we will describe how EC300, an edge computer based on Arm architecture, restores factory Settings .

This chapter covers the following topics:

6.1 Restore factory Settings

There are two ways to restore factory Settings:

  1. By typing the command, the system will automatically restart and restore the factory Settings.

  1. Restore factory Settings by pressing:
  1. Long press the restore factory Settings button for 10-20s and see the warn light long on.
  1. When the warn light has turned on, release the Restore Factory Settings button.
NOTE 
System reset is an important function for Arm computer. After the system reset, the Arm computer will return to the default state, and all user data and configuration will be lost.
Before resetting the system of Arm computer, ensure that the critical data is effectively backed up and transferred to external storage media such as removable disk.

7 Programming Guidelines

EC300 provides a JSON format device information description file. Customers who need to operate IO, LED, serial port and other peripherals can obtain the device node information of these peripherals by querying the device description information file.

Device description file path: /tmp/ieos/etc/system_info.json, the content is as follows:

{
  "device_info": {
    "model_info": {
      "model": "EC312",
      "pn": "H-LQA3-LC4D",
      "sn": "CL3124050000001",
      "oem": "inhand",
      "features": ";std;cell-LQA3;wlan;"
    },
    "software_info": {
      "boot_loader": "V1.0.2",
      "kernel": "5.10.168",
      "version": "V1.0.1-beta1",
      "os": "Debian GNU/Linux 11 (bullseye)"
    },
    "hardware_info": {
      "arch": "armv8",
      "soc": "AM6231",
      "interface": {
        "eth": [
          {
            "iface_name": "eth1",
            "iface_mac": "00:08:5f:17:04:00"
          },
          {
            "iface_name": "eth2",
            "iface_mac": "00:18:5f:17:04:02"
          }
        ],
        "wlan": [
          {
            "iface_name": "wlan0",
            "iface_mac": "f4:3c:3b:ca:e9:36"
          },
          {
            "iface_name": "wlan1",
            "iface_mac": "f6:3c:3b:ca:e9:36"
          }
        ]
      },
      "gpio": [
        {
          "gpio_name": "cellular_power",
          "dev_node": "/sys/class/gpio/gpio401"
        },
        {
          "gpio_name": "sim_switch",
          "dev_node": "/sys/class/gpio/gpio405"
        }
      ],
      "user_key": [
        {
          "user_key_name": "user1",
          "dev_node": "/dev/input/event2"
        }
      ],
      "uart": [
        {
          "uart_name": "com1",
          "dev_node": "/dev/ttyS4"
        },
        {
          "uart_name": "com2",
          "dev_node": "/dev/ttyS5"
        }
      ],
      "led": [
        {
          "led_name": "user1",
          "dev_node": "/sys/class/leds/user1"
        },
        {
          "led_name": "user2",
          "dev_node": "/sys/class/leds/user2"
        },
        {
          "led_name": "user3",
          "dev_node": "/sys/class/leds/user3"
        },
        {
          "led_name": "user4",
          "dev_node": "/sys/class/leds/user4"
        },
        {
          "led_name": "cell",
          "dev_node": "/sys/class/leds/cell"
        },
        {
          "led_name": "warn",
          "dev_node": "/sys/class/leds/warn"
        },
        {
          "led_name": "status",
          "dev_node": "/sys/class/leds/status"
        }
      ],
      "io": {
        "di": [
          {
            "di_name": "di1",
            "dev_node": "/sys/class/gpio/gpio454"
          },
          {
            "di_name": "di2",
            "dev_node": "/sys/class/gpio/gpio455"
          },
          {
            "di_name": "di3",
            "dev_node": "/sys/class/gpio/gpio456"
          },
          {
            "di_name": "di4",
            "dev_node": "/sys/class/gpio/gpio457"
          }
        ],
         "do": [
                   {
                      "do_name":"do1",     //The name matches the name on the panel
                      "dev_node": "/sys/class/gpio/gpio11"
                   },
                   {
                      "do_name":"do2",
                      "dev_node":"/sys/class/gpio/gpio12"
                   }
                ]
            },
            "ain": [
               {
                    "ain_name": "ain1", 
                    "ain_node": "/dev/ain1"
               },
               {
                    "ain_name": "ain2", 
                    "ain_node": "/dev/ain2"
               }              
            ]
        }
    }
}

7.1 IO Programming Guide

Currently, there are a total of 8 IO interfaces on the device: for example, there are 4 input pins from DI1 to DI4 on the device panel; DO1~DO4 are 4 output pins.

According to the device description file /tmp/ieos/etc/system_info.json, the IO device nodes are:

When you need to programming IO interface, direct manipulation background device nodes below the value value (sys/class/gpio/gpioxxx/value)

Case study:

When DO1 need to output high electricity at ordinary times, can be directly to sys/class/write 1 gpio/gpio323 / value

echo 1 > /sys/class/gpio/gpio323/value

When you need to check the DI1 level is, the same can be directly to check the sys/class/gpio gpio454 / the value of the value

cat /sys/class/gpio/gpio454/value

The full shell script:

#!/bin/bash

gpio323="/sys/class/gpio/gpio323/value"
gpio453="/sys/class/gpio/gpio453/value"
gpio465="/sys/class/gpio/gpio465/value"
gpio461="/sys/class/gpio/gpio461/value"
# When DO1 need to output high electricity at ordinary times, can be directly to sys/class/write 1 gpio/gpio323 / value
if [ -f "$gpio323" ]; then
    echo 1 > /sys/class/gpio/gpio323/value
else
    echo "no file exit "$gpio323
fi

# When DO1 need output low electricity at ordinary times, can be directly to sys/class/write 1 gpio/gpio323 / value
if [ -f "$gpio323" ]; then
    echo 0 > $gpio323
else
    echo "no file exit "$gpio323
fi

gpio454="/sys/class/gpio/gpio454/value"
gpio455="/sys/class/gpio/gpio455/value"
gpio456="/sys/class/gpio/gpio456/value"
gpio457="/sys/class/gpio/gpio457/value"
# When you need to check the DI1 level is, the same can be directly to check the sys/class/gpio gpio454 / the value of the value
if [ -f "$gpio454" ]; then
    cat $gpio454
else
    echo "no file exit "$gpio454
fi

7.2 Led Programming Guide

The user can use the four lights USER1, USER2, USER3 and USER4 on the device for status prompts, please check the light label to confirm the position of the light.

According to the device description information file /tmp/ieos/etc/system_info.json, the device node corresponding to LED can be obtained as follows:

user1: /sys/class/leds/user1

user2: /sys/class/leds/user2

user3: /sys/class/leds/user3

user4: /sys/class/leds/user4

There are some control files in /sys/class/leds/user1 to control the attributes and status of leds:

/ sys/class/leds/user1 / brightness: this file is used to control the user1 lights on or off. Write 1 to always on, write 0 to always off.

/ sys/class/leds/user1 / trigger: leds trigger, can write the timer timer trigger, write none said cancel the trigger.

/ sys/class/leds/user1 / delay_on: it is time to file said led lights, is an unit with ms.

/ sys/class/leds/user1 / delay_off: it is time to file said led lights, is an unit with ms.

If trigger is configured for timing, the value in the brightness will no longer take effect and will automatically change to 0.

Replace user1 with user2 in the file path to control the operation of the USER2 light, and the same for USER3 and USER4.

Example:

Write 1 to the brightness file when you need the USER1 light to be on

echo 1 > /sys/class/leds/user1/brightness

When the USER1 light is needed to flash, the timer is written to the trigger file, and the light and off times are controlled by delay_on and delay_off

Echo # start timer 
 timer > / sys/class/leds light echo 1 seconds/user1
/ trigger 

> 1000 / sys/class/leds/user1 / delay_on
echo out  
# 1 seconds 
1000 > /sys/class/leds/user1/delay_off

Full shell script:

#!/bin/bash

USER1_BRIGTHNESS="/sys/class/leds/user1/brightness"
USER1_TRIGGER="/sys/class/leds/user1/trigger"
USER1_DELAY_ON="/sys/class/leds/user1/delay_on"
USER1_DELAY_OFF="/sys/class/leds/user1/delay_off"

# Light the USER1 LED
if [ -f "$USER1_BRIGTHNESS" ]; then
    echo 1 > $USER1_BRIGTHNESS
else
    echo "no file exit "$USER1_BRIGTHNESS
fi

# Set the USER1 LED to flash
if [ -f "$USER1_TRIGGER" ]; then
    echo timer > $USER1_TRIGGER
else
    echo "no file exit "$USER1_TRIGGER
fi

# Set the USER1 LED on for 1000ms
if [ -f "$USER1_DELAY_ON" ]; then
    echo 1000 > $USER1_DELAY_ON
else
    echo "no file exit "$USER1_DELAY_ON
fi

# Set the USER1 LED off for 1000ms
if [ -f "$USER1_DELAY_OFF" ]; then
    echo 1000 > $USER1_DELAY_OFF
else
    echo "no file exit "$USER1_DELAY_OFF
fi

# Turn off USER1 blinking
if [ -f "$USER1_TRIGGER" ]; then
    echo none > $USER1_TRIGGER
else
    echo "no file exit "$USER1_TRIGGER
fi

7.3 Cross-compiling

A user's own c/ C ++ program can be cross-compiled by using the cross-compilation toolchain on the development machine, and then the object file is uploaded to the EC300 device for execution.

Cross-compilation tool zip package: gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.gz

Here's how to configure the environment variables for the cross-compilation toolchain:

  1. Unzip gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.gz to /opt on your development machine (you can also unzip it to any other PATH, adjust the path environment variable in step 2)
  2. Edit the ~/.bashrc file and add a line PATH=$PATH:/opt/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin at the end of the file
  3. Execute source ~/.bashrc to make the environment variables work in the current terminal; The newly opened terminal will take effect automatically.

Using the classic hello world program as an example, create the following directories and files

mkdir ~/example 
touch ~/example/hello.c 
touch ~/example/Makefile

The contents of the ~/example/hello.c file are as follows:

#include <stdio.h>
 
int main(void) 

       printf("hello, world! \n"); 
        return 0;  
}

The contents of the ~/example/Makefile are as follows:

# Define TARGET and source filenames 
target := hellworld 
DIRS := $(shell find.-maxdepth 3-type d)  
SRCS := $(foreach dir,$(DIRS),$(wildcard $(dir)/*.c)) 
OBJS := $(SRCS:.c=.o) 


CC=aarch64-linux-gnu-gcc 

# Define compiler and compile options  
CFLAGS := -Wall-Wextra -g-wno-unused-parameters 

# define default TARGET  
all: $(TARGET)

# define target file dependencies and compile commands  
$(TARGET): $(OBJS)  
$(CC) $(CFLAGS) $(LIBS) $^ -o $@  

# Define the command to compile the source file to the target file 
%.o: %.c 
$(CC) $(CFLAGS) $(LIBS) -C $< -o $@
 
# Define command to clear temporary files 
clean: 
rm -f $(TARGET) $(OBJS)
 
# declare pseudo target ".PHONY" 
.PHONY: all clean

Run make in the ~/example directory to generate the object file helloworld







    • Related Articles

    • EC5000 User Manual_V2.0

      EC5000 Series AI Edge Computer User Manual Version 2.0, September 2024 www.inhand.com The software described in this manual is according to the license agreement, can only be used in accordance with the terms of the agreement. Copyright Notice © 2024 ...
    • EC3000 User Manual_V1.0

      EC3000 Series AI Edge Computer User Manual Version 1.0, September 2024 www.inhand.com The software described in this manual is according to the license agreement, can only be used in accordance with the terms of the agreement. Copyright Notice © 2024 ...
    • EC942 User's Manual

      Edge Computer EC940 Series User's Manual (Applicable for Debian10,IEOS V2.0.0 and above) Version2.0, October 2023 www.inhandnetworks.com The software described in this manual is provided according to the license agreement and can only be used ...
    • InGateway902 User Manual

      1. Product Introduction 1.1 Overview The InGateway902 (IG902 for short) series is a new-generation series of 4G edge computing gateways developed by InHand Networks for the Industrial IoT sector. It provides omnipresent, uninterrupted Internet access ...
    • DeviceSupervisor Agent User's Manual

      DeviceSupervisor Agent User's Manual (Applicable for IG & EC) Based on device_supervisor V3.1.10, August 2024 www.inhand.com The software described in this manual is according to the license agreement, can only be used in accordance with the terms of ...