Inter-device communication by SORACOM Gate
SORACOM Gate (Gate) is a service that enables you to virtually connect a customer’s network and devices via LAN and secure connection to IoT devices. Gate uses a gateway called VPG (Virtual Private Gateway), (1) a function for directly accessing a device from a customer’s network, (2) a function to communicate between devices connected via a network with Air SIM, (3) Provide the function of assigning a private private IP to the device.
In this document, the setting procedure of inter-device communication among the functions of Gate is explained along the following steps.
- Step 1: Create VPG
- Step 2: Register SIM group to enable device-to-device communication in VPG
- Step 3: Register Air SIM that uses inter-device communication to group
- Step 4: Enable communication between devices
- Step 5: Confirm that communication between devices can be performed
- Step 6: Disable device-to-device communication
The prerequisites for this document are as follows.
- You have created account of SORACOM
- SORACOM Air SIM (Air SIM) and at least two devices available
- This document explains how to activate only Gate’s interdevice communication. If you also want to use the function to directly access the device from the customer’s network at the same time, please follow the SORACOM Gate Getting Guide.
- In this document, we introduce a method to communicate between devices using VPG dedicated to customers, but we also provide a function called “Public Gate” for temporary verification. For details on how to use the Public Gate function, please see the Public Gate.
Step 1: Create VPG
To use Gate’s function, you first need to create VPG (Virtual Private Gateway). In the user console, create a VPG by the following procedure.
- Click the menu button on the upper left of the screen, select the “VPG” menu, and go to the VPG list screen.
- Then click the “Add VPG” button, the VPG creation dialog will be displayed.
- Enter the name of VPG and select “Gate” as target service.
- Setting option 1: If you do not need internet connection from the device, set “Use Internet gateway” to “OFF”.
- Setting option 2: If you want to specify the range of the private IP address to be assigned to the device, enter the IP address range in “Device subnet IP address range”.
- Clicking the “Create” button starts VPG creation.
VPG startup is completed if “state” of VPG list screen becomes “running” after waiting a few minutes.
Step 2: Enable communication between devices Register SIM group in VPG
When VPG starts, click on the VPG from the list screen and move to the setting screen. Next, click the “Add Group” button in “Basic Settings” and select the group for which you want to activate communication between devices.
- If there is no group, please create a new group referring to the procedure of How to use user console: Create group.
Step 3: Using device-to-device communication Register Air SIM in group
Next, refer to the Getting Started Guide How to use the user console: Change group of Air SIM and register Air SIM in the group set in step 1.
When changing the VPG setting of the Air SIM group, it is necessary to recreate the 3G / LTE session in order to reflect the setting. If there is already a communicating device, recreate the session in one of the following ways.
- When the device is on hand
- Smartphone, tablet, etc.: On / Off is executed when there is Air Plane mode (airplane mode)
- For Raspberry Pi etc.: Reconnection of 3G / LTE (restart of ppp etc.)
- Other: Restart the device itself
- When the device is in a remote place (※ Please confirm beforehand that there is a session reconnection mechanism on the device side)
- Disconnect 3G / LTE session once with “Session Disconnect” function of user console and wait for reconnection from device
- Execute deleteSubscriberSession API
Step 4: Enable communication between devices
VPG setting screen> “Advanced setting”, set “Enable Gate” to ON and save. By enabling Gate, Air SIMs under the same VPG can communicate with each other.
Step 5: Confirm that communication between devices can be performed
After setting up so far, the devices communicating with the Air SIM registered in the group are ready to communicate with each other. Let’s try communicating from one device to the private IP of the other device and confirm that communication can be established.
If you can not communicate, please check the following items.
- Check whether group settings are correct
- Is Air SIM registered in VPG-enabled group?
- Are 3 G / LTE sessions re-created after the setting
- Communication is not blocked by the firewall on the device side
Step 6: Disable device-to-device communication
When using Gate’s device-to-device communication function, VPG option usage fee will be charged according to VPG usage fee and the number of SIMs belonging to Air SIM group with VPG enabled. If communication between devices becomes unnecessary, invalidate Gate · Invalidate VPG from group setting · Delete VPG Please perform either operation.
On the user console, if you set the “Enable Gate” switch on the “Advanced Settings” tab of the VPG setting screen to “OFF” and save it, the gate will be invalidated and communication between the devices will be invalidated .
At this time VPG itself and the association with the group remain intact. The usage fee of VPG and the optional usage fee for Air SIM under VPG will continue to occur, but if you need inter-device communication again, just save the “Enable Gate” switch as “ON” , You can use the same setting again.
Release VPG’s and group’s association
In the user console, unregister the corresponding group from “Group using this VPG” on the “Basic settings” tab of the VPG setting screen. If the VPG association is canceled, communication between the devices is also invalidated.
In this case, only the association between VPG and the group is canceled, and VPG itself remains as it is. The VPG usage fee is generated continuously, but since the link between VPG and group setting is canceled, option usage fee for Air SIM under VPG will be stopped.
In the user console, first unregister the corresponding group from the “Group using this VPG” on the “Basic settings” tab on the VPG setting screen, then on the “Advanced settings” tab of the VPG setting screen, VPG is deleted by clicking the “Delete VPG” button.
Since VPG itself is deleted at this time, charging to VPG is stopped. However, when you need VPG again, you need to create a new VPG. Please be aware that setup costs will occur when VPG is started.