Software Environment ....................4 Potential Applications .....................4 Getting Started..............................5 Development Kit Overview ....................5 Hardware Layouts ......................6 Assembling the Stargate Development Platform ............7 Verify successful setup on terminal console..............7 System Configuration............................13 Networking Setup......................13 Application Server Configuration .................14 Starting Programs during System Boot-up ..............23 Programming Motes......................23...
Page 4
Stargate Developer’s Guide Wireless Sensor Networks date – set system date & time..................38 shutdown – perform an orderly system shutdown ............38 ifconfig – show the active network interfaces...............38 6.10 iwconfig – show the active wireless network interfaces..........38 6.11 pump – show the active wireless network interfaces..........39 Appendix A.
Wireless Sensor Networks Stargate Developer’s Guide 1 Introduction Stargate is a powerful single board computer with enhanced communications and sensor signal ® processing capabilities. The Stargate uses Intel’s latest generation 400 MHz XScale processor (PXA255). This product was designed within Intel’s Ubiquitous Computing Research Program, and licensed to Crossbow for production.
Stargate Developer’s Guide Wireless Sensor Networks 1.2 Software Environment The Stargate Development Platform is shipped with pre-installed software on the board and additional software on the CDROM to enable application program development. CDROM contents: • An embedded Linux operating system (OS) kernel.
Stargate Developer’s Guide 2 Getting Started 2.1 Development Kit Overview 2.1.1 The Basic Stargate Development Kit This basic kit contains the following items: • The Stargate processor board • The Stargate daughter card • A null modem cable for serial RS-232 connection •...
2.3 Assembling the Stargate Development Platform Connect the Stargate Processor Board (SPB400CB) with the Stargate Daughter Card (SDC400CA) by connecting the bottom of Stargate Processor Board (connector U1) to the bottom of Stargate Daughter Card (connector U13). Fasten the 2 boards using 2 nylon spacers, screws and nuts provided in a plastic bag.
Page 10
2. Configure and start a terminal emulation program on the host PC: For Linux hosts see Section 2.4.2; for Windows hosts see Section 2.4.3. 3. Plug in the power to the Stargate and turn the two power switches (S1 and S3) to the “ON” position: Section 2.4.4.
Page 11
If you are using a Li-Ion battery pack, there are 2 usage models: • If both Stargate Processor Board and the Daughter Card are used, then J8 must be jumpered on 1-2 position (JACK) and the battery plugged in at the J7 connector on the Daughter Card.
Page 12
SDRAM size: 0x04000000 in megs: 64M >> Compaq OHH BootLoader ported to Stargate 7.1, Rev 2-21-13 [BIG_KERNEL] [MONO] >> 04-06-04_15:58 >> Last link date: Fri Jun 4 15:58:22 PDT 2004 >> Contact: bootldr@handhelds.org Cpu company: INTEL...
Page 13
Wireless Sensor Networks Stargate Developer’s Guide define_partition: base 0x00140000 define_partition: partition_table 0xA3A00014 defining partition: root + set macaddr "00:50:C2:2F:33:83" setting param <macaddr> to value <00:50:C2:2F:33:83> + set ipaddr "10.1.1.171" setting param <ipaddr> to value <10.1.1.171> + set gateway "10.1.1.221" setting param <gateway> to value <10.1.1.221>...
Page 14
At this point you are ready to log into the target system. • For “login:” type root. • For “Password:” type rootme. login: root Password:****** Linux stargate 2.4.19-rmk7-pxa2-star #1 Fri Aug 13 12:58:00 PDT 2004 armv5tel unknown login[150]: root login on `tts/0' stargate:/root#...
Stargate will have Internet access. The disadvantage to DHCP is you need to determine the IP address of the Stargate after it boots up - it could be different each time. Using a terminal program open a Stargate session and issue the...
LAN gateway machine. The next time the Stargate is booted it will be assigned a fixed IP address of 192.168.2.3 and the default gateway will be 192.168.2.1. The addresses you choose are particular to the LAN you are connecting to.
Page 17
0025-14_A\config folder. This archive contains an image of the PostgreSQL database and Xlisten tools in a plug-and-play format. You simply expand the archive in the root of the CF card and reboot the Stargate. Open Cygwin shell on PC –...
Page 18
Sierra Wireless AirCard 555D PCMCIA Cellular Modem Card To provide a low speed, long range remote access link to the Stargate you can purchase the Sierra Wireless AirCard 555D PCMCIA Cellular Modem Card. This card is essentially a modem that provides a PPP link across the Internet via the cellular network.
Page 19
Locate the Sierra Wireless AirCard 555D software update archive named CellModem.tar.gz in the <CDROM>\8160-0025-14_A\config folder. The software update archive adds several configuration files to the Stargate /etc folder tree. You can download this file to your PC and then use scp (secure copy) to copy it to the Stargate / folder as follows: Open Cygwin shell on PC –...
Page 20
“Database Server Configuration” dialog box. 2. Enter the IP address of the Stargate into the “Server” field and click “Connect”, this will populate the “Table Name” drop down list with the available results tables. 3. Select the results table you wish to view from the “Table Name” drop down list and then click on “Apply”...
Page 21
3.2.5 PostgreSQL Automated Database Replication Depending on the type of remote access connection you have setup for the Stargate, i.e. high speed 802.11 vs. low speed Cellular Modem, it may be desirable to configure automatic PostgreSQL replication. This is especially true when connecting remotely to the sensor database using MOTE- VIEW.
Page 22
/tmp/mytable-2005-05-20-12-38.txt /tmp/mytable-2005-05-20-14-07.txt Each time a file is created on the remote server the xfer-driver.sh script running on the Stargate will sleep for 2 hours. This value can be changed by editing the xfer-driver.sh script and re-starting it. Linux Host Configuration The Linux host end of the replication scheme completes the database replication by taking the .txt...
Page 23
Stargate Developer’s Guide The first step is to make sure you have PostgreSQL installed and running on the Linux host. The next step is to take a ‘snapshot’ of the Stargate database and copy it to the Linux host as follows: Open a command console on the Stargate –...
Page 24
Wireless Sensor Networks $ cd /lib $ ln -s libdb.so.3 libdb.so2 Edit the /etc/hosts file and make sure there is an entry for the Stargate IP address similar to the following but using your specific IP address: 192.168.2.3 Stargate Stargate.domain Modify the Apache default configuration to fix the cgi-bin path.
Example: $ ln –s /etc/init.d/myprog /etc/rc2.d/S99myprog The Stargate will then run the /etc/init.d script with a relative startup priority of 99. The links with 01 run first, and so on. 3.4 Programming Motes The Stargate can be used to download programs onto motes via the on-board connector in a similar manner to the MIB510 &...
3.5 Setting the System Clock The Stargate does not have a battery backed clock so the date and time are reset back to 1970 when the unit is powered down. If you have the Stargate configured with Internet access the /mnt/cf1/cfcard.rc script that runs on boot-up will set the correct date and time using the ntpdate...
4 Developing and Running Applications on Stargate 4.1 Installing and Using the GNU tool chain The CDROM shipped with the Stargate Processor Board, contains the GNU cross platform development tools, version 3.3.2, for the Linux Host platform only. The zipped tool chain archive file, cross-3.3.2.tar.gz, shipped with the CDROM, is available at the following directory: <CDROM>/8160-0025-14_A/tools/...
Page 28
Stargate Developer’s Guide Wireless Sensor Networks A template for starting application development is provided in the CDROM shipped with the Stargate Processor Board, in the apps/sample/template/ directory. A number of sample test programs are provided to serve as examples for application development and verify the correct installation/configuration of the tools on the Host Computer and working of the various devices on the Stargate Platform.
5 Creating a Linux boot image 5.1 How to build the Bootloader from Source The Bootloader for the Stargate Development Platform is based on the Bootloader for the IPAQ Bootloader, version 2.21.13, with appropriate changes. The Bootloader has been enhanced to provide TFTP download capability for installing Kernel and Root File system modules using the Ethernet from a TFTP server.
Page 30
We are only providing here the concise directions to rebuild the image as configured and shipped with the Stargate Development Kit. After you have copied the sources, you need to make sure you have no stale object files and dependencies from previous builds.
In this section we will go through the steps needed to obtain, configure, build and load the device driver modules for Linux OS in general and the Stargate board’s kernel in particular. We will do this using an example of a driver for a Webcam, the Logitech Pro 4000, which contains the Phillips chipset.
However, should you need to remake the file system, follow the following steps. 1. Get the sources for root file system of the factory image of Stargate. The kernel sources are available in the following directory: <CDROM>/8160-0025-14_A/sources/root_fs/ 2.
Page 33
5.5.2 Kernel and File System Using Serial port After the Stargate board is reset and the Bootloader boots up the board, you will see the following message on the console (from either HyperTerminal or Minicom) Press Return to start the OS now, any other key for monitor menu type "?"...
Page 34
Stargate Developer’s Guide Wireless Sensor Networks it by pressing the Spacebar. The Xmodem upload menu comes up indicating the progress of the transfer. NOTE: The board waits for about 10 seconds for the transfer to start and after that it times out. So, if you see that no transfer is occurring, that is probably the reason.
Page 35
If you want to manually setup your IP configuration and save it, enter the following bootloader commands at the prompt. You would have to obtain the IP address (ipaddr) for your Stargate from your Network Administrator. The Network Address mask (netmask) and the Gateway IP address (gateway) are site specific and may be obtained from the Network Administrator.
Page 36
After receiving file, will automatically uncompress .gz images loading flash region kernel using tftp IP: 10.1.1.171 netmask: 255.255.255.0 gateway: 10.1.1.221 Boot server: 10.1.1.46 TFTP loading 'stargate/zImage' to a0000400 eth addr: 00:b0:d0:4c:f2:74 TFTP from server 10.1.1.46 Filename 'stargate/zImage'. Load address: 0xa0000400...
Page 37
Drivers and Applications via Ethernet or Serial There are two ways to copy files to a Stargate board, after it has been properly initialized with the Kernel and the File System: The zmodem protocol can be used to transfer files to the board, via the serial port.
Page 38
Stargate Developer’s Guide Wireless Sensor Networks If you want to copy the files from Stargate itself, you would have to enable a secure shell, ssh, connection on your host machine. The following command can be used: scp user@domain:<location>/modules.tgz /lib/modules/ The command scp means secure shell copy.
Wireless Sensor Networks Stargate Developer’s Guide Linux Console Commands 6.1 cd – change directory (folder) The cd command is used to change the current folder. Example: $ cd /usr/lib 6.2 ls – list files The ls command is used to list the files located in the current folder.
6.7 date – set system date & time The date command is used to set the system date & time. The Stargate date is not battery backed like a PC so it must be set each time after the system is booted.
Comments ON-OFF When only Stargate Processor Board is used. When both the Stargate Processor Board and the Daughter Card are used, it should be ON at all times. ON-OFF When both the Stargate Processor Board and the Daughter Card are used.
Page 43
Wireless Sensor Networks Stargate Developer’s Guide 7.1.5 Connector Information Table 2. Mote Connector Pinouts Description Description GP25_M-UART_RXD0 Not Used GP26_M-UART_TXD0 GP8_M-INT3 GP65_M-PW0 GP6_M-INT2 GP66_M-PW1 GP1_M-INT1 GP67_M-PW2 GP0_M-INT0 GP68_M-PW3 GP9_M-BAT-MON GP69_M-PW4 GP29_M-LED3 GP70_M-PW5 GP28_M-LED2 GP75_M-PW6 GP27_M-LED1 GP74_M-ADC7_JTAG_TDI Not Used GP73_M- ADC7_JTAG_TDO...
Programmer swsup/jflashmm.htm 7.3 Community Resources There is a large community of Stargate users and developers who can be reached via a mailing list. For more information refer to the following URL: http://www.cens.ucla.edu/mailman/listinfo/stargate-users Page 44 Doc. # 7430-0317-13 Rev. B...
Stargate Developer’s Guide Wireless Sensor Networks 8 Appendix B. Support and Warranty Information 8.1 Customer Service As a Crossbow Technology customer you have access to product support services, which include: • Single-point return service • Web-based support service • Same day troubleshooting assistance •...
Wireless Sensor Networks Stargate Developer’s Guide 8.3.2 Identification and Protection If the equipment is to be shipped to Crossbow for service or repair, please attach a tag TO THE EQUIPMENT, as well as the shipping container(s), identifying the owner. Also indicate the service or repair required, the problems encountered, and other information considered valuable to the service facility such as the list of information provided to request the RMA number.
Page 52
Crossbow Technology, Inc. 4145 N. First Street San Jose, CA 95134 Phone: 408.965.3300 Fax: 408.324.4840 Email: info@xbow.com...