This project mainly simulates a gateway and devices in a LoRaWAN network communication environment, with ChirpStack serving as the network server. A local UDP client is used to handle communication with the ChirpStack network.
Ubuntu 20.04 LTS Python 3.8
/config
- config.json: Basic configurations.
- gateway.json: Gateway EUI.
- device.json: Device parameters for OTAA mode.
(These have to be the same as the information related to the devices registered inside ChirpStack)
OTAA Modify device infomation in config/device.json. An example:
{
"Device": {
"JoinEUI": "0000000000000001",
"DevEUI": "bfd2718a2904e6a8"
},
"RootKeys": {
"AppKey": "5871FE1C02D1A74B6684D2D9FF54CEDA",
"NwkKey": "14714AAFF51F7792D8C4CCB614D08396"
}
}
Gateway
Modify Gateway infomation in config/gateway.json. An example:
{"GatewayEUI": "4e7b2799b9bfd427"}
The general workflow is as follows:
- Send a PULL_DATA to ChirpStack server by python main.py pull.
- Send a join request message to ChirpStack server by python main.py join.
- If the join accept message is decoded successfully, we can send an uplink message.
- An Uplink message can be sent by python main.py app -m xxxxx.
python main.py pull
python main.py join -n / python main.py join
python main.py app test
Currently, only the mutation construction of data sent to the Device has been implemented.
python main.py fuzz testdata
Results: Fuzzed_results.csv