Sampl-sensor-andrew

Version 4 (Anthony Rowe, 08/11/2009 09:41 pm)

1 1 Anthony Rowe
2 1 Anthony Rowe
== SAMPL Sensor Andrew ==
3 1 Anthony Rowe
4 1 Anthony Rowe
svn checkout svn://sensor.andrew.cmu.edu:/srv/svn/repos/sensor-andrew
5 1 Anthony Rowe
6 1 Anthony Rowe
'''Step 1: Install Loudmouth'''
7 1 Anthony Rowe
 * Install: glib2, expat, gnutls
8 1 Anthony Rowe
 * 
9 1 Anthony Rowe
{{{
10 1 Anthony Rowe
   cd sensor-andrew/sox/libs/loudmouth
11 1 Anthony Rowe
    ./configure
12 1 Anthony Rowe
    make
13 1 Anthony Rowe
    sudo make install
14 1 Anthony Rowe
}}}
15 1 Anthony Rowe
16 1 Anthony Rowe
17 1 Anthony Rowe
'''Step 2: Install C Sox Library'''
18 1 Anthony Rowe
 * Double check the path of GLIB, GNUTLS, LOUDMOUTH etc in vars.mk
19 1 Anthony Rowe
  * This may work fine with the default values
20 1 Anthony Rowe
 * 
21 1 Anthony Rowe
{{{
22 1 Anthony Rowe
    cd sensor-andrew/sox/libs/lib_c
23 1 Anthony Rowe
    make
24 1 Anthony Rowe
    sudo make install
25 1 Anthony Rowe
}}}
26 1 Anthony Rowe
27 1 Anthony Rowe
28 1 Anthony Rowe
'''Step 3: Build FireFly sox-gateway'''
29 1 Anthony Rowe
 * In this step build "gateway_client" which will be used to communicate to the SLIPstream server and then in turn to the FireFly gateway node
30 1 Anthony Rowe
 * edit makefile to correctly set XMPP_LIBRARY_PATH to sox/libs/lib_c
31 1 Anthony Rowe
 * 
32 1 Anthony Rowe
{{{
33 1 Anthony Rowe
    cd nano-RK/projects/SAMPL/slip-clients/sox-gateway
34 1 Anthony Rowe
    make
35 1 Anthony Rowe
}}}
36 1 Anthony Rowe
37 1 Anthony Rowe
38 4 Anthony Rowe
'''Step 4: Flash FireFly nodes'''
39 2 Anthony Rowe
 * First Program the nodes
40 2 Anthony Rowe
 *
41 2 Anthony Rowe
{{{
42 1 Anthony Rowe
    cd nano-RK/projects/SAMPL/clients/FF-basic-sensors
43 1 Anthony Rowe
    make clean
44 1 Anthony Rowe
    make program
45 2 Anthony Rowe
}}}
46 2 Anthony Rowe
 * You will see a red blinking led and the following messages from the serial port:
47 2 Anthony Rowe
{{{
48 2 Anthony Rowe
* ERROR reading MAC address from EEPROM run eeprom-config utility
49 2 Anthony Rowe
* ERROR reading MAC address from EEPROM run eeprom-config utility
50 2 Anthony Rowe
* ERROR reading MAC address from EEPROM run eeprom-config utility
51 2 Anthony Rowe
}}}
52 2 Anthony Rowe
 * Next, set the EEPROM values
53 2 Anthony Rowe
  * MAC Address
54 2 Anthony Rowe
  * Subnet MAC
55 2 Anthony Rowe
  * Encryption Key (optional)
56 2 Anthony Rowe
  * Wireless Update image file (optional)
57 2 Anthony Rowe
 * Note the following with respect to the MAC address:
58 2 Anthony Rowe
  * The first six hex digits in the MAC address denote the subnet 
59 2 Anthony Rowe
  * All nodes must be part of the same subnet to communicate
60 2 Anthony Rowe
  * The gateway node must be set to 0 inside a subnet
61 2 Anthony Rowe
  * No other node besides the gateway can be 0
62 3 Anthony Rowe
 * Use the config-eeprom tool to set the EEPROM
63 2 Anthony Rowe
{{{
64 3 Anthony Rowe
cd nano-RK/tools/EEPROM_mac_set
65 3 Anthony Rowe
make (if not already built)
66 3 Anthony Rowe
./config-eeprom /dev/ttyUSB1 00000001 26 00112233445566778899AABBCCDDEEFF
67 1 Anthony Rowe
}}}
68 1 Anthony Rowe
69 4 Anthony Rowe
'''Step 5: Flash FireFly gateway'''
70 3 Anthony Rowe
 * Flash the gateway node that will be connected to the gateway computer
71 3 Anthony Rowe
 *
72 3 Anthony Rowe
{{{
73 3 Anthony Rowe
cd nano-RK/projects/SAMPL/gateway
74 3 Anthony Rowe
make clean
75 3 Anthony Rowe
make program
76 3 Anthony Rowe
}}}
77 3 Anthony Rowe
 * Set the EEPROM like any other FireFly client except with the last two hex digits being '00'
78 2 Anthony Rowe
79 2 Anthony Rowe
80 2 Anthony Rowe