Project-GrADyS / gradys-simulations

Simulations from Project GrADyS on OMNET++ and INET framework
GNU General Public License v3.0
14 stars 10 forks source link

Data being picked up at sensors? #20

Closed thomoasis closed 1 year ago

thomoasis commented 1 year ago

Hello! I had a question about the data being picked up by the quads as the fly over sensors. I was able to add an additional waypoint in the simple configuration but was wondering what the data is. Is it integers? Would I be able to use text? AND would I be able to encrypt the text? I understand it uses IEEE 802.11and was wondering if WEP or WPA could be implemented. Thanks for your help so far! SimpleConfig

Thlamz commented 1 year ago

The data picked up is just an integer representing the number of fictional packets picked up in the interaction. This number of fictional packets is passed as part of the data's content, you can see in the declaration file of the message type they are exchanging. I imagine you are using the Simple Protocol so it can be found as "content" in the SimpleMessage.msg declaration.

You can of course implement your own message content composed of a string of text, sharing actual data instead of an integer representing the amount of data exchanged. You would put that data in a new .msg message declaration and change your protocol module to generate and consume that kind of message.

As for implementing WEP and WPA, I'm not sure if I can help you. That would probably be implemented in the network components provided by INET and not in the GrADyS's modules themselves. The entire network stack is provided by INET and I know that you can extend the features that they provide in any way that you want. You can check out their documentation here: https://inet.omnetpp.org/docs/. Maybe they already have that implemented, maybe it would be easy to modify an existing module to implement it, I'm not that familiar with INET's code!

thomoasis commented 1 year ago

I will work on that. thanks!

So I added an extra stop for SimpleConfiguration quad 0 to sensor 0 and 2. quad 1 to sensor 1 and 7. When it gets to 7 it doesn't pick up any data. I did change the data to default(1) in the SimpleSensorProtocol.ned file. Is there something im missing? I apprecate your help!

Thlamz commented 1 year ago

Two things that come to mind:

  1. The destAddresses parameter on the nodes control who they are allowed to talk to. Maybe check if sensor[7] is in the drone's destAddresses and if the drones are in sensor[7]'s destAddresses
  2. Make sure that sensor[7]'s protocol.typename parameter is set to "SimpleSensorProtocol". This parameter defines what protocol that node is using, by default they use a dummy protocol and this sets it to use the SimpleSensorProtocol.

When we set up the Simple configuration we only set up sensors 0, 1 and 2 to be actual functioning sensors, the other ones are there more for aesthetic purposes than anything. These are the lines you probably need to change:

https://github.com/brunoolivieri/gradys-simulations/blob/3ac01b059c0081119babbfe6271c84e9944c3ca6/mobilityDrones-omnetpp.ini#L741 https://github.com/brunoolivieri/gradys-simulations/blob/3ac01b059c0081119babbfe6271c84e9944c3ca6/mobilityDrones-omnetpp.ini#L762

thomoasis commented 1 year ago

it worked!

.quads[0].app[0].destAddresses = "quads[1] sensors[0] sensors[1] sensors[2] sensors[3] sensors[4] sensors[5] sensors[6] sensors[7] groundStation" .quads[1].app[0].destAddresses = "quads[0] sensors[0] sensors[1] sensors[2] sensors[3] sensors[4] sensors[5] sensors[6] sensors[7] groundStation"

and

*.sensors[0..6].protocol.typename = "SimpleSensorProtocol"

Thanks so much!

thomoasis commented 1 year ago

thanks for all your help!