npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lorawan-node-simulator

v0.2.2

Published

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](/LICENSE) [![Twitter: kartben](https://img.shields.io/twitter/follow/kartben.svg?style=social)](https://twitter.com/kartben) [![Build](https://github.com/kartben/lorawan-node-simulat

Downloads

31

Readme

Welcome to lorawan-node-simulator 👋

License: MIT Twitter: kartben Build

This repository contains a simulation infrastructure for LoRaWAN.

It simulates LoRaWAN gateways, and endpoints regularly emitting LoRaWAN radio packets ("Unconfirmed Data Uplink" by default). These packets get picked up by a few (i.e. 1 to 3) gateways that forward them to a network server.

As the initial purpose of this solution was to stress test a LoRaWAN network server, and not necessarily implement a full-blown simulator, only uplink traffic is generated at this point, and devices are expected to be provisioned via ABP.

Install

npm install lorawan-node-simulator -g

Usage

The simulator needs to be configured using the following environment variables (the ones in bold are mandatory):

  • NETWORK_SERVER_URI: (ex: udp://ttnv3-myinstance.eastus.cloudapp.azure.com:1700) ;
  • NETWORK_SESSION_KEY: The network session key (NwkSKey) used by the simulated devices (ex: A54FA689EED2DCE45A4CE5CD947EFCB7) ;
  • APPLICATION_SESSION_KEY: The application session key (AppSKey) used by the simulated devices (ex: D8B3FEE5D99EFCFE924678DD664E160C) ;
  • GATEWAY_START_EUI: EUI of the first gateway to simulate, 32 hex digits (default: 0000000000000001);
  • GATEWAY_END_EUI: EUI of the last (inclusive) gateway to simulate, 32 hex digits (default: 0000000000000005);
  • END_NODE_START_DEVADDR: DevAddr of the first end node to simulate, 8 hex digits (default: 00000000);
  • END_NODE_END_DEVADDR: DevAddr of the last (inclusive) end node to simulate, 8 hex digits (default simulation has 1000 devices, hence end address is 000003e8).
  • END_NODE_TX_PERIOD: how often the end nodes transmit, in milliseconds (default: 30000, i.e. 30s) ;

Once all the required environment variables have been set (defined globally in your environment, or in a .env file in the folder from where you'll run the command), simply launch the simulation:

lorawan-node-simulator

Docker container

The simulator is also available as a Docker container.

docker run kartben/lorawan-node-simulator

Pre-requisites / Limitations

  • The simulator does not provision the simulated gateways, end devices and applications in your network server so you must take care of doing so prior to launching a simulation ;

  • The application payload is hard-coded and the same for all devices (4 bytes: ['t', 'e', 's', 't']) ;

  • Gateways need to be provisioned with an "EU 863-870" frequency plan. Note that adding support for additional frequency plans in the simulator is reasonably straigthforward ;

  • Devices need to be provisioned in your network server using the ABP method, and need to be in a "vanilla" state (i.e. frame counter = 0) ;

  • Devices only emit unconfirmed uplink at the moment ;

  • All simulated devices need to have the same NwkSKey and AppSKey (which may not be a recommened practice in a real-world environment!) ;

  • No downlink support (the packet forwarder that the simulated gateways implement only supports "PUSH_DATA" command from the Semtech packet forwarder specification at the moment, so downlink can't be available) ;

Author

👤 Benjamin Cabé

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 Benjamin Cabé.

This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator