intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
431 stars 239 forks source link

Is it possible to automate sending data from sumo vehicles to RSUs in Mininet-WiFi ? #484

Closed 14vv1A0516 closed 1 year ago

14vv1A0516 commented 1 year ago

Hi Sir,

I implement and map sumo scenario in Mininet-WiFi with vehicles and RSUs. I want to write an authentication protocol i.e., RSU authenticates vehicles when they come into transmission range or coverage area of RSU.

The auth protocol involve vehicle sending data(a few parameters like ID, password etc) to RSU and gets auth session token from RSU. This should work for all the vehicles automatically running in the scenario. Is it possible to simulate this in Mininet-WiFi ?

Thank you.

ramonfontes commented 1 year ago

Is it possible to simulate this in Mininet-WiFi

Why not? Write your code and go ahead.

Sent from my android

On Fri, 17 Feb 2023, 03:13 Mani Varma, @.***> wrote:

Hi Sir,

I implement and map sumo scenario in Mininet-WiFi with vehicles and RSUs. I want to write an authentication protocol i.e., RSU authenticates vehicles when they come into transmission range or coverage area of RSU.

The auth protocol involve vehicle sending data(a few parameters like ID, password etc) to RSU and gets auth session token from RSU. This should work for all the vehicles automatically running in the scenario. Is it possible to simulate this in Mininet-WiFi ?

Thank you.

— Reply to this email directly, view it on GitHub https://github.com/intrig-unicamp/mininet-wifi/issues/484, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABE6M6XU5VR4FOY4KKV4EN3WX4JI3ANCNFSM6AAAAAAU7BKRBA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

14vv1A0516 commented 1 year ago

How do I send user-defined data ? After building net with 2 stations, 1 RSU controlled by Ryu controller, I tried to use sta1.cmd('curl -X POST -d '{"address":"wefwfwef"}' http://10.13.2.193:8080/simpleswitch/hai/0000000000000001') this. But it doesn't work.

My use-case is as and when a mobile station enters the transmission range of an RSU, it should send some information to controller using some function call. How to do this ?

I tried with os.system () call also but it haven't worked.

ramonfontes commented 1 year ago

Try makeTerm() instead.

14vv1A0516 commented 1 year ago

Thank you Sir,

A statement like this works makeTerm(sta1, cmd = "bash -c 'curl -X PUT -d '{'My_ID':'13242', 'password':'m2386Ff#@'}' http://10.13.2.193:8080/simpleswitch/hai/0000000000000001;'") . The station is basically sending message to controller. How do I capture the response in sta1 from controller ? Suppose, I have a some python file which needs to be run in sta1. When I run it using makeTerm(sta1, cmd = "bash -c 'sudo python3 veh_sdnc.py ;'"), the xterm suddenly pops up and disappears. How to make it remain to see logs in it ?