Closed barkhabaheti closed 10 months ago
Ok.
Or... put in your Makefile:
LIBS = -lcryptopp
Demonstration: https://www.youtube.com/watch?v=BjRA-AtXm8Y
traci.zip hi in this i have changed code. what i have to do is car sending to rsu and rsu sending to CA and then a ACK should be send from CA to RSU and RSU to CAR. in my case ACK to RSU is sending perfectly but ACK form RSU to CAR is not happening. can you please check and tell me what to do.
Okay, I understand what you did wrong. I'll make a video explaining it to you.
However, the best way to do this would be to immediately send the RSU ACK to the car and only then send the RSU message to the CA.
Not recommended: CAR --msg--> RSU RSU --msg--> CA CA --ack--> RSU RSU --ack--> CAR
Recommended: CAR --msg--> RSU RSU --ack--> CAR RSU --msg--> CA CA --ack--> RSU
This is because in a scenario with many vehicles, if the RSU receives a message from car1, forwards it to the CA, and in this period receives a message from car2, the address of car1 will be replaced by the address of car2 and car1 will never receive the ack . You understood?
Another thing you should do is send the message and wait for ack. If you don't receive ack (within 2 seconds, for example), send the message again. Because collisions or packet losses may occur.
Okay thank you
On Sat, 16 Sep 2023 at 8:15 PM, dnatividade @.***> wrote:
Another thing you should do is send the message and wait for ack. If you don't receive ack (within 2 seconds, for example), send the message again. Because collisions or packet losses may occur.
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1722245178, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQJR7PL3BASTNGVDCFLX2W3QDANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
Hi i m not able to build crypto library in windows. I downloaded it from github. And try to build it in visual studio but in it, it is showing unloaded i m stuck now don’t understand what to do.
On Sat, 16 Sep 2023 at 9:17 PM, Barkha Baheti MTCS, SPUP < @.***> wrote:
Okay thank you
On Sat, 16 Sep 2023 at 8:15 PM, dnatividade @.***> wrote:
Another thing you should do is send the message and wait for ack. If you don't receive ack (within 2 seconds, for example), send the message again. Because collisions or packet losses may occur.
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1722245178, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQJR7PL3BASTNGVDCFLX2W3QDANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
In this case I would need to install Windows on a VM to test. I might try to do that on Saturday...
Ok, sounds good.
On Wed, 20 Sep 2023 at 4:09 PM, dnatividade @.***> wrote:
In this case I would need to install Windows on a VM to test. I might try to do that on Saturday...
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1727465934, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQIQUMTYDCSGQU67JKLX3LBUPANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
Demonstration: https://www.youtube.com/watch?v=BjRA-AtXm8Y
in this video after install just added the include but what is the middle process for omnet where you included these files what changes should i make to run this.
This video shows the entire process that needs to be done to make it work. The crypto++ library was installed at first with the apt install libcrypto++-dev
command.
Remembering that this procedure only works on Debian-based Linux distributions.
At 5:39 of the video I show where to configure the compiler to insert the cryptopp
library into the liker (-lcryptopp)
Thanks, I'll check it out.
On Thu, 21 Sep 2023 at 4:35 PM, dnatividade @.***> wrote:
This video shows the entire process that needs to be done to make it work. The crypto++ library was installed at first with the apt install libcrypto++-dev command. Remembering that this procedure only works on Debian-based Linux distributions. At 5:39 of the video I show where to configure the compiler to insert the cryptopp library into the liker (-lcryptopp)
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1729347085, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQM5CXQENGRBWHHMZF3X3QNRDANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
how to include and what to include the file path.
On Thu, Sep 21, 2023 at 4:56 PM Barkha Baheti MTCS, SPUP < @.***> wrote:
Thanks, I'll check it out.
On Thu, 21 Sep 2023 at 4:35 PM, dnatividade @.***> wrote:
This video shows the entire process that needs to be done to make it work. The crypto++ library was installed at first with the apt install libcrypto++-dev command. Remembering that this procedure only works on Debian-based Linux distributions. At 5:39 of the video I show where to configure the compiler to insert the cryptopp library into the liker (-lcryptopp)
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1729347085, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQM5CXQENGRBWHHMZF3X3QNRDANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
i tried this..
I didn't need to change anything there. I just needed to configure this:
I did this but it didn’t work how the omnet will find the path without including it. I didn’t get it. What i did was download the library and run the crypt.sln file in visual studio and in solution explorer 4 file created and i build these files and in cryptopp fuolder two folders created x64 and 32. After that i did link thing in omnet. On Fri, 22 Sep 2023 at 6:22 PM, dnatividade @.***> wrote:
I didn't need to change anything there. I just needed to configure this:
[image: Captura de tela de 2023-09-22 09-49-36] https://user-images.githubusercontent.com/43869367/269941877-0fa2b864-b0ec-4edc-af1d-96d6ba4a4119.png
[image: Captura de tela de 2023-09-22 09-49-23] https://user-images.githubusercontent.com/43869367/269941909-6f0fa3cf-ff03-4134-9340-021ff7a396a0.png
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1731364212, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQKDDERJZNDZSHJ7QLDX3WC2BANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
I did this but it didn’t work how the omnet will find the path without including it.
When I install crypto++ from the Linux repository, the libraries go to OS path, so I don't need to configure anything.
What i did was download the library and run the crypt.sln file in visual studio and in solution explorer 4 file created and i build these files and in cryptopp fuolder two folders created x64 and 32. After that i did link thing in omnet.
I don't understand anything about Windows and Visual Studio. I would need to test...
Will you be able to do it today?
On Fri, 22 Sep 2023 at 8:29 PM, dnatividade @.***> wrote:
I did this but it didn’t work how the omnet will find the path without including it.
When I install crypto++ from the Linux repository, the libraries go to OS path, so I don't need to configure anything.
What i did was download the library and run the crypt.sln file in visual studio and in solution explorer 4 file created and i build these files and in cryptopp fuolder two folders created x64 and 32. After that i did link thing in omnet.
I don't understand anything about Windows and Visual Studio. I would need to test...
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1731569673, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQJ7NO2LEBELBCESX43X3WRWHANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
I will try...
hey did you tried it ...
On Sun, Sep 24, 2023 at 1:09 AM dnatividade @.***> wrote:
I will try...
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1732395063, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQLGSACYSFU42UI5J73X343HVANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
hey I can use crc32. in which i want when car sending message to rsu it will send its crc32 hash too
hey did you tried it ... … On Sun, Sep 24, 2023 at 1:09 AM dnatividade @.> wrote: I will try... — Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQLGSACYSFU42UI5J73X343HVANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.>
Yes, I managed to get the simulation to work with crypto++ on Windows. I will upload a video to show you how to do it.
hey I can use crc32. in which i want when car sending message to rsu it will send its crc32 hash too
OK. Did you see CRC32 in one of my examples?
How to run OMNeTt++, Veins and Crypto++ on MS Windows. https://www.youtube.com/watch?v=2gNghqiyM6U
Yes i saw your code but it didn’t work for me i want that the message which we are sending to the rsu from the car Message + hash(sender address + message) so how can i do this..
On Tue, 26 Sep 2023 at 7:24 PM, dnatividade @.***> wrote:
How to run OMNeTt++, Veins and Crypto++ on MS Windows. https://www.youtube.com/watch?v=2gNghqiyM6U
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1735592221, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQOH3JEA7TDUXROWXEDX4LNCJANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
Ok, in this case, you need to create a field into .msg file:
import veins.base.utils.Coord;
import veins.modules.messages.BaseFrame1609_4;
import veins.base.utils.SimpleAddress;
namespace veins;
packet TraCIDemo11pMessage extends BaseFrame1609_4 {
string demoData;
LAddress::L2Type senderAddress = -1;
int serial = 0;
unsigned long crc; //new field
}
Change hashCRCMsg() to:
/* My Functions
* @author: dnatividade
*/
unsigned long TraCIDemo11p::hashCRCMsg(int carAddress, std::string dataWsm){
//https://stackoverflow.com/a/25018742
unsigned long crc = crc32(0L, Z_NULL, 0);
/*concatenate all message fields to compute hash
* senderAddress(int) + data(string)
*/
std::string allWsmFields = std::to_string(carAddress) + dataWsm;
//compute hash (for simplicity i am using CRC32 as hash function)
//https://stackoverflow.com/a/25018742
crc = crc32(crc, (const unsigned char*)allWsmFields.c_str(), strlen(allWsmFields.c_str()));
return crc;
}
To send the message, add this after populateWSM():
wsm->setCrc(hashCRCMsg(myId, "message");
Ok, I will try.
On Tue, 26 Sep 2023 at 8:00 PM, dnatividade @.***> wrote:
Ok, in this case, you need to create a field into .msg file:
import veins.base.utils.Coord; import veins.modules.messages.BaseFrame1609_4; import veins.base.utils.SimpleAddress;
namespace veins;
packet TraCIDemo11pMessage extends BaseFrame1609_4 { string demoData; LAddress::L2Type senderAddress = -1; int serial = 0; unsigned long crc; //new field }
Change hashCRCMsg() to:
/* My Functions
@author: dnatividade */ unsigned long TraCIDemo11p::hashCRCMsg(int carAddress, std::string dataWsm){ //https://stackoverflow.com/a/25018742 unsigned long crc = crc32(0L, Z_NULL, 0);
/*concatenate all message fields to compute hash
- senderAddress(int) + data(string) / std::string allWsmFields = std::to_string(carAddress) + dataWsm; //compute hash (for simplicity i am using CRC32 as hash function) //https://stackoverflow.com/a/25018742 crc = crc32(crc, (const unsigned char)allWsmFields.c_str(), strlen(allWsmFields.c_str()));
return crc; }
To send the message, add this after populateWSM():
wsm->setCrc(hashCRCMsg(myId, "message");
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1735664077, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQOP6AGBZX5XMQASQUTX4LRGTANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
If you can, please mark my answer as a solution in these StackOverflow links: (This is you, isn't it?)
https://stackoverflow.com/questions/76927399/how-to-make-changes-in-myveinsapp-using-demomessageapp
How to run OMNeTt++, Veins and Crypto++ on MS Windows. https://www.youtube.com/watch?v=2gNghqiyM6U
how did you compile cryptopp file..
Done.
On Tue, Sep 26, 2023 at 10:23 PM dnatividade @.***> wrote:
If you can, please mark my answer as a solution in these StackOverflow links: (This is you, isn't it?)
https://stackoverflow.com/questions/76927399/how-to-make-changes-in-myveinsapp-using-demomessageapp
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1735930751, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQPPSJ6ZY22YCJVT3XTX4MCBXANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
traci.zip i tried this but getting error..
how to handle this message at rsu...
Ok. You need to send a message from CAR to RSU containing: senderId, data, hash. Right? What about CA?
Rsu will send this details to ca and then ca will calculate hash again and compare it with the hash sended by the car to rsu and rsu to ca.
On Wed, 27 Sep 2023 at 7:09 PM, dnatividade @.***> wrote:
Ok. You need send a message from CAR to RSU containing: senderId, data, hash). Right? What about CA?
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1737420249, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQJ3EEJ5V2CA4BXYGADX4QUAVANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
The code is almost ready, but I just have one question: will the CA calculate the CRC based on the RSU ID or based on the ID of the vehicle that originally sent the message to the RSU?
In this code:
CRC(myId, msgData)
-> send to RSUCRC(carID, msgData)
CRC(myId, msgData)
-> send to CAAt the end, the number of messages received by RSU and CA is shown
OBS.: I created a class called CRC and all nodes (vehicles, RSUs and CAs) use it to do CRC operations
Thanks, I'll check it out.
On Fri, 29 Sep 2023 at 12:40 AM, dnatividade @.***> wrote:
traci-CRC_CAR-RSU-CA.zip https://github.com/dnatividade/VEINS-tutorials/files/12753071/traci-CRC_CAR-RSU-CA.zip
In this code:
- CAR computes CRC(myId, msgData) -> send to RSU
- RSU computes CRC(carID, msgData)
- if CRC correct: computes new CRC(myId, msgData) -> send to CA
- At the end, the number of messages received by RSU and CA is shown
OBS.: I created a class called CRC and all nodes (vehicles, RSUs and CAs) use it to do CRC operations
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1739867072, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQPRKOOMP4773QMVZLTX4XDS5ANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
referenced by ../out/clang-release/src/veins/modules/application/traci/CRC.o:(CRC::hashCRCMsg(int, std::cxx11::basic_string<char, std::char_traits
, std::allocator cxx11::basic_string<char, std::char_traits>)) referenced by ../out/clang-release/src/veins/modules/application/traci/CRC.o:(CRC::hashCRCMsg(int, std:: , std::allocator >)) clang++: error: linker command failed with exit code 1 (use -v to see invocation) C:\Users\DELL\src\omnetpp-5.7\tools\win64\mingw64\bin/llvm-ar.exe: error: unable to load '../out/clang-release/src/libveins.dll.a': No such file or directory make[1]: [Makefile:216: ../out/clang-release/src/libveins.dll] Error 1 make[1]: Leaving directory '/c/Users/DELL/Downloads/veins_CA/veins/src' make: [Makefile:36: all] Error 2 "make MODE=release -j12 all" terminated with exit code 2. Build might be incomplete.
I AM GETTING THIS ERROR WHILE RUNNING YOUR CODE. WHILE RUNNING PREVIOUS ONE IT IS RUNNING Okay.
On Fri, Sep 29, 2023 at 10:40 AM Barkha Baheti MTCS, SPUP < @.***> wrote:
Thanks, I'll check it out.
On Fri, 29 Sep 2023 at 12:40 AM, dnatividade @.***> wrote:
traci-CRC_CAR-RSU-CA.zip https://github.com/dnatividade/VEINS-tutorials/files/12753071/traci-CRC_CAR-RSU-CA.zip
In this code:
- CAR computes CRC(myId, msgData) -> send to RSU
- RSU computes CRC(carID, msgData)
- if CRC correct: computes new CRC(myId, msgData) -> send to CA
- At the end, the number of messages received by RSU and CA is shown
OBS.: I created a class called CRC and all nodes (vehicles, RSUs and CAs) use it to do CRC operations
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1739867072, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQPRKOOMP4773QMVZLTX4XDS5ANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
https://github.com/dnatividade/VEINS-tutorials/assets/43869367/30676a35-ed78-45aa-8279-2b8e1d3ebfae
In this case I don't know what it could be. You can try searching StackOverflow about this error. I needed to see your environment, as it may have some invalid configuration. Try making a video showing the compilation process. Or send screenshots.
But I'm sending you the complete code for you to import into your OMNet++.
Before this code the code was running i hope whole project will be good to go.
On Fri, 29 Sep 2023 at 4:35 PM, dnatividade @.***> wrote:
https://github.com/dnatividade/VEINS-tutorials/assets/43869367/30676a35-ed78-45aa-8279-2b8e1d3ebfae
In this case I don't know what it could be. You can try searching StackOverflow about this error. I needed to see your environment, as it may have some invalid configuration. Try making a video showing the compilation process. Or send screenshots.
But I'm sending you the complete code for you to import into your OMNet++.
veins-complete_2023-09-28.zip https://github.com/dnatividade/VEINS-tutorials/files/12764494/veins-complete_2023-09-28.zip
— Reply to this email directly, view it on GitHub https://github.com/dnatividade/VEINS-tutorials/issues/3#issuecomment-1740714074, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3HCZQMIY6GT5G4F5XADXWLX42TN5ANCNFSM6AAAAAA4J4YZBQ . You are receiving this because you authored the thread.Message ID: @.***>
Did you try the full code I sent you?
Send me your full old code.
while running your code im still getting these errors..
.tmplib6632(CRC.o): In function CRC::hashCRCMsg(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': C:\Users\Dell\Downloads\veins\veins\src/veins/modules/application/traci/CRC.cc:9: undefined reference to
crc32'
C:\Users\Dell\Downloads\veins\veins\src/veins/modules/application/traci/CRC.cc:11: undefined reference to `crc32'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: [Makefile:265: ../out/clang-debug/src/libveins_dbg.dll] Error 1
make[1]: Leaving directory '/c/Users/Dell/Downloads/veins/veins/src'
make: [Makefile:36: all] Error 2
"make MODE=debug -j4 all" terminated with exit code 2. Build might be incomplete.
did zlib libarary needs any other configuration..
i am not able to find the solution of of this error which version of omnet veins and sumo you are using.
zlibb needs to be declared in CRC.h:
//App: @dnat
#pragma once
#include "veins/modules/application/ieee80211p/DemoBaseApplLayer.h"
#include "veins/modules/application/traci/defines.h" //header with all necessary defines
#include <zlib.h>
/**
* CRC Demo
*/
class CRC {
public:
unsigned long hashCRCMsg(int carAddress, std::string dataWsm);
};
CRC.cc:
//App: @dnat
#include <veins/modules/application/traci/CRC.h>
unsigned long CRC::hashCRCMsg(int carAddress, std::string dataWsm){
//https://stackoverflow.com/a/25018742
unsigned long crc = crc32(0L, Z_NULL, 0);
std::string allWsmFields = std::to_string(carAddress) + dataWsm;
crc = crc32(crc, (const unsigned char*)allWsmFields.c_str(), strlen(allWsmFields.c_str()));
return crc;
}
Hi. I tested this code on Windows and got the same error as you. I'll find out what the problem is and let you know...
You need to add zlib library in the linker options.
Project -> Properties -> OMNeT++ -> Makemake -> src: ... -> Options -> Link -> Add: z
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.