Skip to content
Snippets Groups Projects
Commit 348dc7c8 authored by Didier Donsez's avatar Didier Donsez
Browse files

add tasks

parent 59bb46df
No related branches found
No related tags found
No related merge requests found
// Codec for decoding Proof of Coverage messages
// Author : Didier DONSEZ, UGA, LIG
function byteToHexString(uint8arr, size) {
var hexStr = '';
for (var i = size-1; i >= 0 ; i--) {
var hex = (uint8arr[i] & 0xff).toString(16);
hex = (hex.length === 1) ? '0' + hex : hex;
hexStr += hex;
}
return hexStr;
}
function readUInt16BE(buf, offset) {
offset = offset >>> 0;
return (buf[offset] << 8) | buf[offset + 1];
}
function readUInt8(buf, offset) {
offset = offset >>> 0;
return (buf[offset]);
}
// For Chirpstack
// Decode decodes an array of bytes into an object.
// - fPort contains the LoRaWAN fPort number
// - bytes is an array of bytes, e.g. [225, 230, 255, 0]
// The function must return an object, e.g. {"temperature": 22.5}
function Decode(fPort, bytes) {
switch(fPort) {
case 5 :
return {
//type: "poc",
txpower: readUInt8(bytes, 10),
token: readUInt16BE(bytes, 8),
gweui: byteToHexString(bytes, 8)
// TODO add optional lattitude (float32), longitude (float32), altitude (uint16)
};
break;
case 161 :
return {
type: "ranging_1",
txpower: readUInt8(bytes, 1)
};
break;
default:
return {
type: "unknown"
};
}
}
// For TTNv2
// Decode decodes an array of bytes into an object.
// - bytes is an array of bytes, e.g. [225, 230, 255, 0]
// - fPort contains the LoRaWAN fPort number
// The function must return an object, e.g. {"temperature": 22.5}
function Decoder(bytes, fPort) {
return Decode(fPort, bytes);
}
// For TTNv3
function decodeUplink(input) {
return {
data: Decoder(input.bytes, input.fPort),
warnings: [],
errors: []
};
}
......@@ -13,6 +13,15 @@ A faire
* [ ] rédiger le cahier des charges (markdown bien sur) avec les diagrammes
* [ ] faire le [point matériel récupéré](./matos.md) au fablab (emprunt depuis https://matos.univ-grenoble-alpes.fr/#
* [ ] créer une structure arborescente de dossiers pour organiser le dépôt
* [ ] voir Proof of Coverage
* [ ] https://lns.campusiot.imag.fr/#/organizations/22/device-profiles/2cd41d79-0f58-4e08-85e4-c83b6766ec8c
* [ ] https://lns.campusiot.imag.fr/#/organizations/22/applications/536
* [ ] https://github.com/CampusIoT/datasets/tree/main/ProofOfCoverage
* [ ] Voir le protocole utilisé par Chirpstack pour cartographier la qualité du signal entre les gateways (dans les sources de Chirpstack)
* [ ] Voir les
* [ ] mettre en route les 2 RPI corecell https://github.com/Lora-net/sx1302_hal
* [ ] mettre en route le PC Linux picocell https://github.com/Lora-net/picoGW_hal
Exemple de structure arborescente
* [./README.md](./README.md) --> un description et des liens pour naviguer dans la structure
......
......@@ -4,5 +4,10 @@
* une station LoRa Multitech Linux MTCDT (don de Brian Wild)
* une station LoRa Kerlink iFemto Linux MTCDT (don de Kerlink)
* une station LoRa ecoSignal (ESP32 sur FreeRTOS)
* une station LoRa RPI + Corecell (sous Linux / Raspian) don de Semtech
* 2 stations LoRa RPI + Corecell (sous Linux / Raspian) don de Semtech
* https://github.com/Lora-net/sx1302_hal
* https://lns.campusiot.imag.fr/#/organizations/22/gateways/0016c00100002f4c
* Il faut determiner le GWEUI du deuxième corecell pour que DD puisse l'enregistrer
* une station LoRa RPI + Picocell (sous Linux / Raspian) don de Semtech
* https://github.com/Lora-net/picoGW_hal
* Il faut determiner le GWEUI du deuxième corecell pour que DD puisse l'enregistrer
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment