OS2IoT Logo
latest
  • Users’ notes
    • Default passwords
    • How to change chirpstacks admin password
      • Step-by-step:
  • Maintenance Guide
    • Purpose
    • Development
      • Configuration of developer machine
      • Source Code
      • Requirements
      • Setup developement
        • Starting dependencies for development
        • Troubleshooting
      • Starting the frontend and backend for development
        • Database
      • Map
        • Debugging
      • Branching strategy
        • Naming Convention of branches
        • Format of commit message
    • Tools
      • Chirpstack
    • Migrations
      • Generate migrations
      • Run migrations
      • Revert migration
      • Show migration
    • Maintaining the docs
      • Building locally
  • Installation guide
    • Purpose
    • Running locally using docker-compose
      • Prerequisites
      • Configuration
      • Steps
      • Troubleshooting
    • Running in Kubernetes
      • Disclaimer
      • Setting up an environment
      • Deployment
    • Configuration
      • OS2IoT-backend
        • Logs levels
      • OS2IoT-frontend
      • OS2IoT-Mosquitto broker
  • Programming Guidelines
    • Introduction
    • Code standards
      • Naming conventions
      • Form and style
      • Structure of Source folder
        • Front-end
        • Back-end
        • Docker
      • Patterns and heuristics
      • Code analysis
    • Front-end – Programming standards
    • Back-end – Programming standards
  • User Interface Design
    • Dependencies
    • Page Structure
      • Page Layouts
        • Boxed Full Width Layout
        • Boxed Feature width Layout
        • Boxed Form Width Layout
        • Feature box Layout
      • Mobile / Tablet
      • Page Templates
    • Global Design
      • Internationalization (i18n)
      • Navigation
        • Navigation bar
        • ‘Sitemap’
      • User Rights
      • Global Search
        • Indexed fields for free text search
      • Help
        • Info boxes
        • Orientation
      • Validations
        • Field Validation
        • Validation of user actions
      • Error messages
      • Edit / delete
      • Tab order & Shortcuts
    • Security
      • Hide components and buttons
      • Access denied
  • User-Interface Guidelines
    • Background
    • General principles
      • Main navigation
      • Use of keyboard
    • Ease of Use & Accessibility
      • WCAG AA
        • Principles of WCAG
        • Keyboard-accessibility
        • Graphics – and other resources of non-textual character
        • Guidelines
    • Page principles
      • Responsive design and screen resolutions
        • Grid (adaptation for tablet and mobile)
        • 4.1.2 Screen resolution
      • Positioning of cursor
      • 4.3 Tab sequence
      • 4.4 The HTML Guide, Bootstrap, and Google Materials
    • Page elements
      • Modal windows
      • Links
      • Text
      • Pictures
      • Icons
      • Tables
      • Input fields
      • Buttons
      • Dropdowns
      • Radio buttons
      • Check boxes
      • Dropdowns, combo-boxes
      • Date fields and use of date pickers
      • Error messages/feedback
      • Flow pages
    • Browser support
    • Encoding
    • Best practices
      • HTML standards
        • In general
        • Microdata
      • CSS
        • In general
        • SCSS
        • Inclusion of CSS
      • JavaScript
        • In general
    • Information architecture principles
    • Content guidelines
  • Logical Datamodel
    • Introduction
      • Scope
    • Logical Datamodel
    • Entity metadata
      • Unique identifier
      • Temporal values
    • Enumerations
      • PermissionLevel
      • ActionType
      • SearchResultType
      • AuthorizationType
      • DataTargetType
      • IoTDeviceType
      • ErrorCodes
      • KafkaTopic
      • ActivationType
      • PermissionType
      • SendStatus
      • SigFoxDownlinkMode
      • SigFoxPayloadType
      • AuthenticationType
  • Internal Interface Design
    • Backend REST API
      • Swagger documentation
      • Authentication
        • JWT Payload
        • JWT Expiration
        • Using Swagger with authorization
      • Authorization (Permissions)
    • API key access
      • Configuration
      • Usage
      • Limitations
  • External Interface Design
    • Interfaces
    • Integration patterns
      • Internal systems
      • External systems
        • IoT devices
      • Data targets
      • Authentication
    • IoT Device Integrations
      • Generic IoT Device
      • NB-IoT (Telia)
      • LoRaWAN (Chirpstack)
        • Data synchronization
        • Security
        • Error handling
        • Communicating with edge devices
        • Register network server
        • Register new device
      • MQTT
        • MQTT external broker
        • MQTT internal broker
      • Sigfox
        • Register new device
        • Update existing device
        • Receive data
        • Restart device
    • Data Targets
      • HTTP Push
      • MQTT
      • FIWARE
      • Opendata.dk
        • Authorization
        • Data and format
    • KOMBIT Adgangstyring
  • Software Architecture
    • Overview
      • Logging
      • Integrations
    • Process perspective
      • Receive IoT device data
    • Implementation perspective
      • 3rd party components
      • Backend
        • Technology stack
        • Solution architecture
      • Frontend
        • Technology stack
    • Deployment perspective
    • Data perspective
      • Data temporality
    • Security perspective
      • User login and permissions
        • Authentication
        • Authorization
        • User permissions
      • Web application security
      • OS2iot REST API security
      • Device security
        • Generic IoT devices
        • LoRaWAN
        • NB-IoT
        • MQTT
        • Sigfox
      • Data target security
        • HTTP PUSH
        • FIWARE
  • Payload Decoders
    • Examples of Payload Decoders
      • Sensit 3.0
      • Elsys ERS
  • Multicast
    • What can multicast-groups do?
    • Creation in OS2IoT
    • Sending downlink payload
    • Explanation of properties
  • IoT Data Management
    • Data ingestion
      • LoRaWAN devices
      • SigFox devices
      • Generic HTTP devices
      • MQTT
        • MQTT external broker
        • MQTT internal broker
    • Payload transformation and storage
    • Sending to data-targets
  • Downlink helpers
    • Elsys (LORAWAN)
    • Sensit 3.0 (SigFox)
  • KOMBIT adgangsstyring
    • Configuration
      • Prerequisites:
      • Steps:
      • Test:
  • Audit Log
    • Storage of log-files
    • Reading the audit-logged
  • Testing
    • Automated testing
      • Test execution prerequisites
      • Running the tests
    • Manual testing
  • Exit strategy
    • Export using CSV export
    • Export using the REST API
    • Export using the database
  • Contributing to OS2iot
    • Problems, suggestions and questions in issues
    • Security policy
    • Documentation and code in pull requests
      • 1. Make your changes
      • 2. Pull request
      • 3. Improve
      • 4. Celebrate
OS2IoT
  • »
  • <no title> »
  • Downlink helpers
  • Edit on GitHub

Downlink helpers

These javascript samples can help compute valid downlinks for Elsys ERS and Sensit 3.0.

Note, the Elsys code requires to be run in node.js due to useing Buffers.

Elsys (LORAWAN)

// raw: 3E0A14000000461700000002 from https://www.elsys.se/en/downlink-generator/

let raw = "3E0A14000000461700000002";
let asd = "3E051400000045";

// Convert hex to base64 bytes
var base64String = Buffer.from(raw, "hex").toString("base64");
console.log(base64String); // PgoUAAAAQRcAAAAD


/* 
Procedure:
1. Scan Elsys med app for at få info
2. Lav ønsket payload
3. Insæt: confirmed, port 6 (eller andet hvis konfigureret til det i elsys app)
4. enqueue downlink
5. vent på at den modtager downlink og confirmer (den vil joine igen)
*/

Sensit 3.0 (SigFox)

// Byte 0: 00 0 0 0 0 0 0
let b0 = 0x0;

// Byte 1: 00 01 1110
let b1 = 0x1e;

// Byte 2: 00 01 1001
let b2 = 0x19;

// Byte 3: 0000 0010
let b3 = 0x02;

// Byte 4: 0 0000010
let b4 = 0x80 | 0x0f;

// Byte 5
let b5 = 0x10;

// Byte 6
let b6 = 0x10 | 0x02;

let b7 = 0x70 | 0x2;

let res = [b0, b1, b2, b3, b4, b5, b6, b7];

console.log(res.map(x => x.toString(16).padStart(2, "0")).join(""));
Previous Next

© Copyright 2020, OS2. Revision da3f2961.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
stage
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds