Freematics Esprit is an Arduino compatible dev board based on Espressif ESP32, an ARM core SoC with built-in WIFI and BLE. The board has an xBee seat for additional communication module. With a SIM5360 be module plugged in, the board can connect to Internet via cellular network when WIFI is unavailable. This post will demonstrate how to access Internet (HTTP GET) via cellular network with ESP32 and SIM5360.
The SIM5360 Bee Module by Freematics is in form of standard bee module which plugs into Freematics Esprit board’s xBee seat. An IPEX connector is on board for connecting antenna. This module requires 5V VCC to work (due to SIM5360’s working voltage range) unlike common bee modules on 3.3V VCC. There is a VCC switch on the left side of Esprit board so make sure it is switched to 5V. Due to occasion power surge of SIM5360 during communication, some computers’ USB port may not be able to supply sufficient current, so it is always recommended to have DC input (7V-16V) for the board.
SIM5360 has a rich set of AT commands for performing various operations. It communicates with MCU by serial UART. In the case of Freematics Esprit board and the SIM5360 bee module we are using, they are connected through xBee seat’s Rx/Tx pins which are wired to ESP32’s GPIO16 and GPIO17 and can be accessed by ESP32’s serial UART. ESP32 has 3 hardware UARTs and can use arbitrary GPIO pins for serial communication.
SIM5360 has a power switch pin and it needs to be “turned on” by pulling the pin low 2 seconds and pulling it back high. Such manipulation is already implemented in Esprit Arduino library which also implements APIs for easy access to additional resources that ESP32 provides (e.g. NVS, BLE).
sim5360test is a example sketch for SIM5360 which performs following tasks:
- initializing SIM5360 module
- connecting to cellular network
- obtaining and display IP address and signal strength
- repeatedly sending HTTP GET requests and output the response
Make sure to change the APN in the code to the actual one from your operator (e.g. connect for Optus in Australia). After compiling and uploading the sketch, open serial monitor and the output should be like following.