Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
{
"version": {
"major": 0,
"minor": 1
},
"settings": {
"setting_name_1": {
"id": "0x001",
"enabled": true,
"default": 50,
"min": 0,
"max": 100,
"length": 4,
"conversion": "uint32"
},
"setting_name_2": {
"id": "0x002",
"enabled": false,
"default": "asd-asd-asd-asd",
"min": "0",
"max": "1234567890123456",
"length": 16,
"conversion": "string"
}
}
}{
"1": {
"name": "msg_status",
"data": {
"reset": 0,
"bat": 3300,
"charging": false,
"locked": true,
"temp": 22.352941176470594,
"uptime": 0,
"acc_x": -1.17647058823529,
"acc_y": 8.235294117647058,
"acc_z": 4.313725490196077,
"lr_sat": 0,
"lr_fix": 0,
"err_lr_join": false,
"err_ble": false,
"err_ublox": false,
"err_acc": false,
"err_bat": false,
"err_ublox_fix": false,
"err_flash": false,
"ublox_busy": false,
"ver_fw_major": 1,
"ver_fw_minor": 5,
"ver_hw_major": 1,
"ver_hw_minor": 1,
"ver_hw_type": 4
},
"port": 4,
"timestamp": 1628042179,
"timestamp_parsed": "2021-08-04 03:56:19"
},
"2": {
"name": "msg_ble_scan",
"data": {
"1": {
"rssi": -55,
"mac": "25:18:e1"
},
"2": {
"rssi": -63,
"mac": "79:56:65"
},
"3": {
"rssi": -81,
"mac": "b3:e7:8d"
},
"N_BT_res": 3,
"t": 1628041580
},
"port": 11,
"timestamp": 1628041581,
"timestamp_parsed": "2021-08-04 03:46:21"
},
"3": {
"data": {
"id": 0,
"confirmed": true
},
"name": "msg_cmd_confirm",
"port": 31,
"timestamp": 1606314718,
"timestamp_parsed": "2020-11-25 15:31:58"
},
}python main.py --type abp --key "TTNCTL ACCESS CODE" --dtc 4 --ads_calib 1python main.py --type otaa-manual --appkey "KEY" --deveui "DEV" --appeui "APP"Settings module controls stored values, settings and messaging forms. Structures are auto-generated at build time, allowing for convenient modification when new HW or tracker is introduced.
Auto-generated files settings_def.h and settings_def.c containing all settings defined in settings.json file and functions for getting and setting values.


Functionality description of OpenCollar Edge trackers.
C4 data_len data[data_len]// sends ABCDE with retry and sequence set to 1
// Message format: port, id, len, msg_len, 5x ascii chars, seq, retry
// Payload in decimal (base 10)
28, 144, 8, 5, 65, 66, 67, 68, 69, 1, 1
// Payload in hexadecimal (base 16)
1C, 90, 08, 05, 41, 42, 43, 44, 45, 01, 01Development planning and documentation
Features described individualy
3.8.2020

This page is description how to disassemble partly potted Lion tracker for Antenna tuning.




Firmware upgrade using BLE smartphone connectivity.
Firmware structure of the device.
Testing of EVE EF651625 Lithium Thionyl Chloride Square Battery




Description of tuning potted LoRa antenna on lion tracker
spfcc8dd - GPS (1565MHz) - 0016C001F004B008 9118BDC9EA247203DEE14207E9235C6B
sp794c39 - GPS (1570MHz) - 0016C001F004B024 78A038472B994C5BA651AD34BB24B7B8
sp0ced81 - GPS (1575MHz) - 0016C001F004B03F E28E66D9F321606407BAB14F4FC16A18
sp3a0b5c - GPS (1575MHz) - 0016C001F00274EC EF1EDF5311FDAEE30787D5BEF5A65C06
spddf779 - GPS (1580MHz) - 0016C001F004B012 F21601B513CAF2105EDDAA7EE92F007E
sp1d0e4d - GPS (1585MHz) - 0016C001F004B018 B9D8D1EE028819E200858E5B4531C419



























This page will describe al whole procedure on how the antena was tuned.
otii settings: new project
project settings
-> arc
supply: power box
main voltage: 3,30V
over current protection: 0,500A
digital voltage level: check ''same as supply''
-> current
check main current
check auto range
-> voltage
check GPI1 value
-> logs
check UART
baud rate: 115200python .\otii_analyzer.py -f .\otii_smartparks_rhino.jsonPS C:\Users\Sticker\Documents\otii-consumption-analysis> python .\otii_analyzer.py -f .\otii_smartparks_rhino.jsonOK 0.0400186968914555 μWh
OK 0.2927783995633925 μWh
OK 0.029815154270834313 μWh
OK 0.012477693194445067 μWh
OK 140.1002367360885 μWh
OK 0.02873970756828776 μWh
OK 9.717506900152328 μWh
.
----------------------------------------------------------------------
Ran 1 test in 47.983s
OK


Resin casting

Resin casting























































Packing process and preparation for shipping.







commands_def.h and commands_def.c - commands defines and settingstypedef struct {
uint8_t reset_cause;
uint8_t system_functions_errors;
uint8_t battery;
uint8_t charging_voltage;
uint8_t temperature;
uint8_t uptime;
uint8_t acc_x;
uint8_t acc_y;
uint8_t acc_z;
}__attribute__((packed)) statusData_t;typedef union statusPacket_t {
statusData_t data;
uint8_t bytes[sizeof(statusData_t)];
} statusPacket_t;typedef struct {
uint8_t satellites;
uint8_t last_fix;
}__attribute__((packed)) statusDataLR_t;
typedef union statusPacketLR_t{
statusDataLR_t data;
uint8_t bytes[sizeof(statusDataLR_t)];
} statusPacketLR_t;typedef struct {
uint8_t lat[3];
uint8_t lon[3];
uint8_t time[2];
}__attribute__((packed)) statusDataUblox_t;
typedef union statusPacketUblox_t{
statusDataUblox_t data;
uint8_t bytes[sizeof(statusDataUblox_t)];
} statusPacketUblox_t;type_conversion.h and type_conversion.c files define conversion functions that convert all used var types from and to byte arrays, using little endian rule.
int execute_command_message(uint8_t port, uint8_t id, uint8_t len, uint8_t data, uint8_t *response_message) function. K_MSGQ_DEFINE(setting_que, sizeof(message_struct), 2, 4);
K_MSGQ_DEFINE(message_que, sizeof(message_struct), 4, 4);typedef struct {
uint8_t len;
uint8_t id;
uint8_t data[MAX_MES_LENGTH_BYTES];
} message_struct;int thread_put_setting(uint8_t setting_id, void *setting_data, size_t setting_data_size);
int thread_put_message(uint8_t setting_id, void *setting_data, size_t setting_data_size);int thread_get_setting(uint8_t *setting_id, void *setting_data);
int thread_get_message(uint8_t *setting_id, void *setting_data);









































Instructions on how to send commands to EdgeTracker from app or via LoRaWAN communication.
"settingname": {
"id": "0x01",
"enabled": true,
"default": 0,
"min": 0,
"max": 1000000,
"length": 4,
"conversion": "uint32"
}Most files, containing settings, values, commands and messages data and forms are auto-generated at build time, as they depend on Settings.json file and are dependent on specific tracker type.
id length [data in byte array format]01 04 E8 03 00 000x03 0x01 0x04 0xE8 0x03 0x00 0x003 1 4 232 3 0 0"cmd_name": {
"id": "0xA1",
"length": 1,
"conversion": "uint8",
"value": 0
}id length [value in byte array format]id 0A1 01 030x20 0xA1 0x01 0x0332 161 1 3 A1 00A2 00A3 01 value_idA3 01 D1value_id value_length [value in byte array format]A4 00A5 00A6 00A7 00A8 01 setting_idA8 01 01setting_id setting_length [setting value in byte array format]A9 00AA 00AB 00AC 00AD 00AE 00AF 0C [lon*10^7 int32 byte array] [lat*10^7 int32 byte array] [unix timestamp uint32 byte array]B1 00B2 00B4 00B5 00B7 00B8 00B9 00BA 00BB 01 port_nrBC 0C [port_nr encoded as 4 bytes array] [start msg nr. (from head) - 4 bytes] [nr. of messages - 4 bytes]BC 0C 04 00 00 00 32 00 00 00 0A 00 00 00C4 data_len data[data_len]"msg_name": {
"port": "port_lr_gps",
"id": "0xF1",
"length": 250,
"conversion": "byte_array"
},msg_id msg_len [msg specific data byte array]msg_port msg_id msg_len [msg specific data byte array]F3 02 cmd_id success/failFC 04 [almanac age, uint32 as 4 bytes]FD 06 [MAC - 6 bytes]FE 0C [lon*10^7 int32 byte array] [lat*10^7 int32 byte array] [alt*10^4 uint32 byte array]




































































