Sampl-sensor-andrew

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