eManager Setup

To setup the eManager for the first time, you first have to check the Quick Start Guide section.

1) Ethernet Configuration

Note

All information detailed in this section is only valid for image release below to 22.10. From this version, the interface is configured from eManager WebAdmin.

Ethernet network configuration file is stored in /etc/systemd/network/20-eth0.network. You can configure static or dynamic IP address, and also combined configuration. Edit this file according to the settings you need:

Static IP
address configuration
Dynamic IP
address configuration
Combined configuration

[Match]
Name=eth0
[Network]
DNS=10.1.10.1
[Address]
Address=10.1.10.10/24
[Route]
Gateway=10.1.10.1
Metric=400
[Match]
Name=eth0
[Network]
DHCP=yes
[DHCP]
RouteMetric=100
[Match]
Name=eth0
[Network]
DHCP=yes
LinkLocalAddressing=yes
LLMNR=yes
MulticastDNS=yes
LLDP=yes
EmitLLDP=yes
DNS=10.1.10.1
[Address]
Address=10.1.10.10/24
[Route]
Gateway=10.1.10.1
Metric=400
[DHCP]
RouteMetric=100

For further information, please check: systemd.network.

Step 1. Edit Ethernet configuration file

One of the above configurations (static IP address, dynamic IP address or combined configuration) must be chosen and added to the following file:

nano /etc/systemd/network/20-eth0.network

Step 2. Restart service

After configuration, service must be restarted using:

systemctl restart systemd-networkd

Step 3. Check IP address

Finally, check if IP address is correctly assigned using command:

ip addr



2) WiFi Configuration

Note

All information detailed in this section is only valid for image release below to 22.10. From this version, the interface is configured from eManager WebAdmin.

WiFi network configuration file is stored in /etc/systemd/network/21-wlan0.network. You can configure WiFi as STA or AP mode.

Important

WiFi can work in only one mode at a time, so to change from one to another it is necessary to disable the one that is not used.

2.1 STA mode

This is a step-by-step guide for connecting to a WPA/WPA2 WiFi network.

Command line tools used:

  • iw: is the basic tool for WiFi network-related tasks, such as finding the WiFi device name, and scanning access points.
  • wpa_supplicant: is the wireless tool for connecting to a WPA/WPA2 network.
  • systemctl: is a tool to control the Linux systemd system and services.
  • ip: is used for enabling/disabling devices, and finding out general network interface information.

Step 1. Edit WiFi configuration file

nano /etc/systemd/network/21-wlan0.network

Replace its content with following lines:

[Match]
Name=wlan0
[Network]
DHCP=yes
LLMNR=yes
MulticastDNS=yes
LLDP=yes
EmitLLDP=yes
[DHCP]
RouteMetric=200

Save and exit: CTRL + X. Confirm save with Y.

Step 2. Restart service

The following command must be used:

systemctl restart systemd-networkd

Step 3. Scan WiFi network(s)

WiFi networks must be scanned to find out which WiFi network(s) are detected, using:

iw wlan0 scan

To see only SSIDs:

iw wlan0 scan | grep SSID

Step 4. Configuration file generation

You must generate a configuration file for wpa_supplicant that contains the pre-shared key ("passphrase") for the WiFi network.

wpa_passphrase takes the SSID as the single argument. You must type in the passphrase for the chosen WiFi network after you run the command. Using that information, wpa_passphrase will output the necessary configuration statements to the standard output. Those statements are appended to the wpa_supplicant configuration file located at /etc/wpa_supplicant.conf.

wpa_passphrase 'chosen SSID' >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Type the passphrase and hit enter.

Now, you can view generated statements:

cat /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Step 5. Start wpa_supplicant service to connect to WPA/WPA2 WiFi network

systemctl start wpa_supplicant@wlan0.service

If you need to connect automatically at each startup, you must enable the service using:

systemctl enable wpa_supplicant@wlan0.service

Step 6. Check the connection status and assigned IP address

iw wlan0 link
ip a | grep wlan0

For further information, please check: systemd.network.

2.2 AP / hotspot mode

Step 1. Edit WiFi configuration file

nano /etc/systemd/network/21-wlan0.network

Replace the file content with:

[Match] Name=wlan0 [Network] Address=192.168.0.1/24 DHCPServer=yes IPForward=no IPMasquerade=no

Save and exit: CTRL + X. Confirm save with Y.

Step 2. Restart service

systemctl restart systemd-networkd

Step 3. Edit hostapd WiFi configuration file

nano /etc/hostapd.conf

Replace the following lines (set desired WiFi password instead of eMANAGER-password. It must have a minimum of 8 characters):

logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
auth_algs=1
beacon_int=50
channel=3
country_code=ES
disassoc_low_ack=1
driver=nl80211
hw_mode=g
ieee80211d=1
ieee80211n=1
interface=wlan0
require_ht=0
rsn_pairwise=CCMP
ssid=eMANAGER
wmm_enabled=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=<eMANAGER-password>

Introduce the password of your eManager in the <eMANAGER-password> field.

Save and exit: CTRL + X. Confirm save with Y.

Step 4. Set service at startup and start it

systemctl enable hostapd
systemctl start hostapd

Step 5. Connect client via Wifi



3) Modem Configuration

Step 1. Configure the APN

Create network operator filename and fill in the APN name. For example, apn.EXAMPLE.

echo 'AT+CGDCONT=1,"IP","operator_apn"' > /etc/ppp/chatscripts/apn.EXAMPLE

Assign the apn symbolic link to point to the newly created file:

ln -sf /etc/ppp/chatscripts/apn.EXAMPLE /etc/ppp/chatscripts/apn

If the APN requires a user and password, you need:

1.1 Edit mobile-auth file to define user and password

nano /etc/ppp/peers/mobile-auth

Save and exit: CTRL + X. Confirm save with Y.

1.2 Point provider to mobile-auth file

ln -sf /etc/ppp/peers/mobile-auth /etc/ppp/peers/provider

Step 2. Configure the SIM PIN

If SIM needs PIN code, create pin code file with the correct PIN:

echo 'AT+CPIN=1234' > /etc/ppp/chatscripts/pin.CODE

Assign the pin symbolic link to point to the newly created file:

ln -sf /etc/ppp/chatscripts/pin.CODE /etc/ppp/chatscripts/pin

If SIM doesn’t require PIN code, assign the pin symbolic link to pin.NONE:

ln -sf /etc/ppp/chatscripts/pin.NONE /etc/ppp/chatscripts/pin

Step 3. Start ppp service to connect to mobile network

systemctl start ppp@provider.service

If you need to connect automatically at each startup, you must enable the service:

systemctl enable ppp@provider.service

Step 4. Check the connection status and assigned IP address

ip a | grep ppp0



4) RS232/RS485 Configuration

The following devices must be used to communicate via serial ports:

  • RS485: /dev/ttymxc4.
  • RS232: /dev/ttymxc5.



5) Leds Configuration

You have two RGB LEDs available so you can configure according to your needs. They are mapped in the /sys/class/leds/ directory.



6) Timezones Configuration

You can check available commands related with timezones configuration here.



7) Flash partition safe to system updates

To protect the data against system updates and prevent accidental loss, /data partition has been reserved. Therefore, the permanent data we want to keep should go in this partition.

The /data partition is 5GB in size, and it is only available in eManager Pro.