EMnify SMS via SMPP integration with Gurtams' flespi and Wialon


Integrate EMnify SMS via SMPP API with Gurtams' flespi and Wialon 

Gurtam is a Lithuania-based developer and provider of IoT/telematics platforms Wialon and flespi. Wialon is the end-to-end fleet and asset management platform, and flespi is the back-end platform used to build custom telematics/IoT solutions and applications. As of early 2022, over three million IoT and telematics assets are connected to Gurtam's platforms.

For GPS trackers and telematics devices configuration often happens over SMS commands. Flespi provides an intuitive interface to send parameters and commands to a device. By default, flespi uses its own SMS provider to send SMS to the device, charging 10 cents per SMS (10 SMS per month free). You will also need to pay mobile terminating SMS fees - with EMnify this is one cent per SMS. 

In this integration guide, I will demonstrate how you can connect the SIM operator via SMPP with flespi, ensuring that SMS are sent directly over the EMnify platform so only the mobile terminating SMS costs are applied - reducing costs by more than 90 percent.   


For this guide, you should have a basic familiarity with flespi and the EMnify portal. You will only need:

  • A GPS tracking device with EMnify SIM (we will use a Teltonika FMM130 tracker)
  • A flespi account and, optionally, a Wialon account 
  • An EMnify account 

Configuration steps for SMS modem integration

First up, let's configure the SMS modem in flespi. Login to your flespi account and under the Telematics Hub, click on the Modems section. Add a new modem configuration by clicking the "+" Sign on the lower right corner.

Give the modem a name, priority and select SMPP in configuration. Within the URI field, enter customer-smpp.emnify.net:3550 - and activate SSL. This ensures that your SMS data is securely transported to the EMnify platform. 

You can retrieve the SMPP credentials through the EMnify portal:

Simply, go to Device policies -> select the service policy for the group of devices you want to send SMS to -> scroll down to SMS interface and select SMPP.  You should see the system ID and by clicking on Reset Password you will get a new password

Enter the information in flespi into the modem configuration and use any source address you like (this will be the sender of your SMS). Once you have saved the SMS modem, you will almost be finished with the configuration. 

The only thing that you need to ensure is that the devices you have configured in flespi also have the proper MSISDN (phone number):

In flespi, go to Devices and either create a new one (+ on the lower right corner) or select an existing device. Make sure that in the Device phone or ICCID field you enter the MSISDN. The MSISDN can be found in the EMnify portal -> Connected Devices -> Search for the device. 

Now you can directly send SMS from the flespi interface over the EMnify platform. You will even be able to see the SMS and its delivery status in the EMnify Portal in the SMS console. 


Send SMS from Wialon to the device

Now that you have set up the SMPP API integration in flespi - you can enable SMS sending from Wialon to the device. This is handy if there is no data session but the device is still attached to a network. There is a great article in the flespi knowledge base on how to connect flespi and Wialon, and then to send commands: https://flespi.com/kb/how-to-send-commands-to-devices-connected-to-wialon-via-flespi-stream. If you follow this guide you just need to do small adjustments in steps four and five. 

In step four, ensure that you also enter the device phone number / MSISDN - as outlined above. 

In step five, select "SMS" as the channel. 

And that's it!


Sending configuration, reboot, or sensor measurement values via SMS is still a very common use case. With the integration of the EMnify SMPP API into flepsi and Wialon, you can use your SMS workflows without going through another SMS provider - not only reducing costs by 90 percent but also making the message delivery more direct and secure. 


Related Posts