background image

 

 

 

 

 

Stargate Developer’s Guide

 

Rev. B, January 2006 

Document 7430-0317-13 

Summary of Contents for Stargate

Page 1: ...Stargate Developer s Guide Rev B January 2006 Document 7430 0317 13 ...

Page 2: ...ormation in this document is subject to change without notice Crossbow and SoftSensor are registered trademarks and DMU is a trademark of Crossbow Technology Inc Other product and trade names are trademarks or registered trademarks of their respective holders ...

Page 3: ...4 3 3 Starting Programs during System Boot up 23 3 4 Programming Motes 23 3 5 Setting the System Clock 24 4 Developing and Running Applications on Stargate 25 4 1 Installing and Using the GNU tool chain 25 4 2 Running Applications 25 5 Creating a Linux boot image 27 5 1 How to build the Bootloader from Source 27 5 2 How to rebuild the Linux Kernel Image 27 5 3 How to add new device driver modules ...

Page 4: ...ve network interfaces 38 6 10 iwconfig show the active wireless network interfaces 38 6 11 pump show the active wireless network interfaces 39 7 Appendix A References 40 7 1 Hardware 40 7 2 Software 44 7 3 Community Resources 44 7 4 Mechanical Drawings 45 8 Appendix B Support and Warranty Information 46 8 1 Customer Service 46 8 2 Contact Directory 46 8 3 Return Procedure 46 8 4 Warranty 47 ...

Page 5: ...ative as well as TinyOS based Wireless Sensor Networks and Smart Dust Technology 1 1 Stargate Features Figure 1 Stargate Development Platform Processor Board and Daughter Card Small form factor 3 5 2 5 32 bit 400 MHz Intel PXA255 XScale RISC processor SA1111 StrongARM companion chip for multiple I O access 32 MB of Intel StrataFlash 64 MB of SDRAM 1 Type II CompactFlash slot 1 PCMCIA lot Reset but...

Page 6: ...n source code with instructions on how to build and install them A Bootloader for initial loading of the kernel and file system images A flash programmer utility for programming the flash ROM GNU cross platform development tools System configuration support file archives 1 3 Potential Applications The Stargate processor board has a wide variety of applications such as A single board computer runni...

Page 7: ...rocessor board The Stargate daughter card A null modem cable for serial RS 232 connection A CDROM A wall power DC adaptor supply The Stargate Developer s Manual Factory installed Linux image in flash with a number of driver modules for common devices 2 1 2 The Advanced Stargate Development Kit This advanced kit contains the following items in addition to items in the basic Kit A USB webcam A 802 1...

Page 8: ...2 Hardware Layouts Figure 2 SPB400CB Processor Board Top View Figure 3 SPB400CB Processor Board Bottom View PCMCIA Slot Li Ion Battery Connector Daughter Card Connector Compact Flash Card Slot 51 pin Mote I O Connector Software Reset Button S2 Power Switch S1 Hardware Reset Button SW3 ...

Page 9: ...atform 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 2 4 Verify successful setup on terminal console To configure and boot the Stargate platform complete t...

Page 10: ...m included in most Linux distributions It is used to communicate with the Stargate board To configure Minicom complete the following steps 1 Log in as root on your Linux host machine 2 Type minicom s The Minicom configuration menu appears 3 Select Serial port setup Configure Minicom to use the tty port that is connected to the target for example dev ttyS0 com1 115200 baud 8 data bits No parity and...

Page 11: ...o access the console port for Stargate 2 4 4 Powering Up the Stargate If you are using an external power supply you could use the power supply adapter provided with the Development kit Connect the DC input of the AC wall power adapter to the J49 connecter on the daughter card If you are using a Li Ion battery pack there are 2 usage models If both Stargate Processor Board and the Daughter Card are ...

Page 12: ...bank 00000001 seems to be no dram in bank 00000001 n_banks 00000001 dram_sizes 0 04000000 dram_sizes 1 00000000 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 Cpu Architecture XScale Cpu Part PXA255 ARM Processor Rev 00050000 c 2000 2...

Page 13: ...inux OS boots up automatically Note that the configuration parameters may be different for your board due to unique assignment of the MAC address The following message is seen during Linux Bootup booting flash booting kernel from partition kernel kernel partition base 50080000 kernel_magic E1A00000 kernel_region_words 9 016F2818 Linux ELF flash_imgstart 50080000 size 000C0000 dest A0000000 offset ...

Page 14: ...orage USB Mass Storage support registered stargate login 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 Now you are ready to use the Stargate platform ...

Page 15: ...ap Ethernet HWaddr 00 50 C2 2F 3B 31 inet addr 192 168 2 3 Bcast 192 168 2 255 Mask 255 255 255 0 UP BROADCAST RUNNING MTU 1500 Metric 1 RX packets 39931 errors 0 dropped 14 overruns 0 frame 0 TX packets 1646 errors 0 dropped 0 overruns 0 carrier 0 collisions 10 txqueuelen 100 RX bytes 12777054 12 1 MiB TX bytes 0 0 0 b Interrupt 26 The ifconfig command shows the current configuration of the ether...

Page 16: ...tabase and Xlisten Xlisten is a Crossbow supplied program that attaches to the serial port attached through the Mote connector Its purpose is to listen for incoming sensor data messages and log them to the PostgreSQL database The application server can then be accessed remotely using MOTE VIEW to view the sensor data Other server software that can be installed includes the Apache web server for we...

Page 17: ...gate is rebooted PostgreSQL and Xlisten will start up automatically There is a bootup script file named cfcardapps in the etc init d folder that checks for the presence of the CF card and automatically starts the applications if they are present on the card 3 2 2 AmbiCom Wave2Net Wireless 802 11 Compact Flash Card To provide a short to medium range high speed remote access link to the Stargate the...

Page 18: ...s Point To enable managed mode make sure the wireless opts file is as follows AmbiCom 802 11 Card INFO AmbiCom ESSID Id MODE Managed CHANNEL 6 RATE 11M KEY 1234 1234 12 open 3 2 3 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 essen...

Page 19: ... Open a console session on the Stargate and unarchive the support files as follows cd tar zxvf CellModem tar gz etc ppp chap secrets etc ppp options etc ppp pap secrets etc ppp peers etc ppp peers ac555chat1x etc ppp peers ac555 1x etc ppp peers ac555qnc etc ppp peers ac555chatqnc etc ppp resolv conf etc pcmcia aircard555 conf etc pcmcia cis aircard555 cis etc pcmcia cis aircard555 dat etc init d ...

Page 20: ...on status of the PPP service using the following command ifconfig ppp0 ppp0 Link encap Point to Point Protocol inet addr 166 139 23 78 P t P 66 174 217 7 Mask 255 255 255 255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU 1514 Metric 1 RX packets 4 errors 0 dropped 0 overruns 0 frame 0 TX packets 5 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 3 RX bytes 64 64 0 b TX bytes 94 94 0 b ...

Page 21: ... can then connect to the replica database using high speed connection PostgreSQL does not have a built in replication feature so Crossbow has devised an ftp file transfer protocol based replication scheme The basic idea is to install and configure a script on the Stargate that takes a snapshot of the database periodically and transfers the new records as an ASCII file export to a remote Linux serv...

Page 22: ...to transfer files 250 Directory successfully changed local tmp mytable 2005 05 20 14 07 txt remote tmp4008 227 Entering Passive Mode 192 168 2 50 56 228 150 Ok to send data 226 File receive OK 38752 bytes sent in 0 02 secs 1858 3 kB s 350 Ready for RNTO 250 Rename successful local tmp test script sh remote new script sh 227 Entering Passive Mode 192 168 2 50 230 215 550 Failed to open file 221 Goo...

Page 23: ...propriately The TABLE symbol needs to match the TABLE symbol used in the do file xfer sh script running on the Stargate To start the Linux host end of the database replication open a command console on the Linux host and execute the following cd etc init d insert pgsql sh COPY INSERT 0 2 This script will check for txt files uploaded into the tmp folder every 2 hours default and insert the records ...

Page 24: ...e Apache web server to test etc init d apache start Start a web browser session and enter http Stargate IP address index html you should see the default Apache web page appear The web root is located in home apache public_html CGI applications can be placed into the home apache cgi bin folder to provide dynamic application content 3 2 7 Java Runtime This section describes how to add the ability to...

Page 25: ... background task then continue The dev null redirects the standard output to the null device The 2 1 sends the standard error output to the null device as well via standard out Re directing the program output to the null device prevents messages from appearing on the console screen 2 Create a link to the script you just created to etc rc2 d The name of the link tells the command processor what ord...

Page 26: ... wr_fuse_e ff erase upload if main srec out 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 service To set the Stargate clock manually ...

Page 27: ...nstall the tools on your Host machine in the usr local arm 3 3 2 directory Add the path to the directory containing the binaries for the tools in your environment variable PATH The following command can be used on the bash shell export PATH PATH usr local arm 3 3 2 bin Alternatively this line can be added in your shell configuration file such as HOME bashrc for bash shell You are now ready to buil...

Page 28: ...clude an Hello World application a networking application a file system application a webcam video capture application a Mote application They are present in the apps sample directory on the CDROM For more details on these applications refer to the README file in each of these application directories In addition to the sample applications some shareware open source applications are provided to aid...

Page 29: ...dr You can program this image on to your Stargate board by following the directions provided in section 5 5 1 5 2 How to rebuild the Linux Kernel Image The kernel image file zImage has been provided with the release distribution in the CDROM shipped with the Stargate Processor Board in the following location CDROM 8160 0025 14_A images zImage Source code for the kernel with appropriate patches app...

Page 30: ...targate Development Kit After you have copied the sources you need to make sure you have no stale object files and dependencies from previous builds To change to the Linux sources directory and enter the following command make mrproper You now have the sources correctly installed to configure and compile a new kernel image The default configuration for Stargate is installed by entering the followi...

Page 31: ...need to be copied in the appropriate directory in the Linux sources distribution copied installed in the Host machine In this example the source files need to be placed in the directory Linux Kernel drivers usb 3 If there are source files provided in the driver distribution after copying the source files execute the following command to configure the Kernel build process to include the required dr...

Page 32: ... should be able to use the root jffs2 file provided 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 Extract the root file system while logged in as root on the machine This is important because some o...

Page 33: ...255 dat and the bootloader binary bootldr are in the same directory as the flash programming utility JflashMM exe To program the flash use the following command C Flash JFLASHMM DBPXA255 BOOTLDR 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...

Page 34: ...rgv 1 define defining partition root Next save this information in the Bootloader parameter section by entering the following command partition save You will see the following message confirming the action argv 1 save programming flash erasing Erasing sector 00040000 writing flash addr 00040000 data 646C7470 verifying done Now we verify if the partitions are created properly by entering the follow...

Page 35: ...bootloader prompt It is essential to assign a MAC address to the Stargate for proper functioning of the Networking features set macaddr 00 50 C2 2F 3X YZ params save loadmacaddr Substitute the F X and Z with the appropriate numbers from the label on your Stargate Processor board This sets the address saves it to the flash parameter area and loads the Ethernet chip with the indicated address NOTE T...

Page 36: ...d to make this permanent The Kernel is loaded by entering the following command load kernel At the end of the output for the TFTP transaction is a checksum that is used to ensure that the file is copied reliably For example after loading the Kernel you would see the following message boot load kernel After receiving file will automatically uncompress gz images loading flash region kernel using tft...

Page 37: ...opriate filename Set Protocol to Zmodem Click on the Send button This will start the transfer After the transfer completes you should be able to see the file in the current directory by doing an ls for list files 2 A faster method is to transfer the files is using the secure copy program scp For this you need to be connected to the network Check that the board has an IP address by typing the follo...

Page 38: ...430 0317 13 Rev B 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 ...

Page 39: ...en Unix Linux based environments This example will copy all matching files in the current folder to the folder on the remote machine located at address 192 168 2 3 using the remote user root you will be prompted for the remote user root password the command will then complete scp tgz root 192 168 2 3 usr src 6 5 ps list current processes The ps command is used to list the currently running process...

Page 40: ...gate to ensure the integrity of the file system This example will shutdown the Stargate immediately to prepare for a power off or reset shutdown h now 6 9 ifconfig show the active network interfaces The ifconfig command is used to show the parameters of one or all active network interfaces The ifconfig command can also be used to start and stop an interface This example shows the status of the eth...

Page 41: ...f Fragment thr off Encryption key 1234 1234 12 Security mode open Power Management off Link Quality 53 1 Signal level 61 dBm Noise level 100 dBm Rx invalid nwid 0 Rx invalid crypt 0 Rx invalid frag 0 Tx excessive retries 0 Invalid misc 0 Missed beacon 0 6 11 pump show the active wireless network interfaces The pump command is used to acquire an IP address dynamically for a particular network inter...

Page 42: ... Processor Board and the Daughter Card are used 7 1 2 Reset buttons Name Function SW3 Hardware Reset Button S2 Software Reset Button 7 1 3 Jumper Settings Jumper Settings 1 2 5v PCMCIA J12 2 3 3 3v PCMCIA 1 2 5v Compact Flash Card J13 2 3 3 3v Compact Flash Card 1 2 External Power Supply J8 2 3 Li Ion Battery Pack 7 1 4 LEDs LED Color Where Comments DS3 Green Daughter Card Switched ON when a netwo...

Page 43: ... PW4 8 GP29_M LED3 34 GP70_M PW5 9 GP28_M LED2 35 GP75_M PW6 10 GP27_M LED1 36 GP74_M ADC7_JTAG_TDI 11 Not Used 37 GP73_M ADC7_JTAG_TDO 12 Not Used 38 GP72_M ADC7_JTAG_TMS 13 Not Used 39 GP71_M ADC7_JTAG_TCK 14 GP76_M PW7 40 Not Used 15 GP24_M USART1_CLK 41 Not Used 16 GP25_M UART_RXD0 42 Not Used 17 GP26_M UART_TXD0 43 Not Used 18 GP23_M SPI_SCK 44 Not Used 19 IRTXD_M USART1_RXD 45 Not Used 20 IR...

Page 44: ...RD 8 SA_D13_D_CARD 34 SA_NWE_D_CARD 9 SA_D12_D_CARD 35 SA_NOE_D_CARD 10 SA_D11_D_CARD 36 SA_NCS 3 _D_CARD 11 SA_D10_D_CARD 37 5V_PWR_JACK_D_CARD 12 SA_D9_D_CARD 38 SA_A4_D_CARD 13 SA_D8_D_CARD 39 SA_A3_D_CARD 14 GND 40 SA_RDY_D_CARD 15 SA_D7_D_CARD 41 SA_A2_D_CARD 16 SA_D6_D_CARD 42 GP61_D_CARD 17 5V_PWR_JACK_D_CARD 43 FF_RI_D_CARD 18 SA_D5_D_CARD 44 FF_TXD_D_CARD 19 SA_D4_D_CARD 45 FF_RTS_D_CARD ...

Page 45: ...XD 9 SA_D5 35 FF_RI 10 5V_PWR_JACK 36 GP61 11 SA D6 37 SA_A2 12 SA_D7 38 SA_RDY 13 GND 39 SA_A3 14 SA_D8 40 SA_A4 15 SA_D9 41 5V_PWR_JACK 16 SA_D10 42 SA_NCS 3 17 SA_D11 43 SA_NOE 18 SA_D12 44 SA_NWE 19 SA_D13 45 JTAG_TCK 20 SA_D14 46 JTAG_TMS 21 SA_D15 47 SA_TDO 22 VCC3_3 48 TDI 23 USB_PWRCNTL 49 JTAG_NTRST 24 USB_PWR_SENSE 50 GND 25 USB_PLUS 51 ENET_HW_SLEEP 26 USB_MINUS Table 5 Edge Connector P...

Page 46: ...ware URL for more information Linux Kernel ftp ftp arm linux org uk pub linux linux 2 4 GNU Tools ftp ftp arm linux org uk pub armlinux toolchain Linux Drivers http www linuxdevices com http linuxdrivers foundries sourceforge net http www linuxvoodoo com Misc Linux http www embedded linux org Bootloader http www handhelds org Misc Stargate http platformx sourceforge net Flash Programmer http www i...

Page 47: ...Stargate Developer s Guide Wireless Sensor Networks Doc 7430 0317 13 Rev B Page 45 7 4 Mechanical Drawings All dimensions are in inches ...

Page 48: ...lable Preventative maintenance and repair programs Installation assistance available 8 2 Contact Directory United States Phone 1 408 965 3300 8 AM to 5 PM PST Fax 1 408 324 4840 24 hours Email techsupport xbow com Non U S refer to website www xbow com 8 3 Return Procedure 8 3 1 Authorization Before returning any equipment please contact Crossbow to obtain a Returned Material Authorization number R...

Page 49: ...ng around all sides of the equipment If the original shipping containers were discarded use heavy boxes with adequate padding and protection 8 3 3 Sealing the Container Seal the shipping container s with heavy tape or metal bands strong enough to handle the weight of the equipment and the container 8 3 4 Marking Please write the words FRAGILE DELICATE INSTRUMENT in several places on the outside of...

Page 50: ......

Page 51: ......

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 ...

Reviews: