In this example, the GSM card Polygator PCI-Express with 8 GSM-modems is located in the server with IP-address 192.168.3.189.
A Linux driver is installed on the server. Due to the driver, modems are defined in the system as a set of serial ports. To provide access to GSM-modems via TCP / IP, we assign each modem an unique TCP / IP port number using the ser2net utility.
For example, the addressing of GSM channels is configured using the ser2net utility as follows:
1st channel (modem) – port 30000
2nd channel (modem) – port 30001
3rd channel (modem) – port 30002
4th channel (modem) – port 30004
Example of the configuration file of the ser2net utility:
30000: raw: 600: / dev / ttyPG0: 115200 8DATABITS NONE 1STOPBIT
30001: raw: 600: / dev / ttyPG1: 115200 8DATABITS NONE 1STOPBIT
30002: raw: 600: / dev / ttyPG2: 115200 8DATABITS NONE 1STOPBIT
30003: raw: 600: / dev / ttyPG3: 115200 8DATABITS NONE 1STOPBIT
Accordingly, in order to reach GSM-ports by AT-command, you need to connect to the following addresses:
1st channel – 192.168.3.189:30000
2nd channel – 192.168.3.189:30001
3rd channel – 192.168.3.189:30002
4th channel – 192.168.3.189:30004
For a test connection, let us use the free utility Hercules by HW-group.com
1) Let’s check the presence of connection to GSM-port number 1 (TCP / IP port 30000). Connect to the port 30000 by typing in IP and Port data in the right top corner and clicking “Connect”:
The port opens successfully.
2) Let’s check if there is a connection with the GSM-module by sending the command “AT”:
There is no answer from the module.
3) Install the SIM card and check again:
We see the service information received from the GSM-port during the registration of the SIM-card. Then re-submit the command “AT” (marked in yellow) and this time we get the answer of the GSM-module “OK”. Free the port 30000 by clicking “Disconnect” in the right top corner.
Adding GSM-port as gateway “GSM Modem Gateway” to the program Diafaan:
The Diafaan program connects to the port the same way. Here’s what you’ll see if the GSM port does not have a SIM card when you press the Test button:
Here is how ready-for-use GSM-port in the Diafaan program looks like:
Similarly, the other channels with port numbers 30001, 30002, 30003, etc. are added.
Here is how the program windows looks like with the configured 4 ports (9_0 to 9_3) and 4 disabled ports (9_4 to 9_7).