LoRaWAN Simulator (works with ChirpStack)

UniCT-ARSLab/LWN-Simulator: A LoRaWAN nodes’ and network simulator that works with a real LoRaWAN environment (such as Chirpstack) and equipped with a web interface for real-time interaction. (github.com)

I suggest this LoRaWAN nodes’ simulator to simulate a LoRaWAN Network, equipped with a web interface. It allows communication with a real infrastructure LoRaWAN or ad-hoc infrastructure, such as Chirpstack.

It is equipped with a Web GUI to manage the simulator instance and virtual nodes/gateways (also the real gateways).

We are using it in our company to simulate a couple of LoRaWAN nodes with virtual and real gateways!

3 Likes

Thanks so much for sharing this! It looks like a very convenient way to mock a LoRaWAN topology by emulating some nodes.

I was able to build the simulator successfully after installing Go, but ran into an issue when I attempted to run the binary. I hope you could help me troubleshoot my issue. Here is the error I am getting.

$ make run-release 
2021/05/30 15:10:41 json: cannot unmarshal array into Go value of type map[int]*gateway.Gateway
Makefile:40: recipe for target 'run-release' failed
make: *** [run-release] Error 1

$ make run
2021/05/30 15:11:17 json: cannot unmarshal array into Go value of type map[int]*gateway.Gateway
exit status 1
Makefile:37: recipe for target 'run' failed
make: *** [run] Error 1

My setup:

  • PC running Ubuntu 18.04
  • LoRaWAN gateway on a Raspberry Pi 4 Model B Rev 1.2, OS “10 (buster)”, 4.19.75-v7l+

I would greatly appreciate your help with the above error.

PS: I also get this error when I try running the pre-compiled binary.

The developers just fixed this problem :smiley:

2 Likes

Hi @Fedyfausto, thanks for the prompt reply! Right now, I’m only able to work on my project on weekends, so I didn’t get a chance to rebuild with the new source code until just now. Unfortunately, I still get the same error as above. I tried rebuilding the code in the following two ways.

  1. Did a git pull, and repeated all the make commands
  2. Next, did a fresh clone of the repo, and repeated all the instructions from README.md

I still get the same error messages. Now, I wonder, do I have to modify the IP address in the config.json file to something other than 0.0.0.0? Please let me know if there is anything else I ought to try.

Thanks again for your help, and sorry to be a bother.

Did you tried to delete the old config files? (In your home there is the lwn simulator folder, delete it and retry)

1 Like

It works now after deleting the config files in ~/lwnsimulator.

Thank you! :slight_smile:

2 Likes

You are welcome! For any problem!

Hello, has anybody been using this tool? I am having some trouble joining my simulated device and also with real gateways. I was not able to find more documentation, besides their github readme. Does anybody have more information?

1 Like

I also facing similar issue and no documentation available . Please help out.
Details : i have installed lora simulator, with virtual gateway and gateway bridge. Now i have created a device that is sending data to our virtual gateway that is being part of simulator. How we can verify if somedata is being sent by virtual device that is being recived by virtual gateway.

Can anyone have some document that could help

Hello. I would like to help you but you have to describe me what problems you faced. Do you have any communication problems between device and real gateway or does an error occur?

A device periodically sends an empty frame by default unless a payload has been set during configuration. The uplink interval is also configurable.
At the bottom of the home page, there is a console that allows you to monitor the behavior of gateways and devices such as type of frames they send and receive, etc …

Remember to set the location of all components. The devices simulate the range of an antenna and send frames to all gateways that are within the range.

Hi,
I have just installed LWN Simulator and Chirpstack in the same server (my notebook) to simulate a LoRaWAN network.
I created a virtual gateway and set localhost:1700 as gateway bridge’s parameters in LWN Simulator after check those parameters in Chirpstack Gateway Bridge’s configuration.
The problem is that the virtual gateway was never registered in Chirpstack.
Was anyone able to set up the same scenario successfully?
Thanks in advance!
Regards,
Ariel

Hi,
I have just seen my virtual GW active! The problem was I did not setting the geoloaction and it did not match at all.
Regards,
Ariel

2 Likes

Hi, I’m interested in learn to use your simulator, but I search for information of how to use with chirpstack (I’m also new with it) and I didn’t found information about, would you help me with some info of how to integrate the simulator with chirpstack? Thank you very much for your answer.

1 Like

Hi, sorry for the late answer. The integration is very easy.
1 You create a new network on chirpstack. You create NS, gateways(MAC Address, etc) and devices(Dev EUI, encryption key, etc).
2 After, you create the gateways and devices with the SAME configuration that you specified on chirpstack in LWN simulator too.
3 When the configuration phase is finished, you run chirpstack and the simulator.

Hi everyone, I’m use the LWN Simulator and I have the next question. It’s normal see the same RSSI and SNR in all LoRa messages? Because I try to change location of the nodes and the RSSI, SNR levels are the same (RSSI=-60, SNR=7)

[Processing uplink frame error]

Hi everyone!

I have installed LWN Simulator and ChirpStack server on a Raspberry pi 4. Specifically I have installed chirpstack using docker compose.

I have managed to have communication between the two as I can see in the dashboard my active virtual gateway that I created in the simulator.

But I can not see the devices that I register. I set the same parameters both in the simulator and in Chirpstack (Name, DevEUI, Region and Otaa supported with appKey). The location is a few meters from the GatewAy.

In the log I see a chirpstack network error: Processing uplink frame error.
Error: Zero items in collect set

Any help would be welcome.

Thank you very much for your help.

So if I will create the devices by hand, I simply can not simulate 50k devices with this LoRaWAN Simulator ? Am I right ?

1 Like

Hi everyone!

I have installed LWN Simulator on a Raspberry pi 3.
The Raspberry pi ip address is: http://172.18.96.100:8000 (This is an intranet IP address)
LWN Simulator is working on Pi.
I see on this console log:

2022/03/31 12:42:04 GW[Lora_Agr]: PUSH DATA send
2022/03/31 12:42:16 DEV[Test_agr_dev] |Activation| {A}: None downlink received
2022/03/31 12:42:16 DEV[Test_agr_dev] |Activation| {A}: Unjoined
2022/03/31 12:42:16 DEV[Test_agr_dev] |Activation| {A}: JOIN REQUEST sent
2022/03/31 12:42:16 DEV[Test_agr_dev] |Activation| {A}: Open RXs
2022/03/31 12:42:16 GW[Lora_Agr]: PUSH DATA send
2022/03/31 12:42:28 DEV[Test_agr_dev] |Activation| {A}: None downlink received
2022/03/31 12:42:28 DEV[Test_agr_dev] |Activation| {A}: Unjoined
2022/03/31 12:42:28 DEV[Test_agr_dev] |Activation| {A}: JOIN REQUEST sent
2022/03/31 12:42:28 GW[Lora_Agr]: PUSH DATA send
2022/03/31 12:42:28 DEV[Test_agr_dev] |Activation| {A}: Open RXs
2022/03/31 12:42:34 GW[Lora_Agr]: PULL DATA send
2022/03/31 12:42:40 DEV[Test_agr_dev] |Activation| {A}: None downlink received
2022/03/31 12:42:40 DEV[Test_agr_dev] |Activation| {A}: Unjoined
2022/03/31 12:42:40 DEV[Test_agr_dev] |Activation| {A}: JOIN REQUEST sent
2022/03/31 12:42:40 GW[Lora_Agr]: PUSH DATA send
2022/03/31 12:42:40 DEV[Test_agr_dev] |Activation| {A}: Open RXs
2022/03/31 12:42:52 DEV[Test_agr_dev] |Activation| {A}: None downlink received
2022/03/31 12:42:52 DEV[Test_agr_dev] |Activation| {A}: Unjoined
2022/03/31 12:42:52 DEV[Test_agr_dev] |Activation| {A}: JOIN REQUEST sent
2022/03/31 12:42:52 GW[Lora_Agr]: PUSH DATA send
2022/03/31 12:42:52 DEV[Test_agr_dev] |Activation| {A}: Open RXs
2022/03/31 12:43:04 GW[Lora_Agr]: PULL DATA send
2022/03/31 12:43:04 DEV[Test_agr_dev] |Activation| {A}: None downlink received
2022/03/31 12:43:04 DEV[Test_agr_dev] |Activation| {A}: Unjoined
2022/03/31 12:43:04 DEV[Test_agr_dev] |Activation| {A}: JOIN REQUEST sent
2022/03/31 12:43:04 DEV[Test_agr_dev] |Activation| {A}: Open RXs
2022/03/31 12:43:04 GW[Lora_Agr]: PUSH DATA send
2022/03/31 12:43:16 DEV[Test_agr_dev] |Activation| {A}: None downlink received
2022/03/31 12:43:16 DEV[Test_agr_dev] |Activation| {A}: Unjoined
2022/03/31 12:43:16 DEV[Test_agr_dev] |Activation| {A}: JOIN REQUEST sent
2022/03/31 12:43:16 DEV[Test_agr_dev] |Activation| {A}: Open RXs
2022/03/31 12:43:16 GW[Lora_Agr]: PUSH DATA send
2022/03/31 12:43:28 DEV[Test_agr_dev] |Activation| {A}: None downlink received
2022/03/31 12:43:28 DEV[Test_agr_dev] |Activation| {A}: Unjoined
2022/03/31 12:43:28 DEV[Test_agr_dev] |Activation| {A}: JOIN REQUEST sent
2022/03/31 12:43:28 DEV[Test_agr_dev] |Activation| {A}: Open RXs
2022/03/31 12:43:28 GW[Lora_Agr]: PUSH DATA send
2022/03/31 12:43:34 GW[Lora_Agr]: PULL DATA send
2022/03/31 12:43:40 DEV[Test_agr_dev] |Activation| {A}: None downlink received
2022/03/31 12:43:40 DEV[Test_agr_dev] |Activation| {A}: Unjoined
2022/03/31 12:43:40 DEV[Test_agr_dev] |Activation| {A}: JOIN REQUEST sent
2022/03/31 12:43:40 DEV[Test_agr_dev] |Activation| {A}: Open RXs
2022/03/31 12:43:40 GW[Lora_Agr]: PUSH DATA send

I set the virtual GW on pi IP adr.: 193.6…(this is my ChirpStack NS and AS on a different computer. Windows server 2008 R2 )
The Chipstack server is looking at my Raspberry Pi on the intranet network.

The 1700 port is open.

I set the Chirpstack AS on this tutorial.
Notes for ChirpStack

But on the server I can’t see anything.

Can anyone help solve my problem?