LTE IoT 9 Click Example.
Description
This application shows capability of LTE IoT 9 click board. It connects to network with standard "AT" commands, then sends SMS whit SIM card, and then logs GNNS data.
The demo application is composed of two sections :
Application Init
Initializes driver and wake-up module and checks communication and device version.
Application Task
Application taks is split in few stages:
- CONFIGURATION_FOR_NETWORK : Sets configuration to device to be able to connect to newtork.
- CHECK_NETWORK_CONNECTION : Checks device connection status till device is connected to network.
- SENDING_SMS : Sends SMS message to desired number in text mode.
- CONFIGURATION_FOR_GNSS : Sets configuration to device to enable GNSS data.
- GNSS_DATA : Reads and parses data from device to get latitude, longitude and altitude from device
Additional Function
- lteiot9_clear_app_buf : Function clears memory of app_buf.
- lteiot9_process : Function collects data from module and concat that data to app_buf.
- lteiot9_error_check : Function checks for different types of errors and logs them on UART.
- lteiot9_log_app_buf : Function logs data from application buffer.
- lteiot9_rsp_check : Function checks for response and returns the status of response.
- lteiot9_check_connection : Function checks connection to the network and logs that status to UART.
- lteiot9_cmd_parser : Function searches application buffer for command and logs data of that command.
- lteiot9_element_parser : Function searches application buffer for command and its element and copies data to element_data buffer.
- lteiot9_power_up_wait : Function loops process function untill device respond with "^SYSSTART" that device sends on power up/restart.
- lteiot9_config_device_for_network : Function sends commands for enableing network.
- lteiot9_check_connection_to_network : Function sends commands for checking connection to network.
- lteiot9_send_sms : Function sends SMS via network in text mode.
- lteiot9_config_device_for_gnss : Function sends commands for enableing GNSS.
- lteiot9_gnss_data : Function reads data from device and parses data to find latitude, longitude and altitude.
- Note
- In order for the example to work, user needs to set the phone number and sim apn to which he wants to send an SMS Enter valid data for the following macros: SIM_APN and PHONE_NUMBER_TO_MESSAGE. E.g. SIM_APN "vipmobile" PHONE_NUMBER_TO_MESSAGE "+381659999999"
- Author
- Luka FIlipovic