IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2011-03-30 09:29:52 (12 years 11 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 0cfd2777de1f5054a8d1f3f25f5f889abaef613c |
Message: | install/: renamed READMEs and added (non-working) setup instructions - README-Ben: renamed to INSTALL-Ben - README-PC: renamed to INSTALL-PC - USAGE: setup instructions (don't work yet) |
Files: |
install/INSTALL-Ben (1 diff) install/INSTALL-PC (1 diff) install/README-Ben (1 diff) install/README-PC (1 diff) install/USAGE (1 diff) |
Change Details
install/INSTALL-Ben | ||
---|---|---|
1 | 1. Obtain u-boot's mkimage | |
2 | ||
3 | wget ftp://ftp.denx.de/pub/u-boot/u-boot-2009.11.tar.bz2 | |
4 | tar xfj u-boot-2009.11.tar.bz2 | |
5 | cd u-boot-2009.11 | |
6 | touch include/config.{h,mk} | |
7 | make SUBDIRS=tools BIN_FILES-y=mkimage tools | |
8 | cp tools/mkimage /usr/local/bin | |
9 | cd .. | |
10 | ||
11 | 2. Build the kernel | |
12 | ||
13 | git clone git://projects.qi-hardware.com/qi-kernel.git | |
14 | cd qi-kernel | |
15 | git checkout ben-wpan | |
16 | cp ../ben-wpan-config-2.6.38 .config | |
17 | patch -p1 -s <../openwrt-preinit-hack.patch | |
18 | OWRT make ARCH=mips CROSS_COMPILE=mipsel-openwrt-linux- vmlinux.bin | |
19 | Jlime make ARCH=mips CROSS_COMPILE=mipsel-linux- vmlinux.bin | |
20 | gzip -9 -f arch/mips/boot/vmlinux.bin | |
21 | OWRT mkimage -A mips -O linux -T kernel -a 0x80010000 \ | |
22 | -C gzip -e 0x`mipsel-openwrt-linux-nm vmlinux | \ | |
23 | grep " kernel_entry" | cut -f1 -d ' '` \ | |
24 | -n 'Ben NanoNote Linux Kernel' \ | |
25 | -d arch/mips/boot/vmlinux.bin.gz uImage | |
26 | Jlime mkimage -A mips -O linux -T kernel -a 0x80010000 \ | |
27 | -C gzip -e 0x`mipsel-linux-nm vmlinux | \ | |
28 | grep " kernel_entry" | cut -f1 -d ' '` \ | |
29 | -n 'Ben NanoNote Linux Kernel' \ | |
30 | -d arch/mips/boot/vmlinux.bin.gz uImage | |
31 | cd .. | |
32 | ||
33 | 3. Install the kernel | |
34 | ||
35 | Using usbboot: | |
36 | ||
37 | - remove battery and USB | |
38 | - wait 15 seconds | |
39 | - press the "U" key on the Ben | |
40 | - insert USB while keeping "U" pressed | |
41 | - release the "U" key | |
42 | - on the host, run | |
43 | usbboot -c "boot;nprog 1024 qi-kernel/uImage 0 0 -n" | |
44 | - disconnect USB | |
45 | - wait 15 seconds | |
46 | - connect USB again | |
47 | ||
48 | Using nandwrite: | |
49 | ||
50 | - set up TCP/IP networking with the Ben | |
51 | - get the Ben's IPv4 address: | |
52 | NN=`ifconfig usb0 | | |
53 | sed '/.*inet addr:\([^ ]*\).*/{s//\1/;s/100$/101/;s/200$/202/;p;};d'` | |
54 | # should be NN=192.168.254.101 for OpenWRT, | |
55 | # NN=192.168.1.202 for Jlime | |
56 | - copy the kernel: | |
57 | scp qi-kernel/uImage $NN: | |
58 | - flash the kernel, clean up, and reboot: | |
59 | ssh $NN 'PATH=$PATH:/usr/sbin; | |
60 | flash_eraseall /dev/mtd1 && nandwrite -p /dev/mtd1 uImage && | |
61 | rm -f uImage && sync && sleep 1 && sync && sleep 1 && | |
62 | /sbin/reboot -f' | |
63 | - press ^C to return to the shell | |
64 | ||
65 | 4. Set up the user space on the Ben | |
66 | ||
67 | - connect to the Ben | |
68 | ssh $NN | |
69 | - run the following commands: | |
70 | OWRT opkg install ip | |
71 | OWRT opkg install ldconfig | |
72 | mkdir -p /usr/local/var/run | |
73 | exit | |
74 | ||
75 | 5. Build libnl-1 for cross-development and install the run-time library | |
76 | ||
77 | wget http://www.infradead.org/~tgr/libnl/files/libnl-1.1.tar.gz | |
78 | tar xfz libnl-1.1.tar.gz | |
79 | cd libnl-1.1 | |
80 | OWRT gcc=`readlink -f \`which mipsel-openwrt-linux-gcc\`` | |
81 | OWRT ./configure --prefix=${gcc%/bin/*} --host=mipsel-openwrt-linux | |
82 | Jlime patch -p1 -s <../libnl-1.1-limits.patch | |
83 | Jlime inc=`mipsel-linux-cpp -v </dev/null 2>&1 | grep usr/include | tr -d \ ` | |
84 | Jlime ./configure --prefix=${inc%/include} --host=mipsel-linux | |
85 | make | |
86 | make install | |
87 | ||
88 | scp lib/libnl.so.1.1 $NN:/usr/lib | |
89 | ssh $NN /sbin/ldconfig | |
90 | cd .. | |
91 | ||
92 | 6. Build the user space tools of the linux-zigbee project | |
93 | ||
94 | wget http://ufpr.dl.sourceforge.net/project/linux-zigbee/linux-zigbee-sources/0.2.2/lowpan-tools-0.2.2.tar.gz | |
95 | tar xfz lowpan-tools-0.2.2.tar.gz | |
96 | cd lowpan-tools-0.2.2 | |
97 | OWRT ./configure --host=mipsel-openwrt-linux | |
98 | JLime ./configure --host=mipsel-linux | |
99 | make | |
100 | ||
101 | scp src/iz src/izcoordinator src/izchat $NN:/usr/sbin/ |
install/INSTALL-PC | ||
---|---|---|
1 | 1. Build the kernel | |
2 | ||
3 | git clone git://projects.qi-hardware.com/qi-kernel.git | |
4 | ... | |
5 | ... enable CONFIG_IEEE802154, CONFIG_MAC802154, | |
6 | ... CONFIG_IEEE802154_DRIVERS, ... | |
7 | ... also enable IPv6 | |
8 | ... | |
9 | ||
10 | 2. Set up the user space | |
11 | ||
12 | # iproute - probably already installed | |
13 | aptiude install libnl1 | |
14 | mkdir -p /usr/local/var/run | |
15 | ||
16 | 3. Build the user space tools of the linux-zigbee project | |
17 | ||
18 | wget http://ufpr.dl.sourceforge.net/project/linux-zigbee/linux-zigbee-sources/0.2.2/lowpan-tools-0.2.2.tar.gz | |
19 | tar xfz lowpan-tools-0.2.2.tar.gz | |
20 | cd lowpan-tools-0.2.2 | |
21 | ./configure | |
22 | make | |
23 | make install |
install/README-Ben | ||
---|---|---|
1 | 1. Obtain u-boot's mkimage | |
2 | ||
3 | wget ftp://ftp.denx.de/pub/u-boot/u-boot-2009.11.tar.bz2 | |
4 | tar xfj u-boot-2009.11.tar.bz2 | |
5 | cd u-boot-2009.11 | |
6 | touch include/config.{h,mk} | |
7 | make SUBDIRS=tools BIN_FILES-y=mkimage tools | |
8 | cp tools/mkimage /usr/local/bin | |
9 | cd .. | |
10 | ||
11 | 2. Build the kernel | |
12 | ||
13 | git clone git://projects.qi-hardware.com/qi-kernel.git | |
14 | cd qi-kernel | |
15 | git checkout ben-wpan | |
16 | cp ../ben-wpan-config-2.6.38 .config | |
17 | patch -p1 -s <../openwrt-preinit-hack.patch | |
18 | OWRT make ARCH=mips CROSS_COMPILE=mipsel-openwrt-linux- vmlinux.bin | |
19 | Jlime make ARCH=mips CROSS_COMPILE=mipsel-linux- vmlinux.bin | |
20 | gzip -9 -f arch/mips/boot/vmlinux.bin | |
21 | OWRT mkimage -A mips -O linux -T kernel -a 0x80010000 \ | |
22 | -C gzip -e 0x`mipsel-openwrt-linux-nm vmlinux | \ | |
23 | grep " kernel_entry" | cut -f1 -d ' '` \ | |
24 | -n 'Ben NanoNote Linux Kernel' \ | |
25 | -d arch/mips/boot/vmlinux.bin.gz uImage | |
26 | Jlime mkimage -A mips -O linux -T kernel -a 0x80010000 \ | |
27 | -C gzip -e 0x`mipsel-linux-nm vmlinux | \ | |
28 | grep " kernel_entry" | cut -f1 -d ' '` \ | |
29 | -n 'Ben NanoNote Linux Kernel' \ | |
30 | -d arch/mips/boot/vmlinux.bin.gz uImage | |
31 | cd .. | |
32 | ||
33 | 3. Install the kernel | |
34 | ||
35 | Using usbboot: | |
36 | ||
37 | - remove battery and USB | |
38 | - wait 15 seconds | |
39 | - press the "U" key on the Ben | |
40 | - insert USB while keeping "U" pressed | |
41 | - release the "U" key | |
42 | - on the host, run | |
43 | usbboot -c "boot;nprog 1024 qi-kernel/uImage 0 0 -n" | |
44 | - disconnect USB | |
45 | - wait 15 seconds | |
46 | - connect USB again | |
47 | ||
48 | Using nandwrite: | |
49 | ||
50 | - set up TCP/IP networking with the Ben | |
51 | - get the Ben's IPv4 address: | |
52 | NN=`ifconfig usb0 | | |
53 | sed '/.*inet addr:\([^ ]*\).*/{s//\1/;s/100$/101/;s/200$/202/;p;};d'` | |
54 | # should be NN=192.168.254.101 for OpenWRT, | |
55 | # NN=192.168.1.202 for Jlime | |
56 | - copy the kernel: | |
57 | scp qi-kernel/uImage $NN: | |
58 | - flash the kernel, clean up, and reboot: | |
59 | ssh $NN 'PATH=$PATH:/usr/sbin; | |
60 | flash_eraseall /dev/mtd1 && nandwrite -p /dev/mtd1 uImage && | |
61 | rm -f uImage && sync && sleep 1 && sync && sleep 1 && | |
62 | /sbin/reboot -f' | |
63 | - press ^C to return to the shell | |
64 | ||
65 | 4. Set up the user space on the Ben | |
66 | ||
67 | - connect to the Ben | |
68 | ssh $NN | |
69 | - run the following commands: | |
70 | OWRT opkg install ip | |
71 | OWRT opkg install ldconfig | |
72 | mkdir -p /usr/local/var/run | |
73 | exit | |
74 | ||
75 | 5. Build libnl-1 for cross-development and install the run-time library | |
76 | ||
77 | wget http://www.infradead.org/~tgr/libnl/files/libnl-1.1.tar.gz | |
78 | tar xfz libnl-1.1.tar.gz | |
79 | cd libnl-1.1 | |
80 | OWRT gcc=`readlink -f \`which mipsel-openwrt-linux-gcc\`` | |
81 | OWRT ./configure --prefix=${gcc%/bin/*} --host=mipsel-openwrt-linux | |
82 | Jlime patch -p1 -s <../libnl-1.1-limits.patch | |
83 | Jlime inc=`mipsel-linux-cpp -v </dev/null 2>&1 | grep usr/include | tr -d \ ` | |
84 | Jlime ./configure --prefix=${inc%/include} --host=mipsel-linux | |
85 | make | |
86 | make install | |
87 | ||
88 | scp lib/libnl.so.1.1 $NN:/usr/lib | |
89 | ssh $NN /sbin/ldconfig | |
90 | cd .. | |
91 | ||
92 | 6. Build the user space tools of the linux-zigbee project | |
93 | ||
94 | wget http://ufpr.dl.sourceforge.net/project/linux-zigbee/linux-zigbee-sources/0.2.2/lowpan-tools-0.2.2.tar.gz | |
95 | tar xfz lowpan-tools-0.2.2.tar.gz | |
96 | cd lowpan-tools-0.2.2 | |
97 | OWRT ./configure --host=mipsel-openwrt-linux | |
98 | JLime ./configure --host=mipsel-linux | |
99 | make | |
100 | ||
101 | scp src/iz src/izcoordinator src/izchat $NN:/usr/sbin/ |
install/README-PC | ||
---|---|---|
1 | 1. Build the kernel | |
2 | ||
3 | git clone git://projects.qi-hardware.com/qi-kernel.git | |
4 | ... | |
5 | ... enable CONFIG_IEEE802154, CONFIG_MAC802154, | |
6 | ... CONFIG_IEEE802154_DRIVERS, ... | |
7 | ... also enable IPv6 | |
8 | ... | |
9 | ||
10 | 2. Set up the user space | |
11 | ||
12 | # iproute - probably already installed | |
13 | aptiude install libnl1 | |
14 | mkdir -p /usr/local/var/run | |
15 | ||
16 | 3. Build the user space tools of the linux-zigbee project | |
17 | ||
18 | wget http://ufpr.dl.sourceforge.net/project/linux-zigbee/linux-zigbee-sources/0.2.2/lowpan-tools-0.2.2.tar.gz | |
19 | tar xfz lowpan-tools-0.2.2.tar.gz | |
20 | cd lowpan-tools-0.2.2 | |
21 | ./configure | |
22 | make | |
23 | make install |
install/USAGE | ||
---|---|---|
1 | Setup between two Bens: | |
2 | ||
3 | (for reference - doesn't work yet) | |
4 | ||
5 | Ben1 iz add wpan-phy0 | |
6 | Ben1 ip link set wpan0 address de:ad:be:af:ca:fe:ba:be | |
7 | Ben1 ifconfig wpan0 up | |
8 | ||
9 | Ben2 iz add wpan-phy0 | |
10 | Ben2 ip link set wpan0 address ca:fe:ca:fe:ca:fe:ca:fe | |
11 | Ben2 ifconfig wpan0 up | |
12 | ||
13 | Ben1 izcoordinator -d 1 -l lease -i wpan0 -p 0x777 -s 1 -c 11 | |
14 | Ben2 iz assoc wpan0 777 1 11 short | |
15 | ||
16 | Based on | |
17 | http://sourceforge.net/apps/trac/linux-zigbee/wiki/GettingStarted-0.2 |