Menu
  • Use Cases
  • Stacks
  • Stackbuilder
  • MyStacks
  • Support
  • About Us
  • Contact
  • Use Cases
  • Stacks
  • Stackbuilder
  • MyStacks
  • Support
  • About Us
  • Contact
  • View Cart

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 4G LTE CAT-1 cellular data module. It operates in the U.S. and Canada. Please contact us for other countries. We can provide a data plan with an embedded SIM in the module.

 

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 ethernet or Wifi network.

Your Interstacks support engineer can pre-program your stacks for your specific requirements or you can use Stackbuilder to do your own programming.

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

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

Description: This block is functionally similar to the HTTP API Interface. For details on the HTTP API Interface, refer to interstacks.com/knowledge-base/internet-communication-with-http-block/
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

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/knowledge-base.
Please email info@interstacks.com with any questions.

Popular Articles

  • MyStacks Cloud Dashboard
  • Internet communication with HTTP block
  • Download and install Stackbuilder

Contact Us

Contact us with any questions or help with deploying your IoT projects.

CONTACT US

Connect

  • Facebook
  • Twitter
  • LinkedIn
  • Email

Sign up for the latest Interstacks news.

Join Our Newsletter
  Thank you for Signing Up
  Please correct the marked field(s) below.
1,false,1,First Name,2
Email:
1,true,6,Subscriber Email,2
Name:
1,false,1,Last Name,2

Copyright © 2023 Interstacks. All rights reserved. Privacy Policy | Terms and Conditions

Site by Imagebox