Teseo Location demo for GPSProvider using ST GNSS driver.

Dependencies:   GPS_Provider X_NUCLEO_GNSS1A1

Getting Started with X-NUCLEO-GNSS1A1

This example demonstrates how to use the X-NUCLEO-GNSS1A1 component with one of the STM32 Nucleo-64 platforms and how real time GNSS data received by the Teseo-LIV3F device can be displayed through a serial connection and a serial terminal on a PC. Furthermore the user can run commands enabling three advanced features:

  • Geofencing
  • Odometer
  • Data Logging

Setup

/media/uploads/apalmieri/nucleo-x-nucleo.jpg

Once the antenna has been connected to the SMA female connector of the X-NUCLEO-GNSS1A1 plugged on top of the STM32 Nucleo, a serial connection should be set up between the STM32 Nucleo and the PC with the following parameters:

  • baud rate: 115200
  • data: 8 bit
  • parity: none
  • stop: 1bit
  • flow control: none
  • New-line (Tx/Rx): CR

Serial connection parameters

/media/uploads/apalmieri/serial_setup.png /media/uploads/apalmieri/serial_setup1.png

The user can select among different options to:

  • get in a human readable format information related to the acquired GNSS position (or the satellites in view, the active satellites, and so on)
  • enable feature (geofencing, odometer, data logging)
  • configure a geofence circle
  • require geofence status
  • start/stop feature (odometer, data logging)

Application menu

/media/uploads/apalmieri/teseo_app.png

Committer:
apalmieri
Date:
Mon Nov 12 13:23:29 2018 +0000
Revision:
1:8d270072416d
Parent:
0:7b0a5a01caec
Update README and library deps

Who changed what in which revision?

UserRevisionLine numberNew contents of line
apalmieri 0:7b0a5a01caec 1 # TeseoLocation
apalmieri 1:8d270072416d 2 This repo contains a GPS_Provider example applications based on
apalmieri 0:7b0a5a01caec 3 mbed OS and built with [mbed-cli](https://github.com/ARMmbed/mbed-cli) meant for building an executable.
apalmieri 0:7b0a5a01caec 4
apalmieri 0:7b0a5a01caec 5 Please browse to subdirectories for specific documentation.
apalmieri 0:7b0a5a01caec 6
apalmieri 0:7b0a5a01caec 7 Getting Started
apalmieri 0:7b0a5a01caec 8 ===============
apalmieri 0:7b0a5a01caec 9
apalmieri 0:7b0a5a01caec 10
apalmieri 0:7b0a5a01caec 11 Pre-Requisites
apalmieri 0:7b0a5a01caec 12 --------------
apalmieri 0:7b0a5a01caec 13
apalmieri 0:7b0a5a01caec 14
apalmieri 0:7b0a5a01caec 15 To build this, you need to have a computer with the following software installed:
apalmieri 0:7b0a5a01caec 16
apalmieri 0:7b0a5a01caec 17 * [CMake](http://www.cmake.org/download/).
apalmieri 0:7b0a5a01caec 18 * [mbed-cli](https://github.com/ARMmbed/mbed-cli). Please note that **mbed-cli has its own set of dependencies**, listed in the installation instructions.
apalmieri 0:7b0a5a01caec 19 * [Python](https://www.python.org/downloads/).
apalmieri 0:7b0a5a01caec 20 * [ARM GCC toolchain 4.9.x](https://launchpad.net/gcc-arm-embedded/+milestone/4.9-2015-q3-update).
apalmieri 0:7b0a5a01caec 21 * A serial terminal emulator (e.g. screen, pySerial, cu).
apalmieri 0:7b0a5a01caec 22 * If the OS used is Windows, the serial driver of the board has to be correctly installed.
apalmieri 0:7b0a5a01caec 23 * For boards with mbed interface firmware the installation instructions are located (here)[https://developer.mbed.org/handbook/Windows-serial-configuration]
apalmieri 0:7b0a5a01caec 24
apalmieri 0:7b0a5a01caec 25 In order to use GPSProvider in mbed OS you need one the following hardware combination:
apalmieri 0:7b0a5a01caec 26
apalmieri 0:7b0a5a01caec 27 * A supported target, such as the [NUCLEO-F401RE](http://www.st.com/en/evaluation-tools/nucleo-f401re.html), with an external GPS peripheral, such as an X-NUCLEO-GNSS1A1.
apalmieri 0:7b0a5a01caec 28
apalmieri 0:7b0a5a01caec 29
apalmieri 1:8d270072416d 30 The [`GPS_Provider`module](https://os.mbed.com/teams/ST/code/GPS_Provider/) provides the GPS APIs on mbed OS.
apalmieri 0:7b0a5a01caec 31
apalmieri 0:7b0a5a01caec 32 Targets for GPS
apalmieri 0:7b0a5a01caec 33 ---------------
apalmieri 0:7b0a5a01caec 34
apalmieri 0:7b0a5a01caec 35 The following targets have been tested and work with these examples:
apalmieri 0:7b0a5a01caec 36
apalmieri 0:7b0a5a01caec 37 * Boards with an ST shield plugged in:
apalmieri 0:7b0a5a01caec 38 * NUCLEO-F401RE
apalmieri 0:7b0a5a01caec 39
apalmieri 0:7b0a5a01caec 40 Building and testing the examples
apalmieri 0:7b0a5a01caec 41 ---------------------------------
apalmieri 0:7b0a5a01caec 42
apalmieri 0:7b0a5a01caec 43 __To build the example:__
apalmieri 0:7b0a5a01caec 44
apalmieri 0:7b0a5a01caec 45 1. Clone the repository containing the example:
apalmieri 0:7b0a5a01caec 46
apalmieri 0:7b0a5a01caec 47 ```
apalmieri 1:8d270072416d 48 $ git clone https://github.com/to_be_defined/TeseoLocation.git
apalmieri 0:7b0a5a01caec 49 ```
apalmieri 0:7b0a5a01caec 50
apalmieri 0:7b0a5a01caec 51 or, alternatively,
apalmieri 0:7b0a5a01caec 52
apalmieri 0:7b0a5a01caec 53 ```
apalmieri 1:8d270072416d 54 $ mbed import https://github.com/to_be_defined/TeseoLocation.git
apalmieri 0:7b0a5a01caec 55 ```
apalmieri 0:7b0a5a01caec 56
apalmieri 0:7b0a5a01caec 57
apalmieri 1:8d270072416d 58 **Tip:** If you don't have GitHub installed, you can [download a zip file](https://github.com/to_be_defined/TeseoLocation/archive/master.zip) of the repository.
apalmieri 0:7b0a5a01caec 59
apalmieri 0:7b0a5a01caec 60 2. Update the source tree:
apalmieri 0:7b0a5a01caec 61
apalmieri 0:7b0a5a01caec 62 ```
apalmieri 0:7b0a5a01caec 63 $ mbed update
apalmieri 0:7b0a5a01caec 64 ```
apalmieri 0:7b0a5a01caec 65
apalmieri 0:7b0a5a01caec 66 3. Run the build:
apalmieri 0:7b0a5a01caec 67
apalmieri 0:7b0a5a01caec 68 ```
apalmieri 0:7b0a5a01caec 69 $ mbed compile -t <ARM | GCC_ARM> -m <YOUR_TARGET>
apalmieri 0:7b0a5a01caec 70 ```
apalmieri 0:7b0a5a01caec 71
apalmieri 0:7b0a5a01caec 72 4. Exporting to desktop IDEs
apalmieri 0:7b0a5a01caec 73
apalmieri 0:7b0a5a01caec 74 ```
apalmieri 0:7b0a5a01caec 75 $ mbed export -i <UVISION | GCC_ARM | IAR | COIDE> -m <YOUR_TARGET>
apalmieri 0:7b0a5a01caec 76 ```
apalmieri 0:7b0a5a01caec 77
apalmieri 0:7b0a5a01caec 78
apalmieri 0:7b0a5a01caec 79 **Note:** Please, refer to [mbed-cli](https://github.com/ARMmbed/mbed-cli) for details about tool guidelines.
apalmieri 0:7b0a5a01caec 80
apalmieri 0:7b0a5a01caec 81
apalmieri 0:7b0a5a01caec 82 __To run the application on your board:__
apalmieri 0:7b0a5a01caec 83
apalmieri 0:7b0a5a01caec 84 1. Connect your mbed board to your computer over USB. It appears as removable storage.
apalmieri 0:7b0a5a01caec 85
apalmieri 0:7b0a5a01caec 86 2. When you run the ``mbed compile`` command, as you did above, mbed cli creates a BIN or an HEX file in a ```BUILD/<target-name>/<toolchain>``` directory under the example's directory. Drag and drop the file to the removable storage.
apalmieri 0:7b0a5a01caec 87
apalmieri 0:7b0a5a01caec 88
apalmieri 0:7b0a5a01caec 89 __TeseoLocation application description:__
apalmieri 0:7b0a5a01caec 90
apalmieri 1:8d270072416d 91 In this application, real time GNSS data received by the Teseo-LIV3F device can be displayed through a serial connection and a serial terminal on a PC. Furthermore the user can run commands enabling three [advanced features](https://github.com/to_be_defined/X_NUCLEO_GNSS1A1):
apalmieri 0:7b0a5a01caec 92 * Geofencing
apalmieri 0:7b0a5a01caec 93 * Odometer
apalmieri 0:7b0a5a01caec 94 * Data Logging
apalmieri 0:7b0a5a01caec 95
apalmieri 0:7b0a5a01caec 96 1. A serial connection should be set up between the Nucleo and the X-NUCLEO-GNSS1A1 boards and the PC with the following parameters:
apalmieri 0:7b0a5a01caec 97 * baud rate: 115200
apalmieri 0:7b0a5a01caec 98 * data: 8 bit
apalmieri 0:7b0a5a01caec 99 * parity: none
apalmieri 0:7b0a5a01caec 100 * stop: 1bit
apalmieri 0:7b0a5a01caec 101 * flow control: none
apalmieri 0:7b0a5a01caec 102 * New-line (Tx/Rx): CR
apalmieri 0:7b0a5a01caec 103
apalmieri 0:7b0a5a01caec 104 ![](img/serial_setup.png) ![](img/serial_setup1.png)
apalmieri 0:7b0a5a01caec 105
apalmieri 0:7b0a5a01caec 106 **figure 1** Serial connection parameters
apalmieri 0:7b0a5a01caec 107
apalmieri 0:7b0a5a01caec 108 2. The user can select among different options to:
apalmieri 0:7b0a5a01caec 109 * get in a human readable format information related to the acquired GNSS position (or the satellites in view, the active satellites, and so on)
apalmieri 0:7b0a5a01caec 110 * enable feature (geofencing, odometer, data logging)
apalmieri 0:7b0a5a01caec 111 * configure a geofence circle
apalmieri 0:7b0a5a01caec 112 * require geofence status
apalmieri 0:7b0a5a01caec 113 * start/stop feature (odometer, data logging)
apalmieri 0:7b0a5a01caec 114
apalmieri 0:7b0a5a01caec 115 ![](img/teseo_app.png)
apalmieri 0:7b0a5a01caec 116
apalmieri 0:7b0a5a01caec 117 **figure 2** TeseoLocation Application menu
apalmieri 0:7b0a5a01caec 118