Cellular X-CUBE-CELLULAR

Revision as of 17:56, 14 April 2020 by Registered User
Under construction.png Coming soon

Click here for Cellular overview

1. What is X-CUBE-CELLULAR

X-CUBE-CELLULAR consists of a set of libraries and application examples for STM32L4 Series MCUs acting as hosts for cellular connectivity applications.

2. Provided applications

Several applications are provided as examples:

  • PING Client application to test the access to a remote machine
  • ECHO Client application to provide an example of connection and data exchanges using the TCP or UDP (connected or not-connected mode) socket protocols
  • HTTP Client application to exchange data between the device and the cloud using HTTP protocol
  • MQTT Client application to exchange data between the device and the cloud. On the cloud side, a dashboard is the interface with the end user
  • COM Client application to test the access to other services than sockets provided by the COM library (such as read information from ICC)
  • CUSTOM Client application, an empty application already pre-integrated in X-CUBE-CELLULAR. It is provided to ease customers development.

3. Setup for MQTT Client

First solution, manually from scratch:

  • setup a server on Internet
  • install MQTT server
  • install NodeRED
  • configure NodeRED with json file provided by STMicroelectronics
  • configure the device with the server parameters (URL, Login, Password)

2nd solution, use pre-installed services from stackhero.io

  • connect to https://www.stackhero.io
  • create an account
  • create a new stack, give it a name
  • select Node-RED by clicking on "Start Node-RED"
  • select an instance, "Hobby" is enough for this demo, click on "Start now"
  • in your stack you can see the Node-RED instance just created, select it
  • there are 2 URL displayed to use, "Node-RED admin console" and "Node-RED dashboard" (logins and passwords are in "Configure" item)
  • in one tab of you browser connect to Node-RED admin console, used to setup the Node-RED flow
  • in another tab connect to Node-RED dashboard, used to display the dashboard
  • in admin console import json file provided by STMicroelectronics (Utilities/MQTT/)
  • delete the 2 existing Flows
  • Deploy the Node-RED, you can see the dashboard in the Dashboard tab of your browser
  • note your server address, example mqtts://yayer0.stackhero-network.com:8883/
  • Update the device (using boot menu) with your server address, user login (user1) and user password (123abc)
  • After boot, device sends data to the dashboard and can be notified from the dashboard

Note that .json file and its license is located here Utilities/MQTT/flows.json

pc videol.png

How to create Node RED instance with Stackhero.io

4. FAQ

https://youtu.be/3ZCjgJCaq0s

Questions Answers
How to start Read UM 2567: Getting started and UM2426 for detailed explanations
Where to find the blueprint file for creating a Grovestreams organization? In /Utilities/PC_Software/Grovestreams, as file GS_Blueprint.txt.
Where to find the text file for updating Grovestreams parameters? In /Utilities/PC_Software/Grovestreams, as file GS_Setup.txt.
How to know if the cellular application is up and running? Either with the trace on Teraterm or by connecting to the Grovestreams account and checking that the data is updated.
Nothing is displayed in Teraterm. Ensure that Teraterm options (such as Baud rate) are correctly set.
Wrong echo in Teraterm during setup. Ensure that Teraterm options (such as New-line and Transmit delay) are correctly set.
It boots but there is an issue with the network. Check that the correct SIM is selected (Plastic SIM or soldered UICC; Plastic SIM by default).
How to check that the EMnify *profile on UICC is correctly activated? Connect to the EMnify account and check the status.
EMnify is correctly activated but it does not work. Check in the EMnify account if the correct tariff is selected.
The log indicates it is properly up and running but nothing change in Grovestreams. Check that the correct API keys are used (the ones associated with the organization used for the demonstration).
The voucher cannot be read because the initial image was overwritten. Browse to www.stm32-c2c.com, then download Restore factory firmware and flash it.
With the out-of-the-box FW, there is no information on the console. Set the correct parameter in Teraterm (Baud rate as 9600 to obtain the voucher) and make sure that the modem is not connected upside-down to the host board through the STMod+ connector.
I flashed a new STM32 FW and forget the voucher number Go to c2c web site, download the factory FW, flash it then reboot and the voucher will be displayed in terminal on PC.
How to configure PIN code associated to current SIM card By changing PINCODE value in plf_sw_config.h and rebuild the FW
Why cellular does is not operational after boot? > The selected firmware does not correspond to the modem used > SIM card used is not valid on the available network > Check the modem firmware version see release note > Decrease bands number parsed by modem (see UM2567)
How to know if the cellular data service is operational Cellular operational after Trace displays "-----> State : CST_MODEM_DATA_READY_STATE <-----"
How to activate a 2nd C2C kit Once register on www.stm32-c2c.com note the BIC and connect directly on your EMnify account and ad the SIM with the BIC
What is the BIC It is not a bank number but only a Batch Identifier Code use at SIM creation