Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
smtcbboulet committed Jun 29, 2023
1 parent 390c7b3 commit f28f94d
Show file tree
Hide file tree
Showing 188 changed files with 7,765 additions and 11,637 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.3.0] - 2023-06-12

### changed

- [gnss_middleware] Update to V2.1.0, see [Changelog](geolocation_middleware/CHANGELOG.md).
- [lora_basics_modem] Update to V2.1.0, see [Changelog](lora_basics_modem/lora_basics_modem/CHANGELOG.md).
- [geolocation_gnss] Application code update according to geolocation middleware v2.1.0 and LoRa Basics Modem v3.3.0.
- [geolocation_gnss_wifi] Application code update according to geolocation middleware v2.1.0 and LoRa Basics Modem v3.3.0.
- [geolocation_wifi] Application code update according to geolocation middleware v2.1.0 and LoRa Basics Modem v3.3.0.
- [tracker_application] Application code update according to geolocation middleware v2.1.0 and LoRa Basics Modem v3.3.0. see [Changelog](apps/demonstrations/tracker_application/CHANGELOG.md).

## [1.2.0] - 2023-01-23

### changed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Here is the different components changelogs and current version included in this
| Geolocation - Wi-Fi | Perform Wi-Fi scans and send results over LoRaWAN using Wi-Fi middleware | [README](apps/examples/geolocation_wifi/README.md) |
| Geolocation - GNSS & Wi-Fi | Perform GNSS and Wi-Fi scans and send results over LoRaWAN using geolocation middlewares | [README](apps/examples/geolocation_gnss_wifi/README.md) |
| Full almanac update | Perform a full almanac update | [README](apps/examples/full_almanac_update/README.md) |
| TX/RX continuous | Generate a TX/RX continuous thanks to the test mode | [README](apps/examples/tx_rx_continuous/README.md) |


## Configuration
Expand Down
8 changes: 8 additions & 0 deletions apps/demonstrations/tracker_application/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.3.0] - 2023-06-12

### Change
- Application code update according to geolocation middleware v2.1.0. see [Geolocation middleware Changelog](../../../geolocation_middleware/CHANGELOG.md).

### Change
- Uptate LoRa Basics Modem version from 3.2.4 to 3.3.0

## [2.2.0] - 2023-01-23

### Change
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1355,11 +1355,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\gnss_queue.c</FilePath>
</File>
<File>
<FileName>lr11xx_driver_extension.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\lr11xx_driver_extension.c</FilePath>
</File>
</Files>
</Group>
<Group>
Expand Down Expand Up @@ -2896,11 +2891,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\gnss_queue.c</FilePath>
</File>
<File>
<FileName>lr11xx_driver_extension.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\lr11xx_driver_extension.c</FilePath>
</File>
</Files>
</Group>
<Group>
Expand Down
10 changes: 5 additions & 5 deletions apps/demonstrations/tracker_application/bin/manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{"lr1110_transceiver": {
"version": "03.07",
"url": "https://api.github.com/repos/Lora-net/radio_firmware_images/contents/lr1110/transceiver/lr1110_transceiver_0307.h",
"hash": "638a2630f5b1725fcb78a34ef10467d0"},
"version": "03.08",
"url": "https://api.github.com/repos/Lora-net/radio_firmware_images/contents/lr1110/transceiver/lr1110_transceiver_0308.h",
"hash": "b6528986d0448b56d9282fe3bc0e678e"},
"lbm_app": {
"version": "2.02.00",
"version": "2.03.00",
"url": "https://api.github.com/repos/Lora-net/SWSD004/contents/apps/demonstrations/tracker_application/bin/tracker_application.bin",
"hash": "e0c17421f67580d853373c76a9fb0986"}
"hash": "025107862d0af581f0ea8b26f466eaf4"}
}
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_as923_grp1.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_as923_grp2.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_as923_grp3.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_au915.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_eu868.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_in865.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_japan.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_kr920.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_ru864.bin
100644 → 100755
Binary file not shown.
Binary file modified apps/demonstrations/tracker_application/bin/tracker_application_us915.bin
100644 → 100755
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1130,9 +1130,7 @@ static void on_middleware_gnss_event( uint8_t pending_events )

HAL_DBG_TRACE_INFO( "GNSS middleware event - TERMINATED\n" );
gnss_mw_get_event_data_terminated( &tracker_ctx.gnss_mw_event_data );
HAL_DBG_TRACE_PRINTF( "-- number of scans sent: %u\n", tracker_ctx.gnss_mw_event_data.nb_scans_sent );
HAL_DBG_TRACE_PRINTF( "-- aiding position check sent: %d\n",
tracker_ctx.gnss_mw_event_data.aiding_position_check_sent );
gnss_mw_display_terminated_results( &tracker_ctx.gnss_mw_event_data );

ASSERT_SMTC_MODEM_RC( smtc_modem_get_duty_cycle_status( &duty_cycle_status_ms ) );
HAL_DBG_TRACE_PRINTF( "Remaining duty cycle %d ms\n", duty_cycle_status_ms );
Expand Down Expand Up @@ -1264,7 +1262,7 @@ static void on_middleware_wifi_event( uint8_t pending_events )

HAL_DBG_TRACE_INFO( "Wi-Fi middleware event - TERMINATED\n" );
wifi_mw_get_event_data_terminated( &tracker_ctx.wifi_nb_scan_sent );
HAL_DBG_TRACE_PRINTF( "-- number of scans sent: %u\n", tracker_ctx.wifi_nb_scan_sent.nb_scans_sent );
wifi_mw_display_terminated_results( &tracker_ctx.wifi_nb_scan_sent );

ASSERT_SMTC_MODEM_RC( smtc_modem_get_duty_cycle_status( &duty_cycle_status_ms ) );
HAL_DBG_TRACE_PRINTF( "Remaining duty cycle %d ms\n", duty_cycle_status_ms );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ extern "C" {
* @brief Defines the application firmware version
*/
#define TRACKER_MAJOR_APP_VERSION 2
#define TRACKER_MINOR_APP_VERSION 2
#define TRACKER_SUB_MINOR_APP_VERSION 0
#define TRACKER_MINOR_APP_VERSION 3
#define TRACKER_SUB_MINOR_APP_VERSION 0

#define TRACKER_PCB_HW_NUMBER 595
#define TRACKER_MAJOR_PCB_HW_VERSION 1
Expand All @@ -123,7 +123,7 @@ extern "C" {
/**
* @brief LR11XX radio firmware
*/
#define LR11XX_FW_VERSION 0x0307
#define LR11XX_FW_VERSION 0x0308

/*!
* @brief Time during which a LED is turned on when a TX or RX event occurs, in [ms]
Expand Down
3 changes: 1 addition & 2 deletions apps/demonstrations/tracker_application/makefile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ C_SOURCES += \
$(TOP_DIR)/geolocation_middleware/gnss/src/gnss_helpers.c \
$(TOP_DIR)/geolocation_middleware/gnss/src/gnss_queue.c \
$(TOP_DIR)/geolocation_middleware/gnss/src/gnss_middleware.c \
$(TOP_DIR)/geolocation_middleware/gnss/src/lr11xx_driver_extension.c \
$(TOP_DIR)/geolocation_middleware/wifi/src/wifi_middleware.c \
$(TOP_DIR)/geolocation_middleware/wifi/src/wifi_helpers.c \
$(TOP_DIR)/geolocation_middleware/common/mw_common.c \
Expand Down Expand Up @@ -128,7 +127,7 @@ C_INCLUDES += \
-I$(TOP_DIR)/geolocation_middleware/wifi/src \
-I$(TOP_DIR)/geolocation_middleware/gnss/src \
-I$(TOP_DIR)/geolocation_middleware/bsp \
-I$(TOP_DIR)/geolocation_middleware/common
-I$(TOP_DIR)/geolocation_middleware/common

# Add the macro debug trace definition
ifeq ($(MIDDLEWARE_TRACE),yes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,29 +722,50 @@ void tracker_store_gnss_in_internal_log( const gnss_mw_event_data_scan_done_t* g
else
{
uint32_t timestamp = apps_modem_common_get_utc_time( );
if( tracker_ctx.gnss_antenna_sel == GNSS_PCB_ANTENNA )

if( gnss_scan_results->aiding_position_check_size != 0 )
{
scan_buf[index++] = TAG_GNSS_PCB;
scan_buf[index++] = TAG_APC_MSG;

scan_buf[index++] = GNSS_TIMESTAMP_LEN + gnss_scan_results->aiding_position_check_size;

/* Scan Timestamp */
scan_buf[index++] = timestamp;
scan_buf[index++] = timestamp >> 8;
scan_buf[index++] = timestamp >> 16;
scan_buf[index++] = timestamp >> 24;

memcpy( &scan_buf[index], gnss_scan_results->aiding_position_check_msg,
gnss_scan_results->aiding_position_check_size );
index += gnss_scan_results->aiding_position_check_size;
}
else
{
scan_buf[index++] = TAG_GNSS_PATCH;
}
if( tracker_ctx.gnss_antenna_sel == GNSS_PCB_ANTENNA )
{
scan_buf[index++] = TAG_GNSS_PCB;
}
else
{
scan_buf[index++] = TAG_GNSS_PATCH;
}

scan_buf[index++] =
GNSS_TOKEN_LEN + GNSS_NB_SAT_LEN + GNSS_TIMESTAMP_LEN + GNSS_LAST_SCAN_IN_GROUP_LEN + GNSS_PROFILE_LEN;
/* Scan Timestamp */
scan_buf[index++] = timestamp;
scan_buf[index++] = timestamp >> 8;
scan_buf[index++] = timestamp >> 16;
scan_buf[index++] = timestamp >> 24;
scan_buf[index++] = 0; // Set the token to 0 when no sv detected
scan_buf[index++] = 0; // 0 SV detected
scan_buf[index++] = 1; // set a default GNSS mode
scan_buf[index++] = gnss_scan_results->context.mode;
scan_buf[index++] = GNSS_TOKEN_LEN + GNSS_NB_SAT_LEN + GNSS_TIMESTAMP_LEN +
GNSS_LAST_SCAN_IN_GROUP_LEN + GNSS_PROFILE_LEN;
/* Scan Timestamp */
scan_buf[index++] = timestamp;
scan_buf[index++] = timestamp >> 8;
scan_buf[index++] = timestamp >> 16;
scan_buf[index++] = timestamp >> 24;
scan_buf[index++] = 0; // Set the token to 0 when no sv detected
scan_buf[index++] = 0; // 0 SV detected
scan_buf[index++] = 1; // set a default GNSS mode
scan_buf[index++] = gnss_scan_results->context.mode;
}

nb_variable_elements++;
}

tracker_store_internal_log( scan_buf, nb_variable_elements, index );
}
}
Expand Down Expand Up @@ -830,6 +851,28 @@ void tracker_restore_internal_log( void )
}
break;
}
case TAG_APC_MSG:
{
/* Scan Timestamp */
scan_timestamp = get_uint32_from_array_at_index_and_inc( scan_buf, &scan_buf_index );
memcpy( &epoch_time, localtime( &scan_timestamp ), sizeof( struct tm ) );

uint16_t apc_len = len - GNSS_TIMESTAMP_LEN;

/* Display Raw NAV Message*/
HAL_DBG_TRACE_PRINTF( "[%d-%d-%d %d:%d:%d.000] ", epoch_time.tm_year + 1900, epoch_time.tm_mon + 1,
epoch_time.tm_mday, epoch_time.tm_hour, epoch_time.tm_min, epoch_time.tm_sec );
HAL_DBG_TRACE_PRINTF( "[%d - %d] ", job_counter, tag_element );

for( uint8_t i = 0; i < apc_len; i++ )
{
HAL_DBG_TRACE_PRINTF( "%02X", scan_buf[scan_buf_index++] );
}

HAL_DBG_TRACE_PRINTF( "\n" );

break;
}
case TAG_WIFI:
{
int8_t wifi_rssi;
Expand Down Expand Up @@ -2570,6 +2613,8 @@ static void tracker_get_one_scan_from_internal_log( uint16_t scan_number, uint8_
tag_element = scan_buf[scan_buf_index++]; // get the element
len = scan_buf[scan_buf_index++]; // get the size element

HAL_DBG_TRACE_PRINTF( "tag_element %d len %d\n", tag_element, len );

switch( tag_element )
{
case TAG_GNSS_PATCH:
Expand Down Expand Up @@ -2614,6 +2659,33 @@ static void tracker_get_one_scan_from_internal_log( uint16_t scan_number, uint8_

break;
}
case TAG_APC_MSG:
{
HAL_DBG_TRACE_PRINTF( "Restore APC\n" );
/* Scan Timestamp */
scan_timestamp = get_uint32_from_array_at_index_and_inc( scan_buf, &scan_buf_index );
memcpy( &epoch_time, localtime( &scan_timestamp ), sizeof( struct tm ) );

uint16_t apc_len = len - GNSS_TIMESTAMP_LEN;

/* Display Raw NAV Message*/
*buffer_len += snprintf( ( char* ) ( out_buffer + *buffer_len ), out_buffer_len - *buffer_len,
"[%d-%d-%d %d:%d:%d.000] ", epoch_time.tm_year + 1900, epoch_time.tm_mon + 1,
epoch_time.tm_mday, epoch_time.tm_hour, epoch_time.tm_min, epoch_time.tm_sec );

*buffer_len += snprintf( ( char* ) ( out_buffer + *buffer_len ), out_buffer_len - *buffer_len,
"[%ld - %d] ", job_counter, tag_element );

for( uint16_t i = 0; i < apc_len; i++ )
{
*buffer_len += snprintf( ( char* ) ( out_buffer + *buffer_len ), out_buffer_len - *buffer_len, "%02X",
scan_buf[scan_buf_index++] );
}

*buffer_len += snprintf( ( char* ) ( out_buffer + *buffer_len ), out_buffer_len - *buffer_len, "\r\n" );

break;
}
case TAG_WIFI:
{
int8_t wifi_rssi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ extern "C" {
#define TAG_GNSS_PATCH 0x02
#define TAG_WIFI 0x03
#define TAG_NEXT_SCAN 0x04
#define TAG_APC_MSG 0x05

/* Internal Log Len */
#define WIFI_SINGLE_BEACON_LEN 0x08
Expand Down
21 changes: 19 additions & 2 deletions apps/examples/full_almanac_update/get_full_almanac.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@

def main():

# The optional GPS timestamp for specific almanac date. The following website
# can convert an UTC time to a GPS timestamp: https://www.gw-openscience.org/gps/
toa_default = ""

# The file in which the almanac will be written to
filename_default = "almanac.h"
parser = ArgumentParser(
Expand All @@ -51,14 +55,25 @@ def main():
help="file that will contain the results",
default=filename_default,
)
parser.add_argument(
"-g",
"--gpstime",
help="GPS time reference to be used for generating the almanac header (can be omitted to get latest almanac)",
default=toa_default,
)
args = parser.parse_args()

mgs_token = args.mgs_token
filename = args.output_file
toa = args.gpstime

# Build request URL
url = "https://mgs.loracloud.com/api/v1/almanac/full"
print("Requesting latest full almanac image available...")
if not toa:
url = "https://mgs.loracloud.com/api/v1/almanac/full"
print("Requesting latest full almanac image available...")
else:
url = "https://mgs.loracloud.com/api/v1/almanac/full?toa=" + toa
print("Requesting full almanac image for GPS time " + toa + "...")

# HTTP request to MGS
my_header = {"Authorization": mgs_token}
Expand All @@ -82,6 +97,8 @@ def main():
"/* This file has been auto-generated by the get_full_almanac.py script */\n\n"
)
file_header += '#include "lr11xx_gnss.h"\n\n'
if toa:
file_header += "/* Almanac image for GPS time " + toa + " */\n"
with open(filename, "w") as f:
f.write(file_header + my_almanac_in_hex + "\n")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1258,11 +1258,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\gnss_queue.c</FilePath>
</File>
<File>
<FileName>lr11xx_driver_extension.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\lr11xx_driver_extension.c</FilePath>
</File>
<File>
<FileName>mw_common.c</FileName>
<FileType>1</FileType>
Expand Down Expand Up @@ -2596,11 +2591,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\gnss_queue.c</FilePath>
</File>
<File>
<FileName>lr11xx_driver_extension.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\lr11xx_driver_extension.c</FilePath>
</File>
<File>
<FileName>mw_common.c</FileName>
<FileType>1</FileType>
Expand Down Expand Up @@ -3883,11 +3873,6 @@
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\gnss_queue.c</FilePath>
</File>
<File>
<FileName>lr11xx_driver_extension.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\geolocation_middleware\gnss\src\lr11xx_driver_extension.c</FilePath>
</File>
<File>
<FileName>mw_common.c</FileName>
<FileType>1</FileType>
Expand Down
Loading

0 comments on commit f28f94d

Please sign in to comment.