Wi5 / odin-wi5

Odin framework: Patches + Wiki (Instructions)
8 stars 17 forks source link

Virtualize odin agent without virtual box #50

Closed uhlik1889 closed 5 years ago

uhlik1889 commented 5 years ago

Hi, I am trying to accommodate the Odin framework inside the Mininet-Wifi. Not sure if you are familiar with the concept of Mininet, but it uses Linux 802.11 SoftMAC wireless drivers and mac80211_hwsim wireless simulation drivers in its access points. Those access points, are handled by virtual hosts using hostapd. At first, I wanted to run the Odin agent, on the virtual hosts, that Mininet are creating, but appears there is some problem mounting the agent.click file.

" While configuraing 'odinagent' :: OdinAgent': DEBUGFS: required argument missing Router could not be initialized! "

Lalith told me, that I need to run OpenWRT and patch it for ath9k driver, in order to fix this. Using Virtual Box with OpenWRT is the last option, on my list. Now I need to somehow get this to work on internal virtual hosts. I understand that this situation is not easy, but I am looking for any solution, that wouldn't be too invasive, to get this to work.

Mininet is creating individual virtual hosts, in the PC, so when they exist, the interfaces are virtual, but they appear in the list, using "iwconfig". The connection between hosts and Mininet, is handled via those interfaces, so there is no complicated Linux socket type forwarding.

So far I am running into more problems, than solutions . If you have any idea, how to get around that problem up top, I would appreciate it. It's for my diploma thesis.

If anyone can send me detailed description how that patch works, and how did you find out, what that ath9k driver needed, that would be amazing. Maybe than I could look into the driver, that's simulating Mininet, and could write a patch for it as well, but looking at the implementation wiki, it says that the compatibility is so far only for ath9k driver, so will see.

josemariasaldana commented 5 years ago

Hi, you have to check if you are correctly passing the arguments of odinagent.

In this line https://github.com/Wi5/odin-wi5-agent/blob/master/agent-click-file-gen.py#L108 the .cli script calls the odinagent.cc element. And the arguments must fit.

One of the arguments is the place where debug information of the ath9k driver is placed. /sys/kernel/debug/ieee80211/phy0/ath9k/bssid_extra

uhlik1889 commented 5 years ago

I am passing arguments like Lalith stated: " Generate a Click file for the agent, using your preferred values for the options:

$: python agent-click-file-gen.py \

> agent.click " I am doing something wrong? Because I don't think so, that I have any ath9k folder inside debug, because I don't have physical atheros card, I need to virtualize this somehow. /sys/kernel/debug/ieee80211/phy0# ls fragmentation_threshold netdev:p2p-dev-wlp3s0 rts_threshold ht40allow_map netdev:wlp3s0 short_retry_limit hwflags power statistics iwlwifi queues total_ps_buffered keys rc user_power long_retry_limit reset wep_iv Any ideas how to install this driver and get it to work with mac80211_hwsim? Few days later: I fixed the problem with DEBUGFS, it was like josemariasaldana said. I had few arguments there. Now the problem is different. It says i don't have input 2 and output 4. Any ideas?