How can I communicate with my device using a Hologram SIM?
| Method | Outbound | Inbound | Pricing |
|---|---|---|---|
| Hologram Cloud messaging (TCP/UDP) | No | Yes | Data usage |
| Direct IP | Yes | No | Data usage |
| Spacebridge IP device tunneling | No | Yes | Data usage |
| SMS via Hologram Cloud | Yes* | Yes | Outbound: Data usage Inbound: Free |
| Circuit-switched SMS | Yes | Yes | Outbound: Per message Inbound: Purchase a phone number |
Hologram Cloud messaging
The Hologram Cloud is the easiest way to send data between your device and the internet. The mechanisms for inbound and outbound communication are somewhat different, but in both cases, the Hologram cloud forwards messages between the device and the internet using the device’s cellular data.Inbound (TCP/UDP to device)
Hologram exposes an API endpoint and an interface in your dashboard to send TCP or UDP messages to any port on your cellular device. This requires that your device runs embedded Linux or otherwise implements a networking stack. The Hologram Cloud translates the API requests (or submissions through your dashboard) into raw TCP/UDP messages and sends them to the desired device.Direct IP
Devices on the Hologram cellular network have access to the full internet, so you may use any IP-based protocol to communicate with any internet-routable host. In fact, Hologram’s Cloud messaging API relies on this standard IP connectivity. Advanced users may wish to bypass the Hologram Cloud and instead communicate directly with servers they control. For security Hologram cellular devices do not have internet-routable IP addresses, so you can’t connect to your device directly from the internet. This means that to send data to your device, the device must first establish a connection to an outside server and request the data. The server can then send data back to the device in a response using the already-established connection. This request-response pattern is the basis for many common protocols such as HTTP. If device-originated requests aren’t a good fit for your application, you can connect to your device via a tunnel, covered in the next section.Secure device tunneling with Spacebridge
Since devices on the Hologram network do not have internet-routable IP addresses, it’s not possible to directly connect to the devices over the internet. This makes it hard to use the device as a server that can listen for incoming requests. The solution is to establish a connection–or tunnel–through a different server which does have the ability to connect to your device. Hologram provides a service called Spacebridge, which uses secure SSH tunneling to let you connect to any port on your device. The inbound Cloud Messaging feature above relies on a Spacebridge tunnel behind the scenes. The Cloud Messaging approach is a simpler alternative to Spacebridge if you don’t require direct access to the network socket. See our device tunneling guide for details.SMS via Hologram Cloud
Outbound (from device)
Outbound SMS messages sent via API will appear as originating from an internal Hologram phone number. This is the case even if you have bought a phone number for receiving inbound SMS messages.Inbound (to device)
Even if you don’t buy a phone number for your device, you can send SMS messages to it from your dashboard or REST API. You may also configure the phone number that the SMS will appear to originate from. To read inbound SMS messages on the device, use AT commands to request them from the modem or follow the equipment’s instructions.Circuit-switched SMS
Outbound (from device)
To send an SMS via the standard SMS switching network, use AT commands to request them from the cellular modem. Outbound SMS messages will appear as originating from an internal Hologram phone number. This is the case even if you have bought a phone number for receiving inbound SMS messages.Device-originated SMS messages have a cost associated to them based on the data plan the SIM is under.
Inbound (to device)
To receive SMS messages from other SMS-capable devices, you must buy a dedicated phone number for your Hologram device. To read inbound SMS messages on the device, use AT commands to request them from the modem or follow the equipment’s instructions.Related actions
Send messages to SIMs
Send TCP, UDP, or SMS messages to your devices
Spacebridge device tunneling
Establish secure SSH tunnels to your devices
Create and manage alerts
Forward device messages to external services
Purchase a phone number
Enable inbound SMS from external numbers