Cell Network hardware block

Use the Interstacks Cell Data hardware block to send text messages and connect to the internet over the cell data network. The Interstacks Cell Data hardware block is a Verizon 4G LTE CAT-1 cellular data module. It operates in the U.S. only. (Please contact us for other options).

cell_modem_block
celldata_photo

Get Activation Information
To activate your cell data module on Verizon’s network, you will need two numbers: the ICCID and the IMEI. Launch Stackbuilder and connect your stack using the USB cable. After a connection is established, click on the “Stack Info” tab across the bottom of the Stackbuilder window. This will display the hardware blocks in your connected stack. In the picture of the stack, click on the Cell Data module. The right side of the Stack Info panel will now display the properties of the Cell Data module. Write down, or copy and paste, the numbers in the ICCID and IMEI properties.

Activate Cell Data Plan
The Interstacks Cell Data module is a Verizon 4G LTE CAT-1 module. You can use the above information to activate a M2M data plan using various services that work with Verizon, or Verizon directly.

To activate a Verizon data plan via Nimbelink, go to this web site: go.nimbelink.com
You must first create a Nimbelink account and enter your credit card payment information. Then use the Activate Verizon 4G device area. Select your data plan and then enter the ICCID and IMEI numbers for your Cell Data hardware to activate your device on Verizon’s network.

Current pricing on Nimbelink’s web site:

nimbelink_pricing

Each cellular device does need its own data plan, but the Nimbelink system does pool the data for all your devices together. So you could have one plan with 1 GB of data that shares its data pool with a bunch of devices on 1 MB plans. For larger deployments, they can also set up volume pricing. You will be able to see daily reports on your data usage by logging in to your Nimbelink account and clicking on the ICCID link in the “My Services and Equipment” area. You can email product.support@nimbelink.com for data plan support.

Sending Data to the Internet over the cell network
Unlike sending data to the internet over a Wifi network, every byte of data sent over the cell network incurs a cost to your data plan. Hence, please think about your system’s strategy for the amount and frequency of data sent, and hence the design of your stack’s blueprint. Typically you will send smaller amounts of data, less frequently than if using a wired or Wifi network.

Creating a Stack Blueprint that uses the Cell Data block
You will need to launch Stackbuilder and import the following blocks into your MyBlocks library.
Select “My Blocks” in the right rail, then under the “Blocks” pull down menu, select import.
Copy and paste the following ID into the import dialog: ~01076c962888ed11e79acce9b785b9bb4f
That imports “Cell Modem Block”.
Do the same for ID: ~0171793e1a665e11e7be28834f65bce283
That imports the “Cell UART HTTP API” block.
Finally, there is a full example project that can be imported using the following ID:
Select the “Projects” tab on the right rail, then “Import” from the “Blocks” pull down menu.
~0146792e4088f611e79accd85bf5a26e6b
This project will be Read Only, but you can view all of it and make a copy that you can edit.

Cell Modem Block - ~01076c962888ed11e79acce9b785b9bb4f

cell_modem_block

Description: This blueprint provides the hardware interface and related message parsing to communicate at the TCP level with flow control via a multiplexer that provides a maximum of 4 simultaneous TCP connections.

INPUT TERMINALS:

1:properties - Standard property get and set input terminal

3:init - Any message sent to this terminal will trigger the modem to activate and initialize. Typically the Base module's "22:Stack Ready" output terminal is wired into this terminal.

5:send_sms - Attempt to send a message M to a phone number P specified in the following format as a string "P:M"

7:reset - Resets the modem.

9:tcpin_1 - This terminal is part of a multiplexer. This terminal receives TCP messages from a higher level block such as a Cell UART HTTP API Block

11: flowin_1 - This terminal is part of a multiplexer. This terminal is used in conjunction with the above terminal to provide flow control

The rest of the input terminals repeat the same functionality of the above two pairs thereby providing a maximum of 4 flow controlled TCP connections to the Cell Modem Block.

OUTPUT TERMINALS:

2:presponse - Standard property response output terminal

4:modem_status - This is similar to the WIFI module's wifi_status terminal. Emitted message are 0, 1 or 2. The value of 2 indicates the cell modem is ready for communication. Typically this value is used to trigger the rest of the business logic that deals with REST calls with the cloud etc.

6:sms_sent - Provides the status of the last sms message that was sent via the modem. 0 indicates success, -1 indicates failure.

8:sms_received - When the cell modem receives a text/sms message, this terminal sends the message M received from phone number P in the following string format "P:M"

10:tcpout_1: This terminal is part of a multiplexer. This terminal sends TCP messages to a higher level block such as a Cell UART HTTP API Block.

12:flowout_1: This terminal is part of a multiplexer. This terminal is used in conjunction with the above terminal to provide flow control.

The rest of the input terminals repeat the same functionality of the above two pairs thereby providing a maximum of 4 flow controlled TCP connections to the Cell Modem Block.

Cell UART HTTP API Interface - ~0171793e1a665e11e7be28834f65bce283

cell_uart_block

Description: This block is functionally similar to the HTTP API Interface. For details on the HTTP API Interface, refer to interstacks.com/support/internet-http
This extended blueprint exposes a pair of input and output terminals that can be connected into a Cell Modem Block's multiplexer providing the TCP connection and flow controls.

PROPERTIES:
Same as the HTTP API Interface block. No new properties.

INPUT TERMINALS:

6:tcp_in - This receives TCP messages from any one of the multiplexed outputs of the Cell Modem Block.

8:flow_in - This is a corresponding flow control terminal of the above terminal.

OUTPUT TERMINALS:

8:tcp_out - This send TCP messages to any one of the multiplexes inputs of the Cell Modem Block.

10:flow_out - This is a corresponding flow control terminal of the above terminal.

The following is a sample project blueprint to illustrate the use of these blocks.

Cell Modem HTTP Example Project - ~0146792e4088f611e79accd85bf5a26e6b

cell_example_bp

Import the above UUID into Stackbuilder to try.

The example project illustrates sending data to a cloud (IBM Watson in this example) using the Cell Modem module. The Cell Modem Block is initialized by connecting the Base module's "22:Stack Ready" output to the "3:init" terminal. This initiates the cell modem to start communicating with the network provider which may take a few seconds after which a message from "4:modem_status" with a value of 2 indicates the block is ready. In this example, the modem status is wired into the "test rest api" block that kickstarts a REST API call to the IBM Watson cloud using the Cell UART HTTP API block. Note the tcp and flow controls are wired to one of the corresponding terminals of the Cell Modem Block's multiplexer.

Notes:
1) If the "4:modem_status" terminal does not emit the message 2 for more than 20 seconds after the stack is booted/running, try rebooting the stack and try again. Sometimes, the cell modem may not be able to acquire sufficient signal strength to communicate with the cell network infrastructure. It might also help moving the stack closer to a window or another place for better cell reception.

Refer to documentation on many other topics at interstacks.com/support.
Please email info@interstacks.com with any questions.