asmanuha / LoRaWAN

1 stars 0 forks source link

LoraWan Code #1

Open yacoubhanna opened 2 years ago

yacoubhanna commented 2 years ago

Hello @asmanuha, Sorry to bother you again. I just want to know if you can upload the modified codes here. I would really appreciate your help.

Thank you so much.

asmanuha commented 2 years ago

Class C LoRaWAN Modification - compiled by asmanuha.pdf

Hi @yacoubhanna sure, here I try to attach the modification file

What I do is modify some files (include adding the example in the first step):

A. In folder "lorawan/examples/"

B. In folder "lorawan/helper"

  1. File lorawan/helper/lorawan-mac-helper.h Reference --> https://github.com/QiuYukang/lorawan/blob/a8a6cf64de262a2d6af6d1b623807bbbc970e4d2/helper/lorawan-mac-helper.h

  2. File "lorawan/helper/lorawan-mac-helper.cc" Reference --> https://github.com/QiuYukang/lorawan/blob/a8a6cf64de262a2d6af6d1b623807bbbc970e4d2/helper/lorawan-mac-helper.cc

C. In folder "lorawan/model/"

  1. Create file lorawan/model/class-c-end-device-lorawan-mac.h Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/class-c-end-device-lorawan-mac.h

  2. Create file lorawan/model/class-c-end-device-lorawan-mac.cc Refrence --> https://github.com/QiuYukang/lorawan/blob/class-c/model/class-c-end-device-lorawan-mac.cc 2a. (the next step - (step no 2.a) is add 2 line of code in file "lorawan/wscript"

  3. disable "private" in line 434 file lorawan/model/end-device-lorawan-mac.h Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/end-device-lorawan-mac.h

  4. add a line of code in line no. 548 file " lorawan/model/end-device-lorawan-mac.cc" Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/end-device-lorawan-mac.cc

  5. Changes the code in File "lorawan/model/end-device-status.h" Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/end-device-status.h

  6. Change the code in file "lorawan/model/end-device-status.cc " Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/end-device-status.cc

  7. Add code in line no 62-65, file "lorawan/model/network-scheduler.h " Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/network-scheduler.h

  8. add code from line 134 to 180 lorawan/model/network-scheduler.cc Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/network-scheduler.cc

  9. Add code in line 100-105 file lorawan/model/network-server.h Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/network-server.h

  10. Changes the code in file "lorawan/model/network-server.cc" Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/network-server.cc

  11. Change code in file "lorawan/model/network-status.h " Reference --> https://github.com/QiuYukang/lorawan/blob/class-c/model/network-status.h

  12. Change file " lorawan/model/network-status.cc" Reference ---> https://github.com/QiuYukang/lorawan/blob/class-c/model/network-status.cc

  13. Add codes line 129 to 132 file "lorawan/model/lora-device-address.h" Reference --> https://github.com/QiuYukang/lorawan/blob/a8a6cf64de262a2d6af6d1b623807bbbc970e4d2/model/lora-device-address.h

  14. add codes 165 to 169 file " lorawan/model/lora-device-address.cc" Reference --> https://github.com/QiuYukang/lorawan/blob/a8a6cf64de262a2d6af6d1b623807bbbc970e4d2/model/lora-device-address.cc#L166

**Then do RUN the program ./waf configure ./waf

I put the detail in an attached PDF.**

yacoubhanna commented 2 years ago

Hello, @asmanuha I really appreciate it. Thank you

yacoubhanna commented 2 years ago

Hello @asmanuha,

When the end devices send a packet to the Network Server through the LoRaWan gateway. Does it receive it to the MAC Layer or go all the way up to the Application layer?

Also, I was trying to set up 3 end devices. The first 2 end devices will send a packet to the network server and then the network server will send a packet to the third end device. However, when I install the application on the end devices using (OneShotSenderHelper). The 3 end devices send packets to the network server then the network server sends to the third end device. Is it possible to install the application on the third end device just to receive data not to send? like, install the application on the third end device without the OneShotSenderHelper. I tried to install it only on the first two but I was getting an error.

Thank you.

Junaid-Qadir-UniGe commented 1 year ago

@asmanuha Hi Asma, I read your comment on https://gitter.im/ns-3-lorawan/Lobby, where I noticed that you are working on LoRaWAN security. Surprisingly, I am also working on exactly the same topic, and I would really appreciate it if you could respond to this request.

Thanks Best, Junaid