Configuration with a custom server
Efento NB-IoT loggers send data using the CoAP protocol (RFC 7252 Constrained Application Protocol). CoAP is a lightweight UDP based data exchange protocol that is one of the standard IoT protocols. The data is sent in Protobuf format, which, thanks to its low overhead, is also very convenient for sending data by Internet of Things devices.
Efento loggers can be easily integrated with any server application. Integration allows users to access all the loggers’ features in their application - this includes both receiving the data from the loggers and remotely configuring the devices. There are two options of integrating Efento Loggers into your cloud platform:
Efento CoAP Loader - Efento CoAP Loader is a CoAP server that listens to the data coming from Efento Loggers, translates it to JSON messages and sends over REST to the customer's application. Moreover, using its API, it is possible to remotely change the settings of Efento Loggers. This is the quickest way of integrating Efento Loggers into your solution. You can download Efento CoAP loader and its documentation here.
Direct integration - if your platform supports CoAP protocol, Efento Loggers can send the data directly to it. All you need to do is deserialize the payload sent by the devices. You can also send new configuration to the devices using protobuf messages. Please refer to our demo code and messages payload documentation.
Should you have any questions about the integration, please contact our support team.
The initial configuration of Efento NB-IoT loggers is done with Efento mobile application for Android devices that can be downloaded from Google Play. The application allows you to configure all parameters of the logger and read the measurements from the logger's memory. After that, the configuration can be either done locally or remotely, from a server.
After downloading and launching the app select the “Nearby devices” mode, you will see all the loggers that are in your mobile device’s range.
Tap on the main menu icon (three lines in the upper left corner) and quickly tap the Efento logo 5 times. This will activate the Power user mode and give you access to full configuration of Efento loggers.
Activate Power user mode to get access to full configuration options of Efento loggers. To activate Power user mode, quickly tap 5 times on the Efento logo in the Efento application main menu.
Tap on the logger you’re interested in, the app will connect to it and show the logger’s information along with its current configuration. To open up the settings menu, tap on the „three dots” icon in the upper right corner.
Tap on “Cellular network status” in order to display the current status of the network communication. Check the value of the “Registration status” field.
If the value is:
REGISTERED
REGISTERED ROAMING
The logger has registered on the network. You do not need to change the network settings of the device.
If the value is:
NOT REGISTERED, SEARCHING
The logger is still trying to connect to the NB-IoT network. Wait for 5 minutes and check the status again. It may also be required to manually select the network, on which the device has to register (this is described in the further steps of this manual)
If the value is:
REGISTRATION DENIED
REGISTERED EMERGENCY ONLY
UNKNOWN
The device is not able to properly register on the network. Contact your mobile operator to identify and solve the issues. If the device has been rejected by the network, the reason will be listed in the “Registration reject cause”. Provide your operator with that value, to speed up the troubleshooting.
If the value is:
NOT REGISTERED_NOT_SEARCHING
Most probably there is no NB-IoT network coverage in the place where the logger is located.
If the device has not registered on the network automatically, you need to manually select the carrier. Connect to the logger with Efento mobile application, go to the “Settings” menu and select “Power user” -> “Network settings” -> “PLMN code”. PLMN is an unique operator identifier. You should get the information about the PLMN code of your operator either from the operator or you can check it here. Set the PLMN code, save changes and after a few minutes check, if the logger has successfully managed to register on the network.
In order to allow the logger to communicate with the server, you need to assign it to a proper APN. The APN (Access Point Name) is the name of a gateway between a mobile network and the public Internet. APN settings define what servers the loggers can communicate with. You should receive the information about APN settings along with the SIM card. If you did not receive the APN settings, try setting it to “Auto” (default settings).
In order to set the APN, connect to the logger with Efento mobile application, go to the “Settings” menu and select “Power user” -> “Network settings” -> “APN”.
After successful network registration, the device will fetch the time from the network. From now on, all the measurements taken by the device will have the timestamp assigned. If for any reason the device is not able to fetch the time from the network, it will try to connect to the Efento Cloud platform and get time from the server. If the connection with the server is also not possible (e.g. device communicates with a third party server, or APN is configured incorrectly), it is also possible to set the logger’s time using the Efento application.
During the registration process the logger saves the measurements in its volatile memory (RAM), and after fetching the time from the network, it will assign correct timestamps to the measurements. If the battery is removed before fetching the time from the network, these measurements will be lost.
If you set both PLMN and APN correctly, but the logger is not able to register on the network or communicate with the server, please refer to the “Troubleshooting” section of this manual.
Once the logger is successfully registered in the network, you can set the address of the server, to which the logger will send the data:
Connect to the logger with Efento mobile application, tap on the three dots in the upper right corner -> “Power user” -> “Server configuration” -> “Data server”.
Select “Other” and key in the address and port of the server, to which the data should be sent.
Efento sensors support DNS, but the recommended approach is to use the server’s IP address (sensor does not need to connect to DNS server in order to obtain the IP address of the data server). If you prefer to use DNS, make sure you configured the DNS server (“Power user” -> “DNS” -> “DNS server”).
By default, the sensor will send the data to the “/m” endpoint. If you prefer to use a custom endpoint, you can configure it in the “CoAP endpoints” tab in the settings menu (“Power user” -> “Server configuration” -> “CoAP endpoint”). CoAP endpoints can be set to any value (e.g. “/data”) or can be dynamically set, based on the sensor parameters (e.g. “/SENSORS_IMEI”). In order to set the endpoint address dynamically, use tars: “#S” - sensor’s serial number, “#I” - sensor’s IMEI, “T” - sensor’s cloud token. You can use the tags in the endpoints in any way you like - e.g. setting the endpoint address to “data/#I” will set the endpoint to “/data/SENSORS_IMEI”
If you want to, you can use the “Organisation token” field to send additional information to the server (e.g. API token). Optionally, you can set the logger to send its IMEI to the server. To switch that option on, select the checkbox “IMEI as token”.
Last updated