Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OdinMaster module has to be initiated #3

Open
wants to merge 1 commit into
base: odin
Choose a base branch
from
Open

OdinMaster module has to be initiated #3

wants to merge 1 commit into from

Conversation

josemariasaldana
Copy link

No description provided.

@benboy-han
Copy link

Dear josemariasaldana:
I try to write a shell script in openwrt of the AP, and the build_odinagent.sh is what i write with your website,the other one-build_vswitch-xx.sh is from other .If i do not add the interface wlan0 to th br0,the client can not connect to the AP,and it always in the state:the client is obtainning an IP address.How do you do this?Can you give me some help?thanks in advance

/The content of build_odinagent.sh/
#!/bin/sh
#prepare work
#make sure ap enable openvswitch in firmware
#make sure ap install click moudle in firmware

/create monitor mon0/
ifconfig wlan0 down
iw phy phy0 interface add mon0 type monitor
iw dev wlan0 set channel 6
ifconfig mon0 up
ifconfig wlan0 up

/* instantiate fake ap*/
echo "click start begin..."
click-align agent.click | click &
sleep 5
echo "click start end..."
ifconfig ap up

/make sure your ap openvswitch is start.if not,start manully/
echo "openvswitch start..."
/etc/init.d/openvswitch start
echo "openvswicht end..."

/* instantiate OpenvSwitch*/
ovs-vsctl add-br br0
ifconfig br0 10.0.0.6 netmask 255.255.255.0 up
ovs-vsctl set-controller br0 tcp:10.0.0.22:6633 protocols=OpenFlow13
ovs-dpctl add-dp dp0
ovs-dpctl add-if dp0 ap

#vbridge stat(br0)
echo "------ovs-vsctl show--------------"
ovs-vsctl show

#vbridge iface stat
echo "------ovs-ofctl show br0--------------"
ovs-ofctl show br0

#vbridge flow stat(not include hidden flows)
echo "------ovs-ofctl dump-flows br0--------------"
ovs-ofctl dump-flows br0

/The content of build_vswitch-xx.sh/
#!/bin/sh

#prepare work
#make sure ap enable openvswitch in firmware
#make sure ap install click moudle in firmware

#option set args.not use yet!
channel=$1
ip=$2

#make sure your ap openvswitch is start
#if not,start manully
echo "openvswitch start..."
/etc/init.d/openvswitch start
echo "openvswicht end..."

#clean env
ovs-vsctl del-br br-lan

#delete wlan route(may be ap not exit)
#route del -net 192.168.48.0 netmask 255.255.255.0 dev eth0.2
#delete old bridge
brctl delif br-lan eth0.1
ifconfig br-lan down
brctl delbr br-lan

#add bridge in-br connect eth0.1 and ap
brctl addbr in-br

#add vswitch bridge,and set config
ovs-vsctl add-br br-lan
ovs-vsctl add-port br-lan eth0.2
ifconfig eth0.2 0.0.0.0
ifconfig br-lan 10.0.0.6 netmask 255.255.255.0 up
route add default gw 10.0.0.1 br-lan
#ovs-vsctl set bridge br-lan protocols=OpenFlow13
#master is 86
ovs-vsctl set-controller br-lan tcp:10.0.0.16:6653 protocols=OpenFlow13
#master is 188
#ovs-vsctl set-controller br-lan tcp:192.168.48.188:6633

#start fake ap
iw phy phy0 interface add mon0 type monitor
iw dev wlan0 set channel 1
ifconfig mon0 up
echo "click start begin..."
click-align agent.click | click &
sleep 5
echo "click start end..."
ifconfig ap up
ifconfig mon0 mtu 1600

brctl addif in-br ap
brctl addif in-br eth0.1
ifconfig in-br up

ovs-vsctl add-port br-lan in-br

#set flow rules on vswitch,make sure switch can ping controller
#ovs-ofctl add-flow br-lan "priority=1 ,in_port=LOCAL, actions=output:1"
#ovs-ofctl add-flow br-lan "priority=1 ,in_port=1, actions=output:LOCAL"

sleep 2
#vbridge stat(br-lan)
echo "------ovs-vsctl show--------------"
ovs-vsctl show

#vbridge iface stat(must have ap eth0.1 br-lan)
echo "------ovs-ofctl show br-lan--------------"
ovs-ofctl show br-lan

#vbridge flow stat(not include hidden flows)
echo "------ovs-ofctl dump-flows br-lan--------------"
ovs-ofctl dump-flows br-lan

@benboy-han
Copy link

Dear josemariasaldana:
In odin project,i have some question.in click file, AP_UNIQUE_IP_WITH_MASK = "172.17.2.53/24",the client is 172.17.2.51 e8:39:df:4c:7c:e3,so the AP and the client are in some subnet,the ip of them are assignd by the same device of high layer.But in the poolfile,ip of the APs is follow:172.17.1.13 172.17.1.21 172.17.1.29,the clients are : 172.17.4.2,172.17.4.3,172.17.4.4.so i can not understand the architecture of the network.cam you share your way to make a net which consists by some AP?And i have another question,in odin ,the access point is wireless hub(AP) or wireless router?Thanks in advance

@benboy-han
Copy link

Dear josemariasaldana:
when the odin-agent connected to the odin-master,what can prove the connection happened?I met some problem,can you give me some help?Thanks in advance

@josemariasaldana
Copy link
Author

We are running another version of the Click module odinagent.cc from https://github.com/fgg89/odin-agent/tree/fran-devel/src. It presents a lot of debug information. Substitute it and re-compile. You will see a lot of info.

@benboy-han
Copy link

dear josemariasaldana:
Thank you !I have complete the work that the can connect to the master,but ,i met a new problem,the client can see the WiFi SSID,but it can not connect to the network!I am trying to solve this problem.Do you have some suggestions to me ?Thanks in advance

@benboy-han
Copy link

dear josemariasaldana:
Today, i have see one's web,he thought that the code of patch for ath9k is not complete.
https://github.com/lalithsuresh/odin-driver-patches/issues
so, Do you hava paied attention to this?How do you think?Thanks in advance

@josemariasaldana
Copy link
Author

Hi,

I applied the patch manually. In addition to the two modifications specified in the patch, I also had to add this code just after the #include section (the definition of ath9k_debugfs_open was missing):

static int ath9k_debugfs_open(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
return 0;
}

@benboy-han
Copy link

dear josemariasaldana:
I need your help ! The agent can connect to the Master, and it print the message:"ping message from:XXX", and Master executing failure check against:XXXX. But the client can scan the WiFi signal, it can't associate to the network? I try to resolve this problem, but i failed.I write a script in the agent to startup the system, mybe it was wrong.the script is as follow:
/The content of build_odinagent.sh/
#!/bin/sh
#prepare work
#make sure ap enable openvswitch in firmware
#make sure ap install click moudle in firmware

/create monitor mon0/
ifconfig wlan0 down
iw phy phy0 interface add mon0 type monitor
iw dev wlan0 set channel 6
ifconfig mon0 up
ifconfig wlan0 up

/* instantiate fake ap*/
echo "click start begin..."
click-align agent.click | click &
sleep 5
echo "click start end..."
ifconfig ap up

/make sure your ap openvswitch is start.if not,start manully/
echo "openvswitch start..."
/etc/init.d/openvswitch start
echo "openvswicht end..."

/* instantiate OpenvSwitch*/
ovs-vsctl add-br br0
ifconfig br0 192.168.1.181 netmask 255.255.255.0 up
ovs-vsctl set-controller br0 tcp:192.168.1.221:6633 protocols=OpenFlow13
ovs-dpctl add-dp dp0
ovs-dpctl add-if dp0 ap

#vbridge stat(br0)
echo "------ovs-vsctl show--------------"
ovs-vsctl show

#vbridge iface stat
echo "------ovs-ofctl show br0--------------"
ovs-ofctl show br0

#vbridge flow stat(not include hidden flows)
echo "------ovs-ofctl dump-flows br0--------------"
ovs-ofctl dump-flows br0

And i have see your webpage about odin, is the setup of running openvswitch just only 5 command lines?If not ,can you share me some detail setup about how to do it?I need help from you! Thank in advance.

schuza pushed a commit to schuza/odin-master that referenced this pull request Jun 4, 2015
schuza pushed a commit to schuza/odin-master that referenced this pull request Jun 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants