FAQS¶
1) How to reinstall an opkg package?¶
To reinstall an opkg package, you have to use the following command:
opkg install <package_name> --force_reinstall
Being the <package_name>
, the name of the package that you want to reinstall.
2) How to start/stop Node-RED?¶
systemctl start node-red
is used to start the Node-RED service.
systemctl stop node-red
is used to stop the Node-RED service.
Other Node-RED interesting commands that could help are:
systemctl restart node-red
, which is used to restart the Node-RED service.
systemctl status node-red
, which is used to see the current status of the Node-RED service.
3) Where to store my projects in the eManager?¶
If you have an eManager Pro you can access to the /data
partition.
Otherwise, if your eManager is not the Pro version, you can use the following directory:
/usr/etc/<your_project_dir>
Being <your_project_dir>
the desired directory where the user wants to save theid data and projects.
4) How to configure port forwarding?¶
If you want to configure port forwarding in your device, you can do it using ssh.
For example, if you want to make an ssh port forwarding to auto redirect the external port IP_eManager:80 to the IP_eManager:1880, you should use the following command:
ssh -L public_IP_eManager:80:localhost:1880 localhost -N
Note
The ports that appear in the example can be changed.
5) How to check the level of coverage of the modem?¶
There are 2 possible ways to check the level of coverage of your modem:
- Open and check the file
/run/modem_report.json
.- Check the LED colors. You can find the LED's codification here.
6) How to change the journald logs from volatile to persistent?¶
If our eManager is configured with volatile logs and we want to change it to persistent logs, the following steps must be followed:
Step 1. You have to update your eManager using:
opkg update opkg upgrade
Step 2. You have to edit the
/etc/systemd/journald.conf.d/journald.conf
file and:
- Add the
Storage=persistent
line at the end of the file.- Update the field
ForwardToSyslog
toyes
.Step 3. Execute the following commands:
systemctl stop systemd-journald.service rm /var/log mkdir /var/log cp -R /var/volatile/log/* /var/log sync systemctl start systemd-journald.service
Caution
Persistent logs must be used as an extraordinary tool for debug and must be limited in time, to avoid run out of flash.
If we want to turn the persistent journald logs into volatile again, you have to:
Step 1. You have to edit the
/etc/systemd/journald.conf.d/journald.conf
file and:
- Delete the
Storage=persistent
line at the end of the file.- Update the field
ForwardToSyslog
tono
.Step 2. Execute the following commands:
systemctl stop systemd-journald.service cd /var/ cp -R log/* volatile/log/ rm -fr log ln -s volatile/log/ log sync systemctl restart systemd-journald.service
If you want more information about using journalctl commands to view and manipulate systemd logs, please check here.
7) How to install an opkg package in the eManager?¶
First of all, you can check which packages are already installed in your eManager using:
opkg update
opkg list_installed
If you want to install another package, you can use opkg list
to see the available packages in the eManager that you can install. Then, to install it you must execute opkg install <package_name>
, where <package_name>
is the name of the desired package obtained from the list of available packages.
8) How to reinstall the original version of npm?¶
If you want to reinstall the original version of npm due to an undesired update, which can generate incompatibility problems, you have to execute the following commands:
opkg install nodejs-npm --force-reinstall
systemctl restart node-red
9) How to access the eCore/eManager without knowing the IP?¶
First, find out its hostname. It has the form
model-<six_last_digits_of_the_MAC_address>
For example, an eManager-Pro
with MAC address F8DC7A313CE8
has hostname eManager-Pro-313CE8
.
Now you can use this hostname as an URL (as the path in a web browser) to access the eCore/eManager, by adding .local
.
To access the Node-RED editor of the eManager in the example above you can use:
eManager-Pro-313CE8.local:1880
10) How can I install SQLite Node-Red node in the eManager?¶
To install the SQLite node in the eManager, the following steps must be followed:
Step 1. Update eManager packages using:
opkg update
Step 2. Install core-buildessentials package using:
opkg install packagegroup-core-buildessential
Step 3. Install SQLite package using:
opkg install sqlite3
Step 4. Install SQLite node in Node-RED using:
systemctl stop node-red cd /var/lib/node-red/ npm install node-red-node-sqlite systemctl start node-red
Important Information
This process may take around 20 minutes.
11) How to include certificates in the eManager?¶
You can find the system certificates in the following path:
/usr/share/ca-certificates/mozilla
To add certificates in Linux, you must copy the certificate in the /usr/local/share/ca-certificates/cert.crt
path and run:
sudo update-ca-certificates
To add certificates to Node-RED you must set an enviromental variable called NODE_EXTRA_CA_CERTS
to the certificate path as follows:
NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/cert.crt