[Firebug-cvs] firebug/web mh_readme.html,NONE,1.1 admin.html,1.11,1.12
Brought to you by:
doolin
From: <che...@us...> - 2003-12-19 23:46:33
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1:/tmp/cvs-serv4833 Modified Files: admin.html Added Files: mh_readme.html Log Message: document on the mh setup --- NEW FILE: mh_readme.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link type="text/css" rel="stylesheet" href="firebug.css"> <link rel="SHORTCUT ICON" href="./images/favicon.ico"> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>mh_readme</title> </head> <body> <h1>How to make Firebug work</h1> <ul> The followings are required to install before the firebug can run. <li> PHP,Apache, Mysql on your PC, reference on how to set these up is <a href="admin.html"> here </a></li> <li> Blast Routing Stack</li> <li> CollectData application for the Mote/BaseStation.</li> <li> Sensorboard driver for GPS sensorboard mts400.(optional, no need for dummy packet application for motes)</li> </ul> <h2>Blast</h2> <ul> <li> You can get a blast stack software from <a href="http://www.ocf.berkeley.edu/%7Etmtong/tinyos/">http://www.ocf.berkeley.edu/~tmtong/tinyos/</a>.</li> <li> Unzip it to whereever you want, e.g. C:\Blast-0.11</li> </ul> <h2> CollectData applcation setup.</h2> <ul> <li> You should check out the lastest version of firebug from CVS.</li> <li> Go to firebug/project/src/multihop/, the files are explained as below:<br> . CollectDataFB_old/CollectDataMFB_old.nc : They are version for the motes using "Dummy Data" for the radio packet.<br> . CollectDataFB_gps_radio/CollectDataMFB_gps_radio.nc: Only Gps sensor work with radio, using real, full-string GGA data.<br> . BaseStation/BaseStationM.nc: One version for all the cases. </li> <li>Edit the Makefile, make sure you include the path to the blast stack and Sensorboard driver,i.e. <br> INCLUDES=-I$(BLASTROOT)/Blast-0.11/Sender <br> -I$(BLASTROOT)/Blast-0.11/Interface<br> -I$(BLASTROOT)/Blast-0.11/DataStructure<br> -I$(BLASTROOT)/Blast-0.11/VirtualComm<br> -I$(BLASTROOT)/Blast-0.11/ParentSelection<br> -I$(TOSROOT)/tinyos-1.x/tos<br> -I$(XBOWROOT)/tos/platform <br> -I$(XBOWROOT)/tos/interfaces <br> -I$(XBOWROOT)/tos/sensorboards/mts400 </li> <li>Install a base station with mote_id=1,<br> e.g. make mica2 install.1 BaseStation<br> Install a couple of mote with mote_id =2, 3....<br> e.g. make mica2 install.2 CollectDataFB<br> make mica2 install.3 CollectDataFB<br> </li> </ul> <h2> Firebug system setup</h2> <ul> <li> Database setup<br> .Fire a web broswer, go to http://localhost/firebug/db_admin.php,<br> .Supply a database name: firebug, and number is 10.<br> . So the database "firebug" and releavent tables are created. </li> . Go to http://localhost/firebug/db_select.php, click the table "cumulative"<br> <li> Data Logger setup<br> . Fire a cygwin, go the cygdrive/c/firebug/project/java, <br> . type ant <br> . Go to cygdrive/c/tinyos/opt/tinyos-1.x/tools/java, type: java net.tinyos.sf.SerialForwarder -comm serial@COM1:baudrate, this will fire the serialforwarder for our data logger.<br> . type ./mhrun.sh firebug<br> </li> <li> Make it Run!<br> . Connect a base station mote to the PC on the COM1 through seial port. <br> . Turn on a couple of motes.<br> . Grant a little bit Patience.<br> </li> </ul> </body> </html> Index: admin.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/admin.html,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** admin.html 18 Jul 2003 20:06:20 -0000 1.11 --- admin.html 19 Dec 2003 23:46:30 -0000 1.12 *************** *** 1,283 **** ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ! ! <html> ! ! <head> ! <link type="text/css" rel="stylesheet" href="firebug.css"> ! <link rel="SHORTCUT ICON" href="./images/favicon.ico"> ! <title>FireBug administration page</title> ! </head> ! ! <body> ! ! <h1>FireBug administration page</h1> ! ! <p> ! The information technology infrastructure of Firebug ! is composed of many components, including web servers, ! database servers and scripting languages. For our ! initial implementation, we have chosen freely available ! (usually open source) and ubiquituous products. ! Our toolchain is constructed by defining interfaces ! largely independent of the tools themselves, and ! independent of choice of operating systems. This ! allows replacing individual components on a case-by-case ! basis. ! </p> ! ! <p> ! For example, we are using PHP for client database access. ! The PHP scripts are designed such that the embedded ! SQL commands may be used independently of PHP, allowing ! different implementations to use Perl, Python or other ! scripting languages facilitating web-based interaction. ! </p> ! ! ! ! <h2>MySQL</h2> ! ! ! <p> ! Installing and setting up mysql is pretty easy. ! We can mostly use the defaults for the FireBug ! project, with exceptions for where things are locally ! installed on various different machines. If the ! server (mysqld) does not start automatically, ! there may be problems with the my.ini file, which ! is located in the Windows system root directory. ! Do a <a href="http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=mysql+startup+windows+2000&btnG=Google+Search">google search</a> to get some help ! on mysql startup on Windows. Remember to check the ! Windows Services manager to set mysql for automatically ! starting the server on bootup. ! </p> ! ! <p> ! Here is an example <code>my.ini</code> for a MySQL ! server installed on MS Windows 2000: ! <pre> ! [mysqld] ! basedir=D:/mysql ! datadir=D:/mysql/data ! [WinMySQLAdmin] ! Server=D:/mysql/bin/mysqld-nt.exe ! </pre> ! Different servers may have slightly different ! drive and paths, but <code>mysqld</code> must ! be able to find this information in order to ! start. ! </p> ! ! ! <p> ! Some useful MySQL commands: ! </p> ! <ul> ! <li> ! <code>mysql -u username -p</code> opens a command line ! client connection to a MySQL server running on localhost ! for a given username, and prompts for a password. ! </li> ! <li></code>mysql -u firebug --database=firebug --host=mysql -p</code> ! is the current login command for mysql on sourceforge. ! </li> ! <li> ! Loading tables from files can be performed using either ! the <code>mysqlimport</code> command (section 4.8.7 of the mysql ! manual), or the <code>LOAD DATA INFILE</code> (sections 3.3.3, ! 6.4.9 of the mysql manual). ! </li> ! <li>Deleting a database is performed by using the DROP sql ! command: <code>drop database <db-name></code>. ! </li> ! </ul> ! ! ! <p> ! Stuff we need to know how to do: ! </p> ! ! <ul> ! <li> ! How to extract databases/tables in databases from ! native format to flat ascii text files for backups ! and exports. ! </li> ! <li> ! There needs to be an environment variable or ! a property file for php to read to set the ! hostname or IP address of the mysql database. ! Having hosts hardwired into scripts results in ! lots of superfluous cvs commits as everyone ! changes just the host in a script. ! </li> ! </ul> ! ! <h3>MySQL tables for mote data</h3> ! ! ! <p> ! We use several different tables for mote data collection. ! Since FireBug motes are not mobile, location data is recorded ! only once. Sensor data is recorded into two tables. The ! first table accumulates times histories of the data by ! recording the data from each packet received. The second ! table keeps a record of the most recent data received from ! each mote, which saves querying the first table for real time ! updates. ! </p> ! ! <center> ! <h4>Sensor data table</h4> ! <table class="db_schema"> ! <tr> ! <td>mote_id</td> ! <td>time</td> ! <td>temp</td> ! <td>rel_hum</td> ! <td>baro_pres</td> ! <td>cnt</td> ! </tr> ! <tr> ! <td>INTEGER</td> ! <td>TIMESTAMP</td> ! <td>FLOAT</td> ! <td>FLOAT</td> ! <td>FLOAT</td> ! <td>INTEGER</td> ! <td></td> ! </tr> ! </table> ! </center> ! ! <p /> ! ! <center> ! <h4>Sensor location table</h4> ! <table class="db_schema"> ! <tr> ! <td>mote_id</td> ! <td>longitude</td> ! <td>latitude</td> ! </tr> ! <tr> ! <td>INTEGER</td> ! <td>FLOAT</td> ! <td>FLOAT</td> ! <td></td> ! </tr> ! </table> ! </center> ! ! ! ! <h3>Creating the tables</h3> ! <p> ! ! First create the "firebug"" database: ! <pre> ! CREATE DATABASE firebug; ! </pre> ! ! Next switch to the firebug database: ! <pre> ! USE DATABASE firebug; ! </pre> ! ! Then create the "example" table: ! <pre> ! CREATE TABLE example (mote_id INTEGER, ! time TIMESTAMP, ! temp FLOAT, ! rel_hum FLOAT, ! baro_pres FLOAT, ! cnt INTEGER); ! </pre> ! ! Load the example.txt file using: ! <pre> ! LOAD DATA INFILE 'example.txt' INTO TABLE example; ! </pre> ! ! The example.txt file must be located in the ! <code>$mysqlroot/data/firebug</code> directory for ! <code>LOAD DATA</code> command. ! ! The example data should now be displayed on its own ! <a href="./example.php">web page</a>. ! </p> ! ! ! <p> ! For testing the jdbc interface, two more tables need ! to be created: <code>example_current</code> and ! <code>example_cumulative</code>. The mysql client ! supports cut and paste, use the following: ! <pre> ! CREATE TABLE example_current (mote_id INTEGER, ! time TIMESTAMP, ! temp FLOAT, ! rel_hum FLOAT, ! baro_pres FLOAT, ! cnt INTEGER); ! </pre> ! <pre> ! CREATE TABLE example_cumulative (mote_id INTEGER, ! time TIMESTAMP, ! temp FLOAT, ! rel_hum FLOAT, ! baro_pres FLOAT, ! cnt INTEGER); ! </pre> ! <p> ! ! ! ! ! <h3>MySQL users and security</h3> ! ! <p> ! Since FireBug does not make extensive use of all of the ! MySQL database server capabilities, the number of users ! and the privileges for those users can be highly restricted. ! Following administrative guidelines result in a MySQL ! server that is reasonably secure, but flexible enough to ! handle data insertion and display for the FireBug project. ! </p> ! ! ! <h3>MySQL problems</h3> ! ! MySQL errors listed by error numbers: ! ! <ul> ! <li> ! <code>Warning: MySQL Connection Failed: ! Can't connect to MySQL server ! on 'localhost' (10061)</code>: CHeck to make ! sure the server is running. It should appear ! in the Windows Task Manager, or in <code>top</code> ! or <code>ps aux</code> in unix. If it isn't running, ! in Windows the server can be started using the ! services dialog box. In unix, run the script ! <code>safe_mysql</code>. ! </li> ! </ul> ! ! ! <h2>PHP</h2> ! ! <h2>Apache</h2> ! ! ! <hr /> ! ! <p> ! Last Updated: $Date$ by $Author$. ! </p> ! ! </body> ! </html> ! ! --- 1,182 ---- ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ! <html> ! <head> ! <link type="text/css" rel="stylesheet" href="firebug.css"> ! <link rel="SHORTCUT ICON" href="./images/favicon.ico"> ! <title>FireBug administration page</title> ! </head> ! <body> ! <h1>FireBug administration page</h1> ! <p> The information technology infrastructure of Firebug is composed of ! many components, including web servers, database servers and scripting ! languages. For our initial implementation, we have chosen freely ! available (usually open source) and ubiquituous products. Our toolchain ! is constructed by defining interfaces largely independent of the tools ! themselves, and independent of choice of operating systems. This allows ! replacing individual components on a case-by-case basis. </p> ! <p> For example, we are using PHP for client database access. The PHP ! scripts are designed such that the embedded SQL commands may be used ! independently of PHP, allowing different implementations to use Perl, ! Python or other scripting languages facilitating web-based interaction. ! </p> ! <h2>MySQL</h2> ! <p> Installing and setting up mysql is pretty easy. We can mostly use ! the defaults for the FireBug project, with exceptions for where things ! are locally installed on various different machines. If the server ! (mysqld) does not start automatically, there may be problems with the ! my.ini file, which is located in the Windows system root directory. Do ! a <a ! href="http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=mysql+startup+windows+2000&btnG=Google+Search">google ! search</a> to get some help on mysql startup on Windows. Remember to ! check the Windows Services manager to set mysql for automatically ! starting the server on bootup. </p> ! <p> Here is an example <code>my.ini</code> for a MySQL server ! installed on MS Windows 2000: </p> ! <pre> [mysqld]<br> basedir=D:/mysql<br> datadir=D:/mysql/data<br> [WinMySQLAdmin]<br> Server=D:/mysql/bin/mysqld-nt.exe<br> </pre> ! Different servers may have slightly different drive and paths, but <code>mysqld</code> ! must be able to find this information in order to start. ! <p> Some useful MySQL commands: </p> ! <ul> ! <li> <code>mysql -u username -p</code> opens a command line client ! connection to a MySQL server running on localhost for a given username, ! and prompts for a password. </li> ! <li>mysql -u firebug --database=firebug --host=mysql -p is the ! current login command for mysql on sourceforge. </li> ! <li> Loading tables from files can be performed using either the <code>mysqlimport</code> ! command (section 4.8.7 of the mysql manual), or the <code>LOAD DATA ! INFILE</code> (sections 3.3.3, 6.4.9 of the mysql manual). </li> ! <li>Deleting a database is performed by using the DROP sql command: <code>drop ! database <db-name></code>. </li> ! </ul> ! <p> Stuff we need to know how to do: </p> ! <ul> ! <li> How to extract databases/tables in databases from native format ! to flat ascii text files for backups and exports. </li> ! <li> There needs to be an environment variable or a property file for ! php to read to set the hostname or IP address of the mysql database. ! Having hosts hardwired into scripts results in lots of superfluous cvs ! commits as everyone changes just the host in a script. </li> ! </ul> ! <h3>MySQL tables for mote data</h3> ! <p> We use several different tables for mote data collection. Since ! FireBug motes are not mobile, location data is recorded only once. ! Sensor data is recorded into two tables. The first table accumulates ! times histories of the data by recording the data from each packet ! received. The second table keeps a record of the most recent data ! received from each mote, which saves querying the first table for real ! time updates. </p> ! <center> ! <h4>Sensor data table</h4> ! <table class="db_schema"> ! <tbody> ! <tr> ! <td>mote_id</td> ! <td>time</td> ! <td>temp</td> ! <td>rel_hum</td> ! <td>baro_pres</td> ! <td>cnt</td> ! </tr> ! <tr> ! <td>INTEGER</td> ! <td>TIMESTAMP</td> ! <td>FLOAT</td> ! <td>FLOAT</td> ! <td>FLOAT</td> ! <td>INTEGER</td> ! <td><br> ! </td> ! </tr> ! </tbody> ! </table> ! </center> ! <p> </p> ! <center> ! <h4>Sensor location table</h4> ! <table class="db_schema"> ! <tbody> ! <tr> ! <td>mote_id</td> ! <td>longitude</td> ! <td>latitude</td> ! </tr> ! <tr> ! <td>INTEGER</td> ! <td>FLOAT</td> ! <td>FLOAT</td> ! <td><br> ! </td> ! </tr> ! </tbody> ! </table> ! </center> ! <h3>Creating the tables</h3> ! <p> First create the "firebug"" database: </p> ! <pre> CREATE DATABASE firebug;<br> </pre> ! Next switch to the firebug database: ! <pre> USE DATABASE firebug;<br> </pre> ! Then create the "example" table: ! <pre> CREATE TABLE example (mote_id INTEGER,<br> time TIMESTAMP,<br> temp FLOAT,<br> rel_hum FLOAT,<br> baro_pres FLOAT,<br> cnt INTEGER);<br> </pre> ! Load the example.txt file using: ! <pre> LOAD DATA INFILE 'example.txt' INTO TABLE example;<br> </pre> ! The example.txt file must be located in the <code>$mysqlroot/data/firebug</code> ! directory for <code>LOAD DATA</code> command. The example data should ! now be displayed on its own <a href="./example.php">web page</a>. ! <p> For testing the jdbc interface, two more tables need to be created: ! <code>example_current</code> and <code>example_cumulative</code>. The ! mysql client supports cut and paste, use the following: </p> ! <pre> CREATE TABLE example_current (mote_id INTEGER,<br> time TIMESTAMP,<br> temp FLOAT,<br> rel_hum FLOAT,<br> _baropres FLOAT,<br> cnt INTEGER);<br> </pre> ! <pre> CREATE TABLE example_cumulative (mote_id INTEGER,<br> time TIMESTAMP,<br> temp FLOAT,<br> rel_hum FLOAT,<br> baro_pres FLOAT,<br> cnt INTEGER);<br> </pre> ! <p> </p> ! <h3>MySQL users and security</h3> ! <p> Since FireBug does not make extensive use of all of the MySQL ! database server capabilities, the number of users and the privileges ! for those users can be highly restricted. Following administrative ! guidelines result in a MySQL server that is reasonably secure, but ! flexible enough to handle data insertion and display for the FireBug ! project. </p> ! <h3>MySQL problems</h3> ! MySQL errors listed by error numbers: ! <ul> ! <li> <code>Warning: MySQL Connection Failed: Can't connect to MySQL ! server on 'localhost' (10061)</code>: CHeck to make sure the server is ! running. It should appear in the Windows Task Manager, or in <code>top</code> ! or <code>ps aux</code> in unix. If it isn't running, in Windows the ! server can be started using the services dialog box. In unix, run the ! script <code>safe_mysql</code>. </li> ! </ul> ! <h2>PHP</h2> ! <ul> ! <li>Go to php web page <a href="http://www.php.net/downloads.php">http://www.php.net/downloads.php</a> ! to download the php installation file.</li> ! <li>Run the installation file. </li> ! <li> After that, go to "C:\winnt\php.ini", open the file. </li> ! <li>Search the keyword "error_reporting" in the script, and change ! the value like:<br> ! error_reporting = E_All^E_Notice; </li> ! <li>if necessary, make sure the "envrionment variable" -"PATH" ! include the path to PHP. e.g. C:\PHP\bin;</li> ! <li> Fire a Cygwin, type: $mysql, you will get the mysql running.</li> ! </ul> ! <h2>Apache</h2> ! <ul> ! <li>go to apach web page <a ! href="http://httpd.apache.org/download.cgi">http://httpd.apache.org/download.cgi</a> ! to download the .exe installation file, and install it.</li> ! <li>After run the installation, go to C:\Program Files\Apache ! Group\Apache2\conf, open the file "httpd.conf". </li> ! <li> insert the folllowing text to the very end of the file.</li> ! <p>ScriptAlias /php/ "c:/php/" <br> ! AddType application/x-httpd-php .php <br> ! Action application/x-httpd-php "/php/php.exe"<br> ! </p> ! <li>if necessary, make sure the "envrionment variable" -"PATH" ! include the path to Apache. e.g. C:\Program ! Files\apache-ant-1.5.3-1\bin;</li> ! <li>restart Apache</li> ! </ul> ! <hr> ! <p> Last Updated: $Date$ by $Author: doolin ! $. </p> ! </body> ! </html> |