Skip to content

Application providing access to Bravo Board sensors data over customized AT commands

License

Notifications You must be signed in to change notification settings

telit/bravo-at-sensors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AppZone m2mb Bravo AT sensors App

Package Version: 1.0.6

Firmware Version: 30.01.XX0.0

Features

This package goal is to provide sample source code for Bravo AT sensors demo app.

Deployment Instructions

To manually deploy the Sample application on the devices perform the following steps:

  1. Have 30.01.XX0.0 FW version flashed (AT#SWPKGV will give you the FW version)

  2. Copy m2mapz.bin to /mod/

    AT#M2MWRITE="/mod/m2mapz.bin",\<size\>,1
    
  3. Run AT#M2MRUN=2,m2mapz.bin

  4. Run AT+M2M=4,10

Known Issues

Troubleshooting

  • Application does not work/start:

    • Delete application binary and retry
    AT#M2MDEL="/mod/m2mapz.bin"
    
    • Delete everything, reflash and retry
    AT#M2MDEL="/mod/m2mapz.bin"
    AT#M2MDEL="/mod/appcfg.ini"
    
  • Application project does not compile

    • Right click on project name
    • Select Properties
    • Select AppZone tab
    • Select the right plugin (firmware) version
    • Press "Restore Defaults", then "Apply", then "OK"
    • Build project again

Making source code changes

Folder structure

The applications code follow the structure below:

  • hdr: header files used by the application
    • app_cfg.h: the main configuration file for the application
  • src: source code specific to the application
  • BOSCH: sources to manage Bosch sensors and devices mounted on the Bravo EVK board
  • azx: helpful utilities used by the application (for GPIOs, LOGGING etc)
    • hdr: generic utilities' header files
    • src: generic utilities' source files
  • Makefile.in: customization of the Make process

Applications

Telit IoT AppZone Bravo Board Sensors App - leverage onboard sensors

Abstract

This repository contains Telit IoT AppZone C sample app exposing Bravo Board sensors, allowing to access data from them through a dedicated custom AT command

The minimum firmware version to build the sample is 30.01.xx0**.


AT#BSENS Command

This command allows to read one of the sensors values on the bravo board

AT#BSENS=<sensor_id>[,<accel_th>]

Set command allows read the provided sensor data.

Parameters:

Name Type Default Description
<sensor_id> integer - Sensor Id

Values:
1 : Enviroment
2 : 3D vector
3 : Tampering
4 : Linear Acceleration

<accel_th> integer - Acceleration threshold for Linear Acceleration sensor, as a g (Earth gravitational acceleration) multiple. If > 0, every time the module of the 3 axes acceleration exceeds the threshold, a counter will be increased. The same counter is reset to 0 when <accel_th> is set to 0

Upon set command execution, a response will be provided with different formats depending on the sensor:

Environment

#BSENS: 1,<temp>,<humidity>,<pressure>,<airQ>

Where

  • <temp>: temperature as a floating point value in Celsius degrees (range -40 – 80)
  • <humidity>: relative humidity as a floating point in %RH (range 0-100)
  • <pressure>: pressure as a floating point in hPa (range 300-1100)
  • <airQ>: air quality, integer value (range 0-1000)

For example

#BSENS: 1,20.2,42.4,1014.5,25

3D Vector

#BSENS: 2,<intensity>,<x>,<y>,<z>,<accuracy>

Where

  • <intensity>: vector intensity as a floating point
  • <x>: x component of the vector as a floating point
  • <y>: y component of the vector as a floating point
  • <z>: z component of the vector as a floating point
  • <accuracy> reading accuracy as an integer

For example:

#BSENS: 2,0.84,-0.12,-0.003,0.02,10000

Tampering

#BSENS: 3,<status>

Where

<status> the current tampering status:

  • 0 still status ended
  • 1 walking status ended
  • 2 running status ended
  • 3 bicycle status ended
  • 4 vehicle status ended
  • 5 tilting status ended
  • 8 still status started
  • 9 walking status started
  • 10 running status started
  • 11 bicycle status started
  • 12 vehicle status started
  • 13 tilting status started

For example:

#BSENS: 3,0

Linear Acceleration

If <accel_th> is > 0:

#BSENS: 4,<accel_th>,<x>,<y>,<z>,<events_counter>

Where

  • <accel_th>: current threshold value
  • <x>: x component of the acceleration as a floating point, in m/s^2
  • <y>: y component of the acceleration as a floating point, in m/s^2
  • <z>: z component of the acceleration as a floating point, in m/s^2
  • <events_counter> how many times the threshold has been exceeded since the check has been enabled

For example:

#BSENS: 4,8,0.012,-0.003,0.02,2

If <accel_th> is 0:

#BSENS: 4,0


AT#BSENS=?

Test command reports the available range of values for parameter <sensorId> in the format:

#BSENS: (list of supported <sensorId> values)


External Libraries

To build the application it is required to put libalgobsec.ar file into the project's BOSCH/BSEC folder. The library can be retrieved at the link https://www.bosch-sensortec.com/software-tools/software/bsec/ . Download the BSEC 1.4.8.0 v3 version archive, then extract the library libalgobsec.a from the ZIP file and rename as libalgobsec.ar. It can be found in the archive directory BSEC_1.4.8.0_Generic_Release_updated_v3/algo/normal_version/bin/gcc/Cortex_A7/without_FPIC

Please note: all the apps using BSEC library configure the device with the 18v3s_4d option. If a different version of the library is in use, please replace the BOSCH/BME680/bsec_serialized_configurations_iaq.c file in the project with the one inside BSEC_x.x.x.x_Generic_Release/config/generic_18v_3s_4d/


MultiSensors Ondemand AT application. Debug prints on MAIN UART

About

Application providing access to Bravo Board sensors data over customized AT commands

Resources

License

Stars

Watchers

Forks

Packages

No packages published