Wiviz

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 22:17, 16 January 2006 (edit)
Togo (Talk | contribs)
(Installation)
← Previous diff
Current revision (06:29, 1 May 2010) (edit) (undo)
Glenn (Talk | contribs)
(catspec)
 
(44 intermediate revisions not shown.)
Line 1: Line 1:
-== What is Wiviz? ==+Wiviz, an open source GPL project, allows you to use your WRT to see other networks. Using a dynamic Javascript-based interface it scans for networks and then shows signal strength and effects of antenna adjustment in real time.
-For those interested in using a WRT54G to access public networks, imagine a dynamic Javascript-based interface, to scan for networks and see signal strength and effects of antenna adjustment in real time! Wiviz is the Open Source project under GNU GPL that does just this. +The second generation [http://devices.natetrue.com/wiviz2/wiviz2.html wiviz2] has recently been released! This version fixes the previous difficulty to accommodate all icons on the screen by continuously moving all detected stations on a trajectory around the receiving station.
-Visit http://students.washington.edu/natetrue/wiviz/ for the projects home page!+
-What would be nice to eventually see is a point and click option to configure the link up to a selected network.+<div style="text-align: center; margin: 1em 10%; background: #80f082; border: #008000 1px solid;">
 +[http://www.dd-wrt.com/phpBB2/viewtopic.php?t=9122&highlight=&sid=d9f02422230a4b337a0d476231c9e910]
 +DD-WRT mini and full releases starting from V23SP3 come with Wiviz2 preinstalled! [http://svn.dd-wrt.com:8000/dd-wrt/browser/src/router/wiviz2?rev=5158]
 +Other installable package for example for Wifi enabled PDA are apparently not available yet!</div>
-== Wiviz on DD-WRT ==+=Installation of Wiviz (v1)=
 +<div style="text-align: center; margin: 1em 10%; background: #fa8072; border: #8b0000 1px solid;">The latest version of DD-WRT (23 sp2 mini) does not seem work with Wiwiz! There seems to be a change in the web interface to the [[WL]] tool. Please see the relevant discussion on the [[:{{NAMESPACE}} talk:{{PAGENAME}}|talk page]] for further details. Desweitern scheint die Seite im Firefox 2.0.0.1 nicht richtig zu funktionieren !</div>
 +Thanks to Lament who has ported Wiviz to DD-WRT!
 +# Enable jffs2, and clean jffs2 (administration tab -> management in the control interface)
 +# Use [http://www.dd-wrt.com/wiki/index.php/Telnet/SSH_and_the_Command_Line telnet or SSH] (if enabled) to log in as root on the router.
 +#Next type the following commands (in bold).
 +## '''cd /jffs/''' ''This puts us in the jffs directory from root directory''
 +##'''wget <nowiki>http://lament.rutka.net/wiviz-jffs.tar.gz</nowiki>''' ''This downloads the permanent (ie, stored in jffs file structure) program''
 +##'''tar -xvzf wiviz-jffs.tar.gz''' ''This extracts files''
 +##'''ln -s /jffs/www /tmp/''' ''This makes the symlink. Please note that there are 3 spaces in this line''
 +##*If the symbolic link already exists the command ''' ln -s /jffs/www /tmp/ ''' '' will fail and you will first have to use : ''' rm -r /tmp/www ''' and then ''' ln -s /jffs/www /tmp/ '''
-Thanks to User Lament who has ported Wiviz to DD-WRT! [http://forum.bsr-clan.de/viewtopic.php?p=26257 See Forum Post].+That should allow your browser to see the wiviz page at
-== Installation==+http://192.168.1.1/user/wiviz/wiviz.html or <nowiki>http://routerip/user/wiviz/wiviz.html</nowiki>
 +Finally clean up by typing
-First enable jffs2, and clean jffs2, found under the administration tab/management tab of the web DD-WRT Control Interface, if you have not done so already.+'''rm wiviz-jffs.tar.gz''' ''This will remove the downloaded compressed file''
-Use telnet or SSH (if enabled) to log in as root on the router. If using Windows XP, you can type 'telnet' from a run command, and use the command 'open 192.168.1.1' (assuming your router ip is 192.168.1.1), to gain access to the router. Type 'root' as username, and your router password, as the password. 
-Next type the following commands (in bold).+'''USING A SAMBA SHARE INSTEAD OF JFFS''' If you lack the space necessary to install on JFFS (Using a large installation on a WRT54G is the usual reason) you can simulate JFFS using a network share. See [http://wrt-wiki.bsr-clan.de/index.php?title=Jffs#jffs_on_WRT54G jffs on WRT54G].
-'''cd /jffs/''' ''This puts us in the jffs directory from root directory'' 
-'''wget <nowiki>http://lament.rutka.net/wiviz-jffs.tar.gz</nowiki>''' ''This downloads the permanent (ie, stored in jffs file structure) program'' +You will need to create a subdirectory /jffs/etc/ if it doesn't already exist.
-'''tar -xvzf wiviz-jffs.tar.gz''' ''This extracts files'' +'''ls /jffs/''' ''List the jffs/ directory to see if etc/ exists.''
-'''ln -s /jffs/www /tmp/''' ''This makes the symlink. Please note that there are 3 spaces in this line'' +If not, then '''mkdir /jffs/etc''' ''Makes the new subdirectory etc/''
-<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0 1em 1em 1em; background-color:#FFE0E0; align:right;">+
-Note: This command may have to be reaplied after every powercycle! (please publish the method to make this command resilient)+
-<div style="margin: 0; border: 0px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#FFFFFF; align:left;">+
-That should allow your browser to see the wiviz page at +'''mkdir /jffs/etc/config''' ''Creates a new subdirectory to /jffs/etc/ of config/''
 +'''echo "rm -r /tmp/www" > /jffs/etc/config/wi-viz.startup''' ''Creates startup file with first line''
 +'''echo "ln -s /jffs/www /tmp/" >> /jffs/etc/config/wi-viz.startup''' ''Appends second line''
 +'''chmod 700 /jffs/etc/config/wi-viz.startup''' ''Sets file permissions''
-http://192.168.1.1/user/wiviz/wiviz.html+<div style="margin: 1em 10%; border: 1px solid #dfdfdf; background-color:#FFE0E0">
-or <nowiki>http://routerip/user/wiviz/wiviz.html</nowiki>+
- +
-Finally clean up by typing+
- +
-'''rm wiviz-jffs.tar.gz''' ''This will remove the downloaded compressed file''+
-<div style="margin: 0; margin-right:10px; border: 1px solid #dfdfdf; padding: 0 1em 1em 1em; background-color:#FFE0E0; align:right;">+
-Note: The wiviz page only displays output - the input settings do not function with DD-WRT.+
In order to get around not being able to change to channel hopping, you can manually create a wiviz config file. In order to get around not being able to change to channel hopping, you can manually create a wiviz config file.
Line 45: Line 49:
channelsel = Either the word "hop" or the channel number to monitor. The default is to monitor the channel already in use by the card. channelsel = Either the word "hop" or the channel number to monitor. The default is to monitor the channel already in use by the card.
- 
hopseq = A comma seperated list of channels to hop through in the order of your choice. hopseq = A comma seperated list of channels to hop through in the order of your choice.
-'''Remember: Channel hopping does NOT work when in AP mode.'''+'''Note:''' ''The wiviz page only displays output - the input settings do not function with DD-WRT.''<br>
-<div style="margin: 0; border: 0px solid #dfdfdf; padding: 0em 1em 1em 1em; background-color:#FFFFFF; align:left;">+'''Note:''' ''Channel hopping does NOT work when in AP mode.''
 +</div>
 + 
 +==Wishlist==
 +* Integrate Wiviz by means of links into the routers HTTP system
 +* Graphical signal strength and noise plot function
 +* List stations mode with their signal strength graph on the side (to allow to identifiy directions when scanning using directional antennae)
 +* Automate antenna comparison by using the firmware antenna selector function
 +* IPs be extracted from the packets?
 + 
 +==Minor GUI Fix==
 + 
 +* Network icons drift out of the screen and everything shifts out of sight:
 +-> Solution: Replace the declump function in wiviz.js Java Script with this:
 + function declump() {
 + var c = 0;
 + var top = 150,bottom = -350,left = 550,right = -550;
 + for (i = 0; i < hosts.length; i++) {
 + for (j = 0; j < hosts.length; j++) {
 + if (i == j) continue;
 + e1 = document.getElementById(hosts[i].mnem);
 + e2 = document.getElementById(hosts[j].mnem);
 + if (!e1 || !e2) continue;
 + x1 = parseInt(e1.style.left);
 + x2 = parseInt(e2.style.left);
 + y1 = parseInt(e1.style.top);
 + y2 = parseInt(e2.style.top);
 + ox = x2;
 + oy = y2;
 + if (x2 > left) x2 = left;
 + if (x2 < right) x2 = right;
 + if (y2 > top) y2 = top;
 + if (y2 < bottom) y2 = bottom;
 + dist = Math.sqrt(Math.pow((x1-x2), 2) + Math.pow((y1-y2), 2));
 + if (dist == 0) {
 + x2 += Math.random() * 5;
 + y2 += Math.random() * 5;
 + dist = 10;
 + }
 + if (dist < 100) {
 + cx = (x1-x2) * 5 / (dist / 3);
 + cy = (y1-y2) * 5 / (dist / 3);
 + x2 -= cx;
 + y2 -= cy;
 + }
 + if (hosts[j].apmnem == hosts[i].mnem
 + || hosts[i].apmnem == hosts[j].mnem) {
 + if (dist > 150) {
 + cx = (x1-x2) * 5 / (dist / 3);
 + cy = (y1-y2) * 5 / (dist / 3);
 + x2 += cx;
 + y2 += cy;
 + }
 + }
 + if (Math.abs(ox-x2) > 2 || Math.abs(oy-y2) > 2) {
 + e2.style.left = parseInt(x2);
 + e2.style.top = parseInt(y2);
 + c++;
 + }
 + }
 + }
 + 
 +=Wiviz under DD-WRT v24 final=
 +Status -> Wireless -> Wiviz Survey button
 + 
 +'''Windows:'''<br>
 +Firefox 3.0.1 - 3 on Windows properly displays the Wiviz layout.
 + 
 +'''Linux:'''<br>
 +''However'', Firefox 3.0.1 - 3 on Linux do not properly display the layout (freezing behavior).<br>
 +Other Mozilla-based browsers do display the layout properly: SeaMonkey, Galeon, Epiphany.
 + 
 +Konqueror does properly interpret the Wiviz layout and other portions of the whole WebGUI.
 + 
 +=Wiviz under DD-WRT V24 SP1=
 + 
 +You can find Wiviz under Status -> Wireless -> Wiviz survey.
 +Alternative you can go to http://192.168.1.1/Wiviz_Survey.asp
 + 
 +'''*Note*''': Only Internet Explorer shows wiviz correctly
 +(Tested with: Internet Explorer 8 Beta 1, Firefox 3.0.1 (fail) and Opera 9.52 (fail))
 + 
 +=External Links=
 +http://devices.natetrue.com/wiviz/ Wiviz Official Site<br>
 +http://forum.bsr-clan.de/viewtopic.php?p=26257 See Forum Post
 + 
 +[[Category:Monitoring]]
 +[[Category:Wlan]]
 +[[Category:Advanced tutorials]]

Current revision

Wiviz, an open source GPL project, allows you to use your WRT to see other networks. Using a dynamic Javascript-based interface it scans for networks and then shows signal strength and effects of antenna adjustment in real time. The second generation wiviz2 has recently been released! This version fixes the previous difficulty to accommodate all icons on the screen by continuously moving all detected stations on a trajectory around the receiving station.

[1] DD-WRT mini and full releases starting from V23SP3 come with Wiviz2 preinstalled! [2]

Other installable package for example for Wifi enabled PDA are apparently not available yet!

Contents

[edit] Installation of Wiviz (v1)

The latest version of DD-WRT (23 sp2 mini) does not seem work with Wiwiz! There seems to be a change in the web interface to the WL tool. Please see the relevant discussion on the talk page for further details. Desweitern scheint die Seite im Firefox 2.0.0.1 nicht richtig zu funktionieren !

Thanks to Lament who has ported Wiviz to DD-WRT!

  1. Enable jffs2, and clean jffs2 (administration tab -> management in the control interface)
  2. Use telnet or SSH (if enabled) to log in as root on the router.
  3. Next type the following commands (in bold).
    1. cd /jffs/ This puts us in the jffs directory from root directory
    2. wget http://lament.rutka.net/wiviz-jffs.tar.gz This downloads the permanent (ie, stored in jffs file structure) program
    3. tar -xvzf wiviz-jffs.tar.gz This extracts files
    4. ln -s /jffs/www /tmp/ This makes the symlink. Please note that there are 3 spaces in this line
      • If the symbolic link already exists the command ln -s /jffs/www /tmp/ will fail and you will first have to use : rm -r /tmp/www and then ln -s /jffs/www /tmp/

That should allow your browser to see the wiviz page at

http://192.168.1.1/user/wiviz/wiviz.html or http://routerip/user/wiviz/wiviz.html

Finally clean up by typing

rm wiviz-jffs.tar.gz This will remove the downloaded compressed file


USING A SAMBA SHARE INSTEAD OF JFFS If you lack the space necessary to install on JFFS (Using a large installation on a WRT54G is the usual reason) you can simulate JFFS using a network share. See jffs on WRT54G.


You will need to create a subdirectory /jffs/etc/ if it doesn't already exist.

ls /jffs/ List the jffs/ directory to see if etc/ exists.

If not, then mkdir /jffs/etc Makes the new subdirectory etc/

mkdir /jffs/etc/config Creates a new subdirectory to /jffs/etc/ of config/ echo "rm -r /tmp/www" > /jffs/etc/config/wi-viz.startup Creates startup file with first line echo "ln -s /jffs/www /tmp/" >> /jffs/etc/config/wi-viz.startup Appends second line chmod 700 /jffs/etc/config/wi-viz.startup Sets file permissions

In order to get around not being able to change to channel hopping, you can manually create a wiviz config file.

echo "channelsel=hop&hopseq=1,6,11" > /tmp/wiviz-cfg

channelsel = Either the word "hop" or the channel number to monitor. The default is to monitor the channel already in use by the card. hopseq = A comma seperated list of channels to hop through in the order of your choice.

Note: The wiviz page only displays output - the input settings do not function with DD-WRT.
Note: Channel hopping does NOT work when in AP mode.

[edit] Wishlist

  • Integrate Wiviz by means of links into the routers HTTP system
  • Graphical signal strength and noise plot function
  • List stations mode with their signal strength graph on the side (to allow to identifiy directions when scanning using directional antennae)
  • Automate antenna comparison by using the firmware antenna selector function
  • IPs be extracted from the packets?

[edit] Minor GUI Fix

  • Network icons drift out of the screen and everything shifts out of sight:

-> Solution: Replace the declump function in wiviz.js Java Script with this:

function declump() {
	var c = 0;
	var top = 150,bottom = -350,left = 550,right = -550;
	for (i = 0; i < hosts.length; i++) {
 	  for (j = 0; j < hosts.length; j++) {
	    if (i == j) continue;
			e1 = document.getElementById(hosts[i].mnem);
			e2 = document.getElementById(hosts[j].mnem);
			if (!e1 || !e2) continue;
			x1 = parseInt(e1.style.left);
			x2 = parseInt(e2.style.left);
			y1 = parseInt(e1.style.top);
			y2 = parseInt(e2.style.top);
			ox = x2;
			oy = y2;
			if (x2 > left) x2 = left;
			if (x2 < right) x2 = right;
			if (y2 > top) y2 = top;
			if (y2 < bottom) y2 = bottom;
			dist = Math.sqrt(Math.pow((x1-x2), 2) + Math.pow((y1-y2), 2));
			if (dist == 0) {
				x2 += Math.random() * 5;
				y2 += Math.random() * 5;
				dist = 10;
				}
			if (dist < 100) {
				cx = (x1-x2) * 5 / (dist / 3);
				cy = (y1-y2) * 5 / (dist / 3);
				x2 -= cx;
				y2 -= cy;
				}
			if (hosts[j].apmnem == hosts[i].mnem
					|| hosts[i].apmnem == hosts[j].mnem) {
			 	if (dist > 150) {
				  cx = (x1-x2) * 5 / (dist / 3);
			  	  cy = (y1-y2) * 5 / (dist / 3);
				  x2 += cx;
				  y2 += cy;
				}
			}
			if (Math.abs(ox-x2) > 2 || Math.abs(oy-y2) > 2) {
				e2.style.left = parseInt(x2);
				e2.style.top = parseInt(y2);
				c++;
			}
	  }
	}

[edit] Wiviz under DD-WRT v24 final

Status -> Wireless -> Wiviz Survey button

Windows:
Firefox 3.0.1 - 3 on Windows properly displays the Wiviz layout.

Linux:
However, Firefox 3.0.1 - 3 on Linux do not properly display the layout (freezing behavior).
Other Mozilla-based browsers do display the layout properly: SeaMonkey, Galeon, Epiphany.

Konqueror does properly interpret the Wiviz layout and other portions of the whole WebGUI.

[edit] Wiviz under DD-WRT V24 SP1

You can find Wiviz under Status -> Wireless -> Wiviz survey. Alternative you can go to http://192.168.1.1/Wiviz_Survey.asp

*Note*: Only Internet Explorer shows wiviz correctly (Tested with: Internet Explorer 8 Beta 1, Firefox 3.0.1 (fail) and Opera 9.52 (fail))

[edit] External Links

http://devices.natetrue.com/wiviz/ Wiviz Official Site
http://forum.bsr-clan.de/viewtopic.php?p=26257 See Forum Post