Manage GSM Modems

Apart from email servers, Macula supports GSM modems. These modems with your pre-installed SIM cards can send and receive SMS (short messages), which can be used for the following scenarios:

  • send custom SMS notifications from Macula servers

  • use SMS verification for 2FA

  • receive SMS to trigger internal Macula events

If the modem doesn't work in, please try with a third-party app/utility. If the external utility does not work, Macula servers will also be unable to work with that modem. Microsoft offers a free tool called Microsoft Messaging, which you can get in Microsoft Store.

Modem hardware may apply delays (60+ seconds) for SMS receiving. Please make sure that resulting SMS read frequency from the mobile operator is acceptable for your scenario.

Connect and Set Up Modems

First, plug in your GSM modem as instructed in its manual - usually, modern devices use a USB connector and a virtual COM port. The modem should appear in the Windows Device Manager - if the drivers are installed automatically, you will see it appear under Ports > Modems, occupying one or several serial ports. Check the modem properties to view the occupied port. Some of the ports may be hidden; you can view the hidden entries by clicking the Device Manager main menu > View > Show hidden devices. Normally, you will not have to do this, as active (non-hidden) modems will be used in Macula.

Then, in Macula Console, in the Configuration section, choose GSM Modems on the left. In the upper panel, click the + New GSM modem button to open the dialog box, and enter the modem settings. All COM parameters must match those on the modem side.

Available settings:

  • Title: user-defined modem name that will appear across Macula Console

  • Server: Macula server that has the modem hardware attached to it

  • COM port: choose the port used by the target modem

  • Baud rate: must match the modem setting

  • Data bits: must match the modem setting

  • Stop bits: must match the modem setting

  • Parity: must match the modem setting

  • SMS mode: choose TEXT mode unless you need (and know how) to use special characters that are only supported in PDU mode (GSM7 encoding only)

  • SMS encoding: GSM7 (special ASCII for GSM) or USC2 (special version of Unicode for GSM)

For correct COM port, check the modem port under Modems in the Device Manager as displayed above; depending on the modem driver, there may be multiple ports, including hidden ones. Some of these are usable by Macula, and some may be auxiliary: after creating the modem, use the Test button in the upper panel to test the connection and check if you have picked the right one.

If you use GSM-7 (ASCII) and your message shows full of ? of other odd characters, try switching to USC2.

After filling in the settings, click OK to save: the newly created modem connection will appear in the list. Click the Test button to verify the connection: if the status retrieval fails, try selecting a different COM port. If none of the ports work, ensure that the serial port settings (baud rate etc.) match the settings on the modem side exactly.

The Test dialog box has two functions:

  • modem status: verified automatically

  • test SMS: enter phone number and text to send the message

Macula pings the modem every 30 seconds for the status update, and every 3 seconds for new messages. If you experience delays in message reception, these are most probably introduced by the modem hardware, and are not related to Macula server setup. Use the modem with 3rd party tools and compare the delay to verify.

To test against a specific phone number, enter the phone number - either in the international format (including the country code using either + or 00 prefix), or without the country code if the number is local for the SIM operator. Click OK to attempt sending the short message. If the number is incorrect, you will get a failure notification. If everything is fine, you will get a success message, and the message will arrive shortly (usually, instantly) to the target phone.

Wherever you need to enter a phone number in Macula Console, we recommend that you do it in the international format: first + (or 00), then the country code, and then the number itself. The number must not include any spaces, dashes, or parentheses.

Example:

  • number in the local format: (012) 8090-8080

  • the same number converted into the international format: +601280908080

The billing for the messages will be as per your SIM card plan.

If you respond to that test SMS, the modem will receive it and you will see it appear in the modem status summary under Last messages. The exact time of the message reception may vary depending on the modem hardware and settings; Macula does not introduce any additional delays.

Important! Make sure your modem does not go to sleep. To do this, go to the Windows Device Manager, find your modem under Modems, and check the Power Management tab for related settings. Do not allow the PC to turn OFF the modem to save power.

Configured modems will appear in the corresponding tab of the Monitoring section.

Receive SMS

Once you add a modem, you will be able to receive SMS and use it for event triggering on Macula servers.

Modem Events

To create an SMS event, switch to the Events & Actions section of Macula Console, and choose Events on the left (you can also create new events right from the E&A Configurator). In the top panel, click the + New event button, then select the SMS message received event type in the dialog box, and then fill in the rest of the settings:

  • Title: user-defined event name

  • Source: existing modem hardware to accept the message

  • Phone: sender's full phone number*; leave empty for any number

  • Text: SMS text to trigger the event, case-sensitive; leave empty for any text to trigger the event

  • Regular expression: enable if you wish to evaluate the incoming text with regex, e.g., use placeholders

*The phone number must be in the international format (with leading + or 00 and a country code) for ALL numbers, even local ones. The event will not work properly without the country code.

Click OK to save and close the dialog box. The newly created event will appear in the list.

Once you have created the event, you can use it to build event rules in the Event & Action Configurator, as usual. For example, you can send SMS to trigger start/stop recording, to open doors and gates, or to create alarms and bookmarks.

Send SMS

Similarly, modems can send SMS to the pre-configured phone numbers. Macula servers can utilize this in two scenarios:

  • send messages based on the triggered events - E&A actions

  • send codes via SMS for two-factor authentication (2FA)

Note that you cannot create actions or 2FA notification providers without actually having a working modem, so make sure to add and test the modem first.

Modem Actions

To create an SMS sending action, switch to the Events & Actions section of Macula Console, and choose Actions on the left (you can also create new actions right from the E&A Configurator). In the top panel, click the + New action button, then select the Send SMS action type from the Notifications group in the dialog box, and then fill in the rest of the settings:

  • Title: user-defined action name

  • Source: existing modem hardware to send the message

  • Phone: the recipient's phone number*

  • Text: SMS text to be sent, right-click to insert text macros

*If the phone number does not have a country code defined, the local country code of the SIM card operator will be appended to the number. If you want to guarantee the number correctness and the message delivery, please enter the number in the international format with a country code and a leading +/00.

Depending on your modem settings and chosen language, each message may be split into several ones. Before setting up the notifications on production servers, verify the setup and make sure you are getting the desired results.

Two-Factor Authentication (2FA)

Before enabling 2FA:

  • add a valid modem and test it

  • ensure all users who will use 2FA have a valid and full phone number specified in their account properties in Macula Console

The phone number setting is new (comes with the modem support) so you will need to go each user's properties and enter their phone number to make sure they can receive SMS for the verification.

To set up 2FA, go to your Macula server settings (for Macula Global systems - go to the central management server properties, as this a is system-wide setting) > Two-Factor Authentication tab > add a new notification provider and specify the rest of the settings as described in the corresponding chapter about 2FA.

Last updated