Skip to content

A wireless network simulator and wormhole detection module based on my self-designed algorithm.

Notifications You must be signed in to change notification settings

dvstter/WirelessSensorNetworkSimulatorAndWormholeDetection

Repository files navigation

Wireless-Sensor-Network-Simulator-and-Wormhole-Detection

A wireless network simulator and wormhole detection module based on my self-designed algorithm.


About Wireless Network Simulator

This is a wireless network simulator based on Python. The simulator didn't need any extra Python package, so you can run it just with Python.

About Wormhole Detection

I created a brand-new wormhole detection algorithm based on my teacher Lu Li's paper. In fact the algorithm is just a simplified version of my teacher's.

How this work

  1. Run the sensor's network firstly

Use python main.py to run this program. After that, you should wait about 5 seconds, because the network needs to be inited. Then you should see some output generated by the Sink Node.

  1. Then the wormhole detection

Just press the enter button, the program will insert a wormhole node, and the wormhole detection algorithm will be running. You should see some output about the wormhole detection.

Notice: In fact you should wait until the program give you like "Network init finished." prompt then press the enter button.

  1. Close the program

Just press the enter button again, the program will be closed.

Create your own network

  1. About the network

The networktest.py will receive a network file as input. The network.py will create a network which nodes are randomly placed. One thing you need to do is set the nodes' number.

  1. Create a network which nodes are placed handfully

Firstly create a new network file in the NetworkFiles folder. There is an example for the network file.

0 0
12 23
32 34

This means there are three nodes in the network, the ID is 0, 1, 2(auto incremted, you can see). And the nodes' coordinates are (0, 0), (12, 23), (32, 34). Then you should go to the networktest.py modify the TEST_FILE constants.

  1. Create a network randomly

Firstly modify the main.py, change the from networktest import * to from network import * Secondly modify the network.py, change the RANDOM_NODES_NUMBER constants to any number you want.

Modify the network

I am too lazy to write, if you have any question, contact me, I will be pleased to answer

BTW

This is my graduate design. The 毕业设计.doc is my graduate design paper.

About

A wireless network simulator and wormhole detection module based on my self-designed algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages