Implementasi Embedded Linux pada Jaringan Sensor Nirkabel Platform Imote2




Intel Mote 2 (Imote2)

Implementasi Embedded Linux

tar xzvf /lokasi-file/nama-file.tar.gz
tar xjvf /lokasi-file/nama-file.tar.bz2
chmod –R 777 /lokasi-directory/namadirectory
tar xzvf linux-gcc-4.1.2-arm-xscale-linux-gnu-glibc-2.3.3.tgz 
chmod –R 777 arm-xscale-linux-gnu
apt-get install libncurses5-dev libusb-dev libftdi1 libftdi-dev ldconfig mtd-tools ssh
cd /lokasi-directory-Linux-kernel 
export ARCH=arm
export CROSS_COMPILE=/lokasi-directory-cross-compiler/lokasi-bin/nama-cross-compiler-
tar xzvf linux-  
chmod –R 777 linux-
cd linux-
export ARCH=arm
export CROSS_COMPILE= ../arm-xscale-linux-gnu/bin/arm-xscale-linux-gnu-
cp /lokasi-directory-Linux-kernel/lokasi-file-imote2-linux_defconfig/imote2-linux_defconfig /root/.config
cp arch/arm/configs/imote2-linux_defconfig /root/.config
make menuconfig
make jenis-image
make zImage
make module 
make INSTALL_MOD_PATH=$PWD/modules modules_install
mkfs.jffs2 --squash-uid -r ./linux-rootfs -o rootfs.jffs2 -e 0x20000 --pad=0x01000000
mkfs.jffs2 --squash-uid -r ./linux-rootfs -o rootfs.jffs2 -e 0x20000 --pad=0x01DC0000
./configure --enable-ft2232_libftdi 
make install
chmod –R 777 /lokasi-openocd-yang-telah-diinstalasi
openocd -f /lokasi-file-configuration -f /lokasi-file-configurationintelmote
tar xjvf openocd-0.4.0-rc1.tar.bz2 
cd openocd-0.4.0-rc1
./configure --enable-ft2232_libftdi
make install
chmod –R 777 /usr/local/bin/openocd
openocd -f /lokasi/file/configuration –f /lokasi/file/ configuration-intelmote
openocd –f /usr/local/share/openocd/scripts/interface/ jtagkey.cfg –f board/crossbow_tech_IMote2.cfg 
telnet localhost 4444
reset halt
flash protect 0 0 258 off
flash erase_sector 0 0 258
flash write_image blob-im2 0x0 bin
flash write_image linux- /zImage
0x00040000 bin
flash write_image rootfs.jffs2 0x00240000 bin
ln -s /etc/init.d/networking /etc/rc2.d/S10networking 
ln -s /etc/init.d/sshd /etc/rc2.d/S11sshd
ln -s /etc/init.d/networking /etc/rc5.d/S10networking
ln -s /etc/init.d/sshd /etc/rc5.d/S11sshd
vi /etc/init.d/networking (ganti IP address)
vi /etc/network/interfaces (ganti IP address)
insmod /lib/modules/
insmod /lib/modules/
mknod /dev/tosmac c 240 0
ln –s /root/tosmac/loaddriver /etc/rc2.d/S12loaddriver 
ln –s /root/tosmac/loaddriver /etc/rc5.d/S12loaddriver
ln –s /root/tosmac/CntToLeds /etc/rc2.d/S14Transmitter (pengirim data otomatis)
ln –s /root/tosmac/CntToLeds /etc/rc5.d/S14Transmitter (pengirim data otomatis)
//baris pertama
#include <mach/ohci.h>
* Configure USB Host (OHCI)
* For Imote2 the following configuration is used:
* USB Port 1 is used as USB Host
* USB Port 2 is used as USB Gadget (as default for Imote2)
static int imote2_ohci_init(struct device *dev) {
return 0;
static struct pxaohci_platform_data imote2_ohci_platform_data = {
.port_mode = PMM_NPS_MODE,
.init = imote2_ohci_init,
.port_mode = PMM_PERPORT_MODE,
.power_budget = 150, //300
//baris terakhir
1\. Konfigurasi modul USB-Host. 
Device Drivers >USB support >Support for Host-side USB <*>
>USB device filesystem [*]
>USB device class-device (DEPRECATED)[*]
>USB Monitor<*>
>OHCI HCD support<*>
2\. Konfigurasi modul Wireless LAN 802.11\.
Networking support >wireless >Improved wireless configuration API (M)
>nl80211 new netlink interface support [*]
>Wireless extensions sysfs files [*]
>Common routines for IEEE802.11 drivers (M)
>Generic IEEE 802.11 Networking (M)
>Enable LED triggers [*]
Device Drivers >Network device Support >Wireless LAN
>Wireless LAN (IEEE 802.11) [*]
3Konfigurasi modul driver TP-Link WN-321G (rt73).
Device Drivers >Network Device Support>Wireless LAN
>Ralink driver support [M]
>Ralink rt2501/rt73 (usb0 support) [M]
>Ralink debug output [*]
tar xvf TpLink_TL_WN321G_in_Linux.tar  
cd TpLink_TL_WN321G_in_Linux/Module/
gedit Makefile
#export ARCH=arm
#export CROSS_COMPILE=../arm-xscale-linux-gnu/bin/arm-xscale-linux-gnu-
#make all
scp rt73.ko root@ rt73.ko
ssh –l root 
vi /etc/rc2.d/S50StartupScript
#********S50StartupScipt File*****************************
#********This file configures Wlan on Imote2**************
#install driver
cd /root/
insmod rt73.ko
echo -n 1 > /sys/bus/usb/devices/1-1/bConfigurationValue
#Configure Wlan
sleep 10
ifconfig rausb0 up
iwconfig rausb0 essid imote2
iwconfig rausb0 mode ad-hoc
ip link set rausb0 up
ifconfig rausb0 inet
ifconfig rausb0 netmask
ifconfig rausb0 gateway
#********EOF S50StartupScript File*************************
chmod 777 S50StartupScript




this blog contains all my articles licensed under creative commons attribution customized sharealike (cc-by-sa) where you can sell but mention the open one here

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store