dnatividade / VEINS-tutorials

Tutorials about VEINS, Sumo and OMNet++
GNU General Public License v3.0
15 stars 2 forks source link

Communication between RSU and Central Authority #3

Closed barkhabaheti closed 9 months ago

barkhabaheti commented 10 months ago

hey ! i have to make a project in which there are lots of rsu and cars and a central authority.in which car send message to rsu and at rsu we divide the levels according to their emergency message and then rsu send the message with signature to central authority and central authority will check the identity of cars and record the message. thank you in advance.

dnatividade commented 10 months ago

The message record you can found here: https://github.com/dnatividade/VEINS-tutorials/issues/2

The digital sign you need to implement. I made a Veins project with digital sign using Crypto++ lib. I implemented the public key infrastructure from scratch. But you can use OpenSSL and create the certificates.

barkhabaheti commented 10 months ago

for multiple rsu and central authority what should i do

barkhabaheti commented 10 months ago

hey i have created multiple rsu now i want to difine its range if the vehicle come into its range car will send message to particular rsu and rsu will send the message to the car in its range only. so how to define range/area of a rsu.

barkhabaheti commented 10 months ago

i have created central authority too but now i have to send messages and from car to rsu and at rsu we have to divide it on the basis of how much emergency msg it is and the pass the emergency message to central authority. thank you in advance it will really help me if you help me.

dnatividade commented 10 months ago

To find out if you are in the RSU coverage area, you need to enable the sending of beacons. This way, when the vehicle receives the RSU “beacon”, it will know that it is within its coverage area.

Send me your code so I can see how it looks.

barkhabaheti commented 10 months ago

traci.zip RSUExampleScenario.zip i have done changes in this file. please check. my cars are sending messages to rsu but rsu is not responding can you please check and correct it . and after that if rsu receives the message then this message should deliver to central authority. thank you in advance.

barkhabaheti commented 10 months ago

traci.zip in the above file i tried to transfer messages but it is not working please help me.

dnatividade commented 10 months ago

Ok, I will try the code. Please, send me the examples/ directory too.

dnatividade commented 10 months ago

I need your CA definitions. See, omnetpp.ini doesn't find the CA parameters. ca-parameters

And when I run the simulation the CA does not appear: ca-not-appear

dnatividade commented 10 months ago

Did you create a CA node in your project? Here, I created a CA node (same a RSU) for test: ca-created

How did you do?

barkhabaheti commented 10 months ago

Yes i did

On Fri, 8 Sep 2023 at 7:58 PM, dnatividade @.***> wrote:

Did you create a CA node in your project?

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1711763262, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQLYJGIV3QQPEN4UQCLXZMTPHANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

barkhabaheti commented 10 months ago

I will send it you tomorrow in india here it is night.

On Fri, 8 Sep 2023 at 9:55 PM, Barkha Baheti MTCS, SPUP < @.***> wrote:

Yes i did

On Fri, 8 Sep 2023 at 7:58 PM, dnatividade @.***> wrote:

Did you create a CA node in your project?

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1711763262, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQLYJGIV3QQPEN4UQCLXZMTPHANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

barkhabaheti commented 10 months ago

nodes.zip in this folder i have created the node am i correct.

barkhabaheti commented 10 months ago

did you check my message sending code why it is not transfering

dnatividade commented 10 months ago

I will check now.

dnatividade commented 10 months ago

Sorry, but I can't run your code. It looks like parts are missing. Please send me the complete directory with your simulation files. Because when I try to run the CA is not found.

barkhabaheti commented 10 months ago

Okay i will send you

On Sat, 9 Sep 2023 at 4:17 PM, dnatividade @.***> wrote:

Sorry, but I can't run your code. It looks like parts are missing. Please send me the complete directory with your simulation files. Because when I try to run the CA is not found.

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1712482352, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQJXVEVBOMDPOQOVHH3XZRCNFANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

barkhabaheti commented 10 months ago

I only change the omnetini, rusexample, or in nodes folder I created ca node and in tracidemoca11p if we didn’t put any code still the message are not passing between rsu and node. I don’t understand what is happening.

On Sat, 9 Sep 2023 at 4:54 PM, Barkha Baheti MTCS, SPUP < @.***> wrote:

Okay i will send you

On Sat, 9 Sep 2023 at 4:17 PM, dnatividade @.***> wrote:

Sorry, but I can't run your code. It looks like parts are missing. Please send me the complete directory with your simulation files. Because when I try to run the CA is not found.

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1712482352, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQJXVEVBOMDPOQOVHH3XZRCNFANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

dnatividade commented 10 months ago

No, there's still something missing...

Try this example here. In this example, communication between vehicles and RSU works correctly. Several files have been changed. For it to work, you need to overwrite them all. Complete code: veins.zip

car-rsu-comm

barkhabaheti commented 10 months ago

Okay. In this code you created central authority and after creating the communication between car and rsu is possible?

On Sat, 9 Sep 2023 at 6:47 PM, dnatividade @.***> wrote:

No, there's still something missing...

Try this example here. In this example, communication between vehicles and RSU works correctly. Several files have been changed. For it to work, you need to overwrite them all. Complete code: veins.zip https://github.com/dnatividade/VEINS-tutorials/files/12565858/veins.zip

[image: car-rsu-comm] https://user-images.githubusercontent.com/43869367/266782693-96e6fb28-ffc0-47ea-b0ac-ff8d610221fc.png

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1712509942, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQPWME44DBKKXUCIJQ3XZRT6TANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

dnatividade commented 10 months ago

Yes, it is possible. In this example, the cars and the RSU are communicating.

barkhabaheti commented 10 months ago

okay... can you tell me in which files did you make changes so that the communication is possible. i only changed in node file, omnetini, rsuexample, fille.

barkhabaheti commented 10 months ago

traci.zip i want to send message from rsu to ca not from car to ca. but it is not happening will you please check. thank you in advance.

dnatividade commented 10 months ago

Yes, I understood! You want to send message from RSU to CAR. OK!

But you need to change your code with the correct destination ID: CAR send to RSU ID; RSU send to CAR ID.

Did you try this example? Ping Pong In this example, the CAR send a message to RSU and RSU send a message to CAR.

Basically, you need to change:

Depending your scenario, you need to change src/veins/nodes/* too.

If you want, make a video and show me what is happening, as it could be a problem in your scenario.

barkhabaheti commented 10 months ago

Actually i want to send messages from car to rsu and rsu will send the message to ca. the code I shared with you in this I tried to do this but rsu sending messages to ca is printing but ca is not responding that message. I want you to check it.

Or for creating CA node i also changed in these files only but at that time no communication took place but after adding your code the communication is happening. Is there anyother file you made changes ? Hope i am clear now.

On Tue, 12 Sep 2023 at 4:56 PM, dnatividade @.***> wrote:

Yes, I understood! You want to send message from RSU to CAR. OK!

But you need to change your code with the correct destination ID: CAR send to RSU ID; RSU send to CAR ID.

Did you try this example? [image: Ping Pong] https://github.com/dnatividade/Vanet-Projects/tree/main/01%20Simple%20Projects/005%20Some%20vehicles%20ping%20RSU%20and%20RSU%20answer%20(ping%20-%20pong) In this example, the CAR send a message to RSU and RSU send a message to CAR.

Basically, you need to change:

  • examples/veins/: omnetpp.ini, RSUExampleScenario.ned
  • src/veins/modules/application/traci/*

Depending your scenario, you need to change src/veins/nodes/* too.

If you want, make a video and show me what is happening, as it could be a problem in your scenario.

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1715543486, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQIZJDWMFM5DHQUHNN3X2BBF7ANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

dnatividade commented 10 months ago

Sorry.. RSU to CA (not RSU to CAR). Now I understood.

dnatividade commented 10 months ago

Since your CA is actually the implementation of an RSU, RSU to CA communication is as if it were RSU to RSU.

However, it is not possible to send a message from RSU to RSU (or RSU to CA in your case) in the conventional way with the sendDown() and SendDelayedDaown() methods. To do this, it is necessary to create new communication "gates". To do this, you need to know more about OMNeT++. I really don't know how to do this.

In my projects where I needed to share data between RSUs, I used a database engine (sqlite), where all RSUs had access to it. It's an alternative. In another project, I created an external infrastructure that received data from RSUs via the MQTT protocol (using Node-RED + Mosquito, for example) and shared this data with the external world.

dnatividade commented 10 months ago

In fact, there is a question from a friend on StackOverflow, wanting to know exactly how this communication is carried out (RSU to RSU). https://stackoverflow.com/questions/77073101/how-to-send-message-from-rsu-to-rsu-veins-omnet-sumo

If you find out how this communication is done, I will be grateful if you share it with me.

dnatividade commented 10 months ago

Here, another question: https://stackoverflow.com/questions/55761196/how-to-implement-rsu-to-rsu-communication-in-omnet-veins

barkhabaheti commented 10 months ago

In this he found the solution…

On Tue, 12 Sep 2023 at 5:44 PM, dnatividade @.***> wrote:

Here, another question:

https://stackoverflow.com/questions/55761196/how-to-implement-rsu-to-rsu-communication-in-omnet-veins

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1715609785, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQIHNH5ZUSBC4S5AHXTX2BGZVANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

dnatividade commented 10 months ago

But it was not clear how he managed to solve the problem.

barkhabaheti commented 10 months ago

If we make changes in rsu node like car node then i think it is possible but for this in which files we have to make changes.

On Tue, 12 Sep 2023 at 6:09 PM, dnatividade @.***> wrote:

But it was not clear how he managed to solve the problem.

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1715647018, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQJS2B3VCIMON2HI6VTX2BJYDANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

dnatividade commented 10 months ago

In the past I have tried to do this. But I was not successful, as there is the issue of vehicle mobility which is not available in RSUs. But we can try again.

barkhabaheti commented 10 months ago

Okay lets try..

On Tue, 12 Sep 2023 at 6:36 PM, dnatividade @.***> wrote:

In the past I have tried to do this. But I was not successful, as there is the issue of vehicle mobility which is not available in RSUs. But we can try again.

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1715690047, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQL4KUXNCWKPUOV2AZDX2BM4TANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

dnatividade commented 10 months ago

I think I did it....

dnatividade commented 10 months ago

Forget what I said before... because it was easier than I imagined. Please, replace all files and try: veins_RSU2RSU.zip

In this example:

dnatividade commented 10 months ago

Tomorrow, I will try a code with RSU and CA

barkhabaheti commented 10 months ago

Okay

On Wed, 13 Sep 2023 at 6:37 AM, dnatividade @.***> wrote:

Tomorrow, I will try a code with RSU and CA

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1716785786, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQLUGGHT3GZFIERCH6TX2EBOFANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

barkhabaheti commented 10 months ago

please tell me the files in which you make the changes so that i can understand what is going on..

dnatividade commented 10 months ago

Here is the complete code, where:

veins_CA.zip Replace all files to work properly!

I refactored de code:

network CAScenario extends Scenario { submodules: rsu[1]: RSU { @display("p=150,140;i=veins/sign/yellowdiamond;is=vs"); } ca[1]: CA { @display("p=150,140;i=veins/sign/greendiamond;is=vs"); } }


- omnetpp.ini:

[General] cmdenv-express-mode = true cmdenv-autoflush = true cmdenv-status-frequency = 1s **.cmdenv-log-level = info

image-path = ../../images

network = CAScenario

##########################################################

Simulation parameters

########################################################## debug-on-errors = true print-undisposed = true

sim-time-limit = 500s

.scalar-recording = true .vector-recording = true

.playgroundSizeX = 2500m .playgroundSizeY = 2500m *.playgroundSizeZ = 50m

##########################################################

Annotation parameters

########################################################## *.annotations.draw = true

##########################################################

Obstacle parameters

########################################################## *.obstacles.obstacles = xmldoc("config.xml", "//AnalogueModel[@type='SimpleObstacleShadowing']/obstacles")

##########################################################

TraCIScenarioManager parameters

########################################################## .manager.updateInterval = 1s .manager.host = "localhost" .manager.port = 9999 .manager.autoShutdown = true *.manager.launchConfig = xmldoc("erlangen.launchd.xml")

##########################################################

RSU SETTINGS

########################################################## .rsu[0].mobility.x = 2000 .rsu[0].mobility.y = 2000 *.rsu[0].mobility.z = 3

.rsu[].applType = "RSU" .rsu[].appl.headerLength = 80 bit .rsu[].appl.sendBeacons = false .rsu[].appl.dataOnSch = false .rsu[].appl.beaconInterval = 1s .rsu[].appl.beaconUserPriority = 7 .rsu[].appl.dataUserPriority = 5 .rsu[].nic.phy80211p.antennaOffsetZ = 0 m

##########################################################

CA SETTINGS

########################################################## .ca[0].mobility.x = 1800 .ca[0].mobility.y = 1800 *.ca[0].mobility.z = 3

.ca[].applType = "CA" .ca[].appl.headerLength = 80 bit .ca[].appl.sendBeacons = false .ca[].appl.dataOnSch = false .ca[].appl.beaconInterval = 1s .ca[].appl.beaconUserPriority = 7 .ca[].appl.dataUserPriority = 5 .ca[].nic.phy80211p.antennaOffsetZ = 0 m

##########################################################

11p specific parameters

NIC-Settings

########################################################## .connectionManager.sendDirect = true .connectionManager.maxInterfDist = 2600m *.connectionManager.drawMaxIntfDist = false

*.**.nic.mac1609_4.useServiceChannel = false

*..nic.mac1609_4.txPower = 20mW *.*.nic.mac1609_4.bitrate = 6Mbps ..nic.phy80211p.minPowerLevel = -110dBm

*.*.nic.phy80211p.useNoiseFloor = true .**.nic.phy80211p.noiseFloor = -98dBm

*..nic.phy80211p.decider = xmldoc("config.xml") *.*.nic.phy80211p.analogueModels = xmldoc("config.xml") ..nic.phy80211p.usePropagationDelay = true

*.*.nic.phy80211p.antenna = xmldoc("antenna.xml", "/root/Antenna[@id='monopole']") .node[].nic.phy80211p.antennaOffsetY = 0 m .node[*].nic.phy80211p.antennaOffsetZ = 1.895 m

##########################################################

Cars Settings

########################################################## .node[].applType = "Cars" .node[].appl.headerLength = 80 bit .node[].appl.sendBeacons = false .node[].appl.dataOnSch = false .node[].appl.beaconInterval = 1s

##########################################################

Mobility

########################################################## .node[].veinsmobility.x = 0 .node[].veinsmobility.y = 0 .node[].veinsmobility.z = 0 .node[].veinsmobility.setHostSpeed = false

dnatividade commented 10 months ago

ping-pong-rsu-ca

barkhabaheti commented 10 months ago

If I don’t change the names of file will it cause problem. Or for rsu to rsu communication in which file you did changes and what changes. Thank you so much…

On Wed, 13 Sep 2023 at 6:25 PM, dnatividade @.***> wrote:

Here is the complete code, where:

  • CAR:22 send a message to RSU:11.
  • So, RSU:11 send a message to CA:16 and CA:16 send message to RSU:11.... (repeat until simulation finish). On screen, is printed information about the messages.

veins_CA.zip https://github.com/dnatividade/VEINS-tutorials/files/12597607/veins_CA.zip Replace all files to work properly!

I refactored de code:

  • Renamed all files into the traci/ folder (.h .cc, .ned, .msg):
    • TraCIDemo11p -> Cars
    • TraCIDemoRSU11p -> RSU
    • TraCIDemo11pMessage -> Messages
  • Included:
    • CA class
    • "defines.h" file, with definitions about CAR, RSU and CA IDs
    • images/veins/sign/: greendiamond.png and greendiamond_vs.png (CA icon)
  • Changes into examples/veins/ folder:
    • Renamed: RSUExampleScenario.ned -> CAScenario.ned
    • CAScenario.ned content:

import org.car2x.veins.nodes.RSU; import org.car2x.veins.nodes.CA; import org.car2x.veins.nodes.Scenario;

network CAScenario extends Scenario { submodules: rsu[1]: RSU { @display("p=150,140;i=veins/sign/yellowdiamond;is=vs"); } ca[1]: CA { @display("p=150,140;i=veins/sign/greendiamond;is=vs"); } }

  • omnetpp.ini:

[General] cmdenv-express-mode = true cmdenv-autoflush = true cmdenv-status-frequency = 1s **.cmdenv-log-level = info

image-path = ../../images

network = CAScenario

##########################################################

Simulation parameters

########################################################## debug-on-errors = true print-undisposed = true

sim-time-limit = 500s

.scalar-recording = true .vector-recording = true

.playgroundSizeX = 2500m .playgroundSizeY = 2500m *.playgroundSizeZ = 50m

##########################################################

Annotation parameters

########################################################## *.annotations.draw = true

##########################################################

Obstacle parameters

########################################################## *.obstacles.obstacles = xmldoc("config.xml", @.***='SimpleObstacleShadowing']/obstacles")

##########################################################

TraCIScenarioManager parameters

########################################################## .manager.updateInterval = 1s .manager.host = "localhost" .manager.port = 9999 .manager.autoShutdown = true *.manager.launchConfig = xmldoc("erlangen.launchd.xml")

##########################################################

RSU SETTINGS

########################################################## .rsu[0].mobility.x = 2000 .rsu[0].mobility.y = 2000 *.rsu[0].mobility.z = 3

.rsu[].applType = "RSU" .rsu[].appl.headerLength = 80 bit .rsu[].appl.sendBeacons = false .rsu[].appl.dataOnSch = false .rsu[].appl.beaconInterval = 1s .rsu[].appl.beaconUserPriority = 7 .rsu[].appl.dataUserPriority = 5 .rsu[].nic.phy80211p.antennaOffsetZ = 0 m

##########################################################

CA SETTINGS

########################################################## .ca[0].mobility.x = 1800 .ca[0].mobility.y = 1800 *.ca[0].mobility.z = 3

.ca[].applType = "CA" .ca[].appl.headerLength = 80 bit .ca[].appl.sendBeacons = false .ca[].appl.dataOnSch = false .ca[].appl.beaconInterval = 1s .ca[].appl.beaconUserPriority = 7 .ca[].appl.dataUserPriority = 5 .ca[].nic.phy80211p.antennaOffsetZ = 0 m

##########################################################

11p specific parameters

NIC-Settings

########################################################## .connectionManager.sendDirect = true .connectionManager.maxInterfDist = 2600m *.connectionManager.drawMaxIntfDist = false

*.**.nic.mac1609_4.useServiceChannel = false

*..nic.mac1609_4.txPower = 20mW *.*.nic.mac1609_4.bitrate = 6Mbps ..nic.phy80211p.minPowerLevel = -110dBm

*.*.nic.phy80211p.useNoiseFloor = true .**.nic.phy80211p.noiseFloor = -98dBm

*..nic.phy80211p.decider = xmldoc("config.xml") *.*.nic.phy80211p.analogueModels = xmldoc("config.xml") ..nic.phy80211p.usePropagationDelay = true

..nic.phy80211p.antenna = xmldoc("antenna.xml", @.='monopole']") .node[].nic.phy80211p.antennaOffsetY = 0 m .node[].nic.phy80211p.antennaOffsetZ = 1.895 m

##########################################################

Cars Settings

########################################################## .node[].applType = "Cars" .node[].appl.headerLength = 80 bit .node[].appl.sendBeacons = false .node[].appl.dataOnSch = false .node[].appl.beaconInterval = 1s

##########################################################

Mobility

########################################################## .node[].veinsmobility.x = 0 .node[].veinsmobility.y = 0 .node[].veinsmobility.z = 0 .node[].veinsmobility.setHostSpeed = false

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1717576275, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQJTTQQZZQIJJWQ2RDTX2GULXANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

dnatividade commented 10 months ago

You can keep the original file names. No problems.

I did so many tests that I don't even remember what I did to fix it. But it seems like I was forgetting to use the populateWSM() method. To send a message you can use:

        TraCIDemo11pMessage* wsm = new TraCIDemo11pMessage*();
        populateWSM(wsm, OTHER_RSU_ADDRESS); // <------- here**
        wsm->setSenderAddress(myId);
        wsm->setDemoData("Message from RSU");
        sendDown(wsm);
barkhabaheti commented 10 months ago

okay.. can you please tell me for rsu to rsu communication in which files and lines you changed the code. i tried to find it but didn't found it.

barkhabaheti commented 10 months ago

for hash i want to use MD5 algo. and for this crypto++ library. how can i use this library.

dnatividade commented 10 months ago

okay.. can you please tell me for rsu to rsu communication in which files and lines you changed the code. i tried to find it but didn't found it.

Basically, populateWSM(wsm, OTHER_RSU_ADDRESS) solved the problem.

dnatividade commented 10 months ago

okay.. can you please tell me for rsu to rsu communication in which files and lines you changed the code. i tried to find it but didn't found it.

Basically, populateWSM(wsm, OTHER_RSU_ADDRESS) solved the problem.

https://www.cryptopp.com/wiki/MD5

You need to install Crypto++ Library For Debian Linux (in my case) you can install: apt install libcrypto++-dev

barkhabaheti commented 10 months ago

I am using windows. I downloaded the library. Now how to use it in omnet.

On Thu, 14 Sep 2023 at 6:54 PM, dnatividade @.***> wrote:

okay.. can you please tell me for rsu to rsu communication in which files and lines you changed the code. i tried to find it but didn't found it.

Basically, populateWSM(wsm, OTHER_RSU_ADDRESS) solved the problem.

https://www.cryptopp.com/wiki/MD5

You need to install Crypto++ Library For Debian Linux (in my case) you can install: apt install libcrypto++-dev

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1719445943, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQLZDM4RGKDIEDB4HG3X2MAPTANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>

dnatividade commented 10 months ago

Did you download from Github?

Basically you need to compile and install the library. Make sure the cryptopp directory is in the system path. Include the libs in your code, for example:

#include <cryptopp/cryptlib.h>
#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
#include <cryptopp/md5.h>

initialize() method:

        using namespace CryptoPP;
        Weak::MD5 hash;
        std::cout << "Name: " << hash.AlgorithmName() << std::endl;
        std::cout << "Digest size: " << hash.DigestSize() << std::endl;
        std::cout << "Block size: " << hash.BlockSize() << std::endl;

Now, include the lib cryptopp to link with you app: OMNeT++ go to: Project -> Properties -> OMNeT++ -> Makemake Select: src:makemake .... Click on Options... button; Got to Link tab; In Additional libraries to link with: (-l option), click on Add button; Type: cryptopp linker

Then, click: OK -> OK -> Apply and Close

Done!

barkhabaheti commented 10 months ago

Okay thank you. I will try it tomorrow and let you know.

On Thu, 14 Sep 2023 at 10:01 PM, dnatividade @.***> wrote:

Did you download from Github?

Basically you need to compile and install the library. Make sure the cryptopp directory is in the system path. Include the libs in your code, for example:

include <cryptopp/cryptlib.h>

define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1

include <cryptopp/md5.h>

initialize() method:

    using namespace CryptoPP;
    Weak::MD5 hash;
    std::cout << "Name: " << hash.AlgorithmName() << std::endl;
    std::cout << "Digest size: " << hash.DigestSize() << std::endl;
    std::cout << "Block size: " << hash.BlockSize() << std::endl;

Now, include the lib cryptopp to link with you app: OMNeT++ go to: Project -> Properties -> OMNeT++ -> Makemake Select: src:makemake .... Click on Options... button; Got to Link tab; In Additional libraries to link with: (-l option), click on Add button; Type: cryptopp [image: linker] https://user-images.githubusercontent.com/43869367/268045517-99462732-40a7-48fe-83c1-52b849c0f406.png

Then, click: OK -> OK -> Apply and Close

Done!

— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1719777656, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQKVMBGA355K4NZTZZTX2MWMVANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>