EG500-Admin-Guide-V1.1
EG500-Admin-Guide-V1.1
EG500-Admin-Guide-V1.1
EG500
Administrator Programming Guide
The Ethernet port labeled “LAN” on EG500 was bridged from PCIe by Realtek network chipset,
you may need install the Ethernet port driver to run it up.
$ cd ~
$ sudo apt-get update
$ sudo apt-get install raspberrypi-kernel-headers
$ git clone https://github.com/Elastel/r8168.git
$ cd r8168
$ sudo ./autorun.sh
Also Elastel provide some prebuilt commands for I/O ports and others operating. They are,
PIN Description
TX RS232 transmit line
RX RS232 receive line
GND Ground (Reference potential)
A RS485 difference line high
There are two individual serial ports in the system. The /dev/ttyACM1 for RS232 port, and
/dev/ttyACM0 for RS485 port. Use RS232 as an example.
$ python
>>> import serial
>>> ser=serial.Serial('/devttyACM1',115200,timeout=1)
>>> ser.isOpen()
true
>>> ser.write('1234567890')
10
3.2 Programming
PIN Description
VI0+ Voltage type analog input channel 0 +
VI0- Voltage type analog input channel 0 -
Use the Elastel prebuilt commands read_vi and read_ai to get the values of analog input value.
Examples as below:
$ read_vi
read_vi <0|1|2>; eg: read_vi 1
$ read_vi 0
VI0 = 0.009V
$ read_ai
read_ai <0|1|2>; eg: read_ai 1
$ read_ai 0
AI0 = 0.000mA
5. LED
5.2 Programming
Use the Elastel prebuilt command led_ctl to control the LEDs. Examples as below:
$ led_ctl
led_ctl -m < system | wifi | alarm | online | sig > -s <on | off |none | low | mid |
high>
$ sudo led_ctl
led_ctl -m < system | wifi | alarm | online | sig > -s <on | off | none | low | mid |
high>
$ sudo led_ctl -m system -s on
Status Description
on Turn on led, does not support in SIG
off Turn off led, does not support SIG
none no signal, only for SIG
low low signal, only for SIG
mid Medium signal, only for SIG
$ ifconfig -a
……
wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.58.161 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::9e8a:5252:d4c8:15cb prefixlen 64 scopeid 0x20<link>
ether c6:00:46:68:12:80 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
Some cellular module like Quectel EC25 support built-in base station GPS data acquisition. To get GPS
data from cellular module, install cellular module on mini PCIe 1 as above section indicated.
You may also need an external GPS antenna installed on site for better signal.
1) Send AT command to enable GPS data acquisition to /dev/ttyUSB2 block
AT+QGPS=1 # To enable GPS acquisition.
AT+QGPS=0 # To disable GPS acquisition.
Example:
echo -en "AT+QGPS=1\r\n" > /dev/ttyUSB2 | cat /dev/ttyUSB2 &
return:
OK
2) Obtain the GPS data from /dev/ttyUSB1
Example:
cat /dev/ttyUSB1
Return:
ELASTEL TECHNOLOGY CO., LTD. WWW.ELASTEL.COM
$GPVTG,,T,,M,,N,,K,N*2C
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGGA,,,,,,0,,,,,,,,*66
$GPRMC,,V,,,,,,,,,,N*53
7. WiFi
7.2 AP Mode
EG500 reserved another mini-PCIe socket for LoRaWAN module which develop from Semtech SX1301,
SX1302 solution. Users are allowed to install a LoRaWAN module into mini-PCIe socket 2 as drawing
blue area add-on module position, only one M2x5 screw is needed.
1. Insert the LoRaWAN module into Mini-PCIe socket 2 and, connect the antenna for getting
better signal.
2. Log in the system via console use admin/admin.
Note, all the bin files and configuration files were installed in /home/admin/sx1302/bin directory,
please edit the “global_conf.json” configuration file for LoRa frequency change, gateway address
modification, and other settings.
EG500 IoT gateway support 802.11ah WiFi (also named WiFi HaLow) network powered by SX-NEWAH
module from SilexTechnology, the first industrial IEEE 802.11ah Wi-Fi module that operates in the Sub
1GHz band.
Visit SX-NEWAH to learn more benefit of WiFi HaLow technology in IoT.
EG500 carrier board reserved the corresponding mount points for wearing SX-NEWAH module. Check
the above drawing orange area for module position. You are allowed to mount SX-NEWAH by yourself.
Attention! You may need special weld tool and skill to mount SX-NEWAH on EG500 by yourself.
Incorrect operation may destroy the carrier board and SX-NEWAH.
Purchase EG500 WiFi HaLow version from Elastel directly would be highly recommended.
https://www.elastel.com/product/industrial-cellular-router/eg500-wifi-halow-gateway/
$ cd ~
$ git clone https://github.com/Elastel/halow-wifi.git
$ cd halow-wifi
$ sudo chmod +x install.sh
$ sudo ./install.sh
$ sudo reboot
The WDT module have three terminals, input, output, and LED indicator.
The chip of RTC is PCF8563 from microchip. It is mounted on the system I2C bus.
The OS itself has the driver inside, only need are some configurations.
11.2 Configuration
Note:
1. Make sure the i2c-1 driver point is open, and the point is closed default.
2. The estimated backup time of the RTC is 15 days.
12. Bluetooth
Below example describe the process of setting up a Bluetooth connectivity.
1. Execute bluetoothctl command to operate Bluetooth feature.
$ sudo bluetoothctl
2. Enable the agent on to scan and discovery other Bluetooth devices.
[bluetooth]# agent on
[bluetooth]# scan on
The third column of the results are the MAC address of other Bluetooth devices, you will use
it to pair with them. The Fourth column is the device name of other Bluetooth devices.
3. Use pair command to connect with it from one of the discovery result list.
pair [XX:XX:XX:XX:XX:XX]
4. The fist time pair, it will connect with it immediately. If the connectivity disconnected
since Bluetooth device out of range, we need use “connect” command to reconnect it.
connect [XX:XX:XX:XX:XX:XX]
5. Use “trust” command to make the Bluetooth device be trusted after first time pair.
trust [XX:XX:XX:XX:XX:XX]
-END-