{"id":20662883,"url":"https://github.com/kartben/lorawan-node-simulator","last_synced_at":"2025-04-19T15:54:40.558Z","repository":{"id":136260514,"uuid":"315387267","full_name":"kartben/lorawan-node-simulator","owner":"kartben","description":"Simulation infrastructure for a LoRaWAN network (gatways and end devices) that's easy to configure and run from your CLI. Also available as a Docker container.","archived":false,"fork":false,"pushed_at":"2021-07-09T09:11:58.000Z","size":105,"stargazers_count":108,"open_issues_count":1,"forks_count":16,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T09:41:45.102Z","etag":null,"topics":["iot","lorawan","lpwan","network-simulation","simulation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kartben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-11-23T17:15:33.000Z","updated_at":"2025-02-24T09:14:42.000Z","dependencies_parsed_at":"2023-08-01T10:00:57.117Z","dependency_job_id":null,"html_url":"https://github.com/kartben/lorawan-node-simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartben%2Florawan-node-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartben%2Florawan-node-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartben%2Florawan-node-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kartben%2Florawan-node-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kartben","download_url":"https://codeload.github.com/kartben/lorawan-node-simulator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675390,"owners_count":21143768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iot","lorawan","lpwan","network-simulation","simulation"],"created_at":"2024-11-16T19:15:45.312Z","updated_at":"2025-04-19T15:54:40.508Z","avatar_url":"https://github.com/kartben.png","language":"TypeScript","readme":"# Welcome to lorawan-node-simulator 👋\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](/LICENSE)\n[![Twitter: kartben](https://img.shields.io/twitter/follow/kartben.svg?style=social)](https://twitter.com/kartben)\n[![Build](https://github.com/kartben/lorawan-node-simulator/workflows/Node.js%20CI/badge.svg)](https://github.com/kartben/lorawan-node-simulator/actions?query=workflow%3A\"Node.js+CI\")\n\nThis repository contains a simulation infrastructure for LoRaWAN.\n\n 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.\n\nAs 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.\n\n## Install\n\n```bash\nnpm install lorawan-node-simulator -g\n```\n\n## Usage\n\nThe simulator needs to be configured using the following environment variables (the ones in **bold** are mandatory):\n\n- **`NETWORK_SERVER_URI`**: (ex: udp://ttnv3-myinstance.eastus.cloudapp.azure.com:1700) ;\n- **`NETWORK_SESSION_KEY`**:  The network session key (NwkSKey) used by the simulated devices (ex: A54FA689EED2DCE45A4CE5CD947EFCB7) ;\n- **`APPLICATION_SESSION_KEY`**:  The application session key (AppSKey) used by the simulated devices (ex: D8B3FEE5D99EFCFE924678DD664E160C) ;\n- `GATEWAY_START_EUI`: EUI of the first gateway to simulate, 32 hex digits (default: 0000000000000001);\n- `GATEWAY_END_EUI`: EUI of the last (inclusive) gateway to simulate, 32 hex digits (default: 0000000000000005);\n- `END_NODE_START_DEVADDR`: DevAddr of the first end node to simulate, 8 hex digits (default: 00000000);\n- `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).\n- `END_NODE_TX_PERIOD`: how often the end nodes transmit, in milliseconds (default: 30000, i.e. 30s) ;\n\nOnce 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, in which case you may want to rename the `.env.sample` file and use it as a starting point), simply launch the simulation:\n\n```bash\nlorawan-node-simulator\n```\n\n### Docker container\n\nThe simulator is also available as a Docker container.\n\n```bash\ndocker run kartben/lorawan-node-simulator\n```\n\n## Pre-requisites / Limitations\n\n- 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 ;\n\n- The application payload is hard-coded and the same for all devices (4 bytes: ['t', 'e', 's', 't']) ;\n\n- 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 ;\n\n- 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) ;\n\n- Devices only emit unconfirmed uplink at the moment ;\n\n- All simulated devices need to have the same NwkSKey and AppSKey (which may not be a recommened practice in a real-world environment!) ;\n\n- 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) ;\n\n## Author\n\n👤 **Benjamin Cabé**\n\n* Website: https://blog.benjamin-cabe.com\n* Twitter: [@kartben](https://twitter.com/kartben)\n* Github: [@kartben](https://github.com/kartben)\n* LinkedIn: [@benjamincabe](https://linkedin.com/in/benjamincabe)\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\n\nFeel free to check [issues page](https://github.com/kartben/lorawan-node-simulator/issues).\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\n\n## 📝 License\n\nCopyright \u0026copy; 2020 [Benjamin Cabé](https://github.com/kartben).\n\nThis project is [MIT](/LICENSE) licensed.\n\n***\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\n","funding_links":[],"categories":["Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartben%2Florawan-node-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkartben%2Florawan-node-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkartben%2Florawan-node-simulator/lists"}