SYM2 Gateway Modem


2020-07-31 09:49

Mission Statement:
Build a modem to replace the standard modem of a SYM2 meter. The goal is to use an IOT device such as an Orange Pi Zero with additional electronics to connect to both the SYM2 meter and PNPSCADA server.

Use an Orange Pi Zero that will receive power from the meter via POE. A POE splitter will be used which will split the data and the power from the POE of the SYM2 meter. The data will enter the Orange Pi via Ethernet. There will be three options to consider for internet connectivity on the Orange Pi.

Orange Pi Zero will be used as the computing device that will act as the SYM2 Gateway.

Use an external POE splitter to split the 48V and Data communications from the SYM2 meter into Ethernet for Data only and 5V 2A. The POE Splitter will power the Orange Pi Zero through the 5V and GND GPIO pins of the Orange Pi Zero.

3D Printed Case
Will be used to install to install the SYM2 Gateway Modem on the DIN Rail of the SYM2 Meter and will fit under the meter cover.
3.0x9mm Screws and Cable ties will be used to assemble the SYM2 Gateway Modem.

Internet Connection Options:

We need to have all settings that needs to be configured in order to configure off-site and simply plug and play on site.

1.     WIFI: If there is a wireless access point on site, we can use WIFI to connect to the internet.

2.     ETHERNET: We will use a USB-to-Ethernet Converter to open up another Ethernet Port for internet connectivity.

3.     USB Modem: We will add a USB Modem with a SIM card to the Orange Pi Zero. An additional UGreen 0.5m USB Male to Female cable will be used to route the USB stick to the Orange Pi Zero


Setting up the Orange Pi Zero:

Ubuntu Linux will be used as an operating system on the Orange Pi Zero
The operating system can be found at:

The First thing we need to configure is the local IP address of the Orange Pi Zero Ethernet port. In order to work with the SYM2 meter, we need to configure an APIPA address:

Open /etc/network/interfaces file and add the following commands:
# Ethernet adapter 0
auto eth0
allow-hotplug eth0
#no-auto-down eth0
iface eth0 inet static

Save and exit the configuration and type ifdown eth0 followed by ifup eth0 to save changes.

Setting up internet connectivity:

1.     WIFI: Use nmtui command to connect to a wifi network.
If we want to set a static IP address on the WLAN0 interface, we can do this by accessing /etc/network/interfaces file and making the following changes:
auto wlan0
iface wlan0 inet static
address x.x.x.x
netmask x.x.x.x
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x
dns-nameservers x.x.x.x x.x.x.x

Save and exit the configuration and type ifdown wlan0 followed by ifup wlan0 to save changes.
After setting up internet connectivity type apt-get update AND apt-get upgrade to update to the latest version of the operating system.

2.     USB-to-Ethernet: Plug the USB-to-Ethernet converter into the back of the Orange Pi Zero?s USB port.
Type the ifconfig command to see the name of the Ethernet Interface that the USB-to-Ethernet converter has created.
Access /etc/network/interfaces file and making the following changes:
auto [created interface name]
iface [created interface name] inet static
address x.x.x.x
netmask x.x.x.x
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x
dns-nameservers x.x.x.x x.x.x.x

Save and exit the configuration and type reboot to restart the device and save the interface settings.
After setting up internet connectivity type apt-get update AND apt-get upgrade to update to the latest version of the operating system.

3.     USB Stick: Plug the USB Stick, with an activated SIM card inserted, into the 0.5m USB Male to Female adapter cable. Ensure the SIM card has data loaded.
Sakis3G is used to setup the PPP connection:
For this step you first need to setup one of the other two internet connections mentioned above in order to install PPP with the following command:
apt-get install ppp.

Installing Sakis3G:
Download Sakis3G onto the Orange Pi Zero with the following command:
Unzip the file and now plug in the USB Stick with the activated SIM card.
**lsusb command finds Huawei USB modem as a storage device:
Huawei Technologies Co., Ltd. Modem (Mass Storage Mode)

Install usb modeswitch:
apt-get install usb-modeswitch

Go into:
nano /lib/udev/rules.d/40-usb_modeswitch.rules
Add entry: ATTR{idVendor}=='12d1', ATTR{idProduct}=='14fe', RUN+='usb_modeswitch '/%k''

Create file: nano /etc/usb_modeswitch.d/12d1:14fe
Add entry:
# Huawei E3131 series

reload rules: udevadm control --reload-rules && udevadm trigger

Reboot Orange Pi Zero
Now lsusb command finds: Huawei Technologies Co., Ltd. Modem/Networkcard

To connect to internet using SAKIS3G:
Go to folder where Sakis3G is downloaded to and run command: ./sakis3g --interactive
>Select connect 3g
Now we have successfully connected to the Internet via USB Stick.


The SYM2 Gateway Modem is designed to comply with the following scope:

SYM2 Smart Meter Gateway Specification - GSM POE Version


1              Introduction


1.1               The smart meter gateway device is a GSM modem with push capabilities.


1.2               The gateway will fit under the cover of a SYM2 meter and shall run on the SYM2 meter ethernet port as a 48 V POE slave device.  No other power supply shall be used.


1.3               The failure rate of the gateway shall be less than 2 % per annum.


2              SYM2 meter interface


2.1               The gateway shall be DIN 3 rail mount and fit under the cover of the meter.  The dimensions shall be as indicated in SYM2 Annex


2.2               The power supply and other data interfaces shall be as described in SYM2 Annex 5.1


2.3               The device will be protected against reverse polarity.


2.4               The protocol shall be as described in SYM2 Annex 5.2


2.5               The gateway shall monitor the SYM2 meter for SYM2-IP-Multicast or SYM2-MAC-Multicast 01-00-5e-00-64-01.  Only one meter will be connected to the modem.


3              Interface to master


3.1               The GSM APN and the master address shall be configured on the gateway.


3.2               All UDP and TCP communication received on port 7259 shall be forwarded to the meter and responses from this port shall be forwarded to the same port on the master.


3.3               The NTP time sync information for the gateway shall be obtained from theNTP server on the master.


3.4               A http: POST will be used to upload the data packet to the master.  The data shall be obtained from the one second broadcast from the SYM2 meter.


3.5               A full description of the data packet format shall be supplied with the offer.


3.6               The data packet shall only be time stamped by the gateway if the gateway clocked is synchronised.  If the gateway clock is not synchronized, this timestamp shall be omitted from the packet and the server time shall be used to estimate the timestamp of the packet.


3.7               The gateway shall post a packet to the server on the 15 minute boundary.  The NTP clock shall be used to determine the absolute time.  If the NTP clock is not synchronised, the free running, per second,  timer inside the SYM2 meter shall be used to determine the 15 minute boundary.


3.8               The gateway shall not store or keep track of packets successfully sent.  This functionality shall be provided on the master and the master will request missing data from the meter directly


3.9               The master will be responsible for the time synchronisation of the SYM2 meter.


4                     Other conditions


4.1               The warranty period shall be 36 months.


4.2               A non-disclosure agreement may be used to allow a third-party to implement the protocol and the supplier shall liaise with this third-party for implementation.


4.3               The modem shall be supplied fully configured.  The City will free-issue SIM cards connected to the Electricity infrastructure and a test message shall be sent from a sample meter prior to delivery.


4.4        The delivery period shall be twelve weeks from placement of order.  Penalty for late delivery shall be one percent of order value per week, up to a maximum of ten percent.



Prices (Local):
Orange Pi Zero: R340 (Microbotics: Orange Pi Zero 512MB)
USB Stick: R345 (GeeWiz: Huawei E3531i-2)
USB-to-Ethernet: R150 (Takealot: Ultra Link USB 2.0 to Ethernet Adapter)
Case: R360 (Custom 3D Print)
SD Card: R100 (Takealot: Sandisk 16GB SD card)
Heatsink: R15 (RS Components: Heatsink, BGA, 26.5K/W, 14 x 14 x 10mm, Adhesive Foil)
1 645

Tags: modemorange pi zeropnpscadasym2usb stick
Please log in to post a comment