|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
STMicroelectronics ST87Mxx cellular modems. More...
Topics | |
| GNSS configuration | |
| ST87Mxx Constants | |
| WIFI scanning configuration | |
Files | |
| file | st87mxx_app_services.h |
| Header file for extended cellular API of ST87Mxx modems. | |
Data Structures | |
| struct | st87mxx_wifiscan_params |
| Parameters for the ST87Mxx WIFI scan operation. More... | |
Typedefs | |
| typedef void | st87mxx_get_beacon_data_callback_t(char const *const string) |
| Callback that catches the WIFI scan data when it is available. | |
| typedef void | st87mxx_get_pos_callback_t(char const *const string) |
| Callback to retrieve the positions. | |
| typedef void | st87mxx_get_rssi_callback_t(char const *const string) |
| Callback to retrieve the RSSI values. | |
Enumerations | |
| enum | sequence_state { SEQUENCE_NONE = 0 , SEQUENCE_ONGOING = 1 , SEQUENCE_TIMED_OUT = 2 } |
| Application services sequence state. More... | |
Functions | |
| void | st87mxx_app_services_init (void) |
| API to start the application services (GNSS, WSCAN, RSSI capture). | |
| int | st87mxx_gnss_getfix (uint32_t nb_position, st87mxx_get_pos_callback_t *get_pos_callback_func, uint32_t timeout) |
| API to get ST87Mxx GNSS position. | |
| void | st87mxx_gnss_stop (void) |
| API to stop the GNSS feature. | |
| int | st87mxx_wifiscan (st87mxx_wifiscan_params *wscan_params) |
| API to start the WIFI scan (=WSCAN) feature for positioning purpose. | |
| void | st87mxx_wifiscan_stop (void) |
| API to stop the WIFI scan. | |
| int | st87mxx_getrssi (st87mxx_get_rssi_callback_t *get_rssi_callback_func) |
| API to get the RSSI in an asynchronous way. | |
| sequence_state | st87mxx_app_services_getstate (void) |
| API to get the state of the application services sequence. | |
STMicroelectronics ST87Mxx cellular modems.
| typedef void st87mxx_get_beacon_data_callback_t(char const *const string) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
Callback that catches the WIFI scan data when it is available.
Example of WSCAN data: 1,-73,48:29:52:14:3E:B0,Livebox-3EB0 that corresponds to: channel number, RxLevel, MAC address (BSSID), SSID name.
| string | String in which the data will be written |
| typedef void st87mxx_get_pos_callback_t(char const *const string) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
Callback to retrieve the positions.
| string | String in which the position will be written. |
| typedef void st87mxx_get_rssi_callback_t(char const *const string) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
Callback to retrieve the RSSI values.
| string | String in which the RSSI will be written. |
| enum sequence_state |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
Application services sequence state.
Indicates whether no application service sequence is running, one is in progress, or it timed out.
| Enumerator | |
|---|---|
| SEQUENCE_NONE | No sequence is started. |
| SEQUENCE_ONGOING | A sequence is on-going. |
| SEQUENCE_TIMED_OUT | The timeout for a sequence has elapsed. |
| sequence_state st87mxx_app_services_getstate | ( | void | ) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
API to get the state of the application services sequence.
| State | of the current sequence |
| void st87mxx_app_services_init | ( | void | ) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
API to start the application services (GNSS, WSCAN, RSSI capture).
This function should be called prior to any application services.
Note: only one application service can run at a time.
| int st87mxx_getrssi | ( | st87mxx_get_rssi_callback_t * | get_rssi_callback_func | ) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
API to get the RSSI in an asynchronous way.
| get_rssi_callback_func | Pointer to the output callback function |
| API | execution status |
| int st87mxx_gnss_getfix | ( | uint32_t | nb_position, |
| st87mxx_get_pos_callback_t * | get_pos_callback_func, | ||
| uint32_t | timeout ) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
API to get ST87Mxx GNSS position.
The position returned by the callback is in ST_AT format by default and can be set to NMEA format by changing GNSS_CONSTELLATION_ID constant.
For instance for ST_AT: #GNSSFIX: 0,2291,461282763,48.15370,-01.56719,130.2, 33.6,00.0,00.0,52.2,2.4,9.5,7.7,5,11,2.4,30,-0.1,20,1.4,09,1.7,06,-0.3
In detail: " #GNSSFIX: validity,week_number,time_of_week,latitude,longitude, altitude,accuracy [,std_dev_altitude,hdop,gdop,pdop] <- If GNSS_FORMAT_ST_ACCURACY is 1
[,number_of_satellites,satellite1_id,satellite1_residual,...,
satelliten_id,satelliten_residual] <- If GNSS_FORMAT_ST_SATELLITES is 1
[,orientation_degree,semi_major,semi_minor] <- If GNSS_FORMAT_ST_ORIENTATION is 1
For instance for NMEA: $GPGLL,4809.2231,N,00134.281,W,091218,A,A*6C
For further information: https://en.wikipedia.org/wiki/NMEA_0183
| nb_position | Number of GNSS position to sample. Value 0 means infinite. |
| get_pos_callback_func | Pointer to the output callback function |
| timeout | Timeout in sec after which the request is cancelled |
| Execution | status |
| void st87mxx_gnss_stop | ( | void | ) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
API to stop the GNSS feature.
| int st87mxx_wifiscan | ( | st87mxx_wifiscan_params * | wscan_params | ) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
API to start the WIFI scan (=WSCAN) feature for positioning purpose.
The WIFI scan feature is typically used to determine a coarse position when GNSS is
not usable, such as in indoor environments.
The primary purpose of the WIFI scan feature is to detect and list all available
WIFI networks in the vicinity.
When a WIFI scan is initiated, the ST87MXX discovers nearby WIFI networks.
It listens to beacons from WIFI access points (APs) that provide network
information. The resulting list of detected WIFI networks can be sent to a
3rd party localization server to get a position.
| wscan_params | Structure containing the parameters to start the WSCAN feature. |
| Execution | status |
| void st87mxx_wifiscan_stop | ( | void | ) |
#include <zephyr/drivers/modem/st87mxx_app_services.h>
API to stop the WIFI scan.