FAQ - Wireless Software

285 - What does the "-I%T" stand for in Makefile? Which directory/path it refers to?

The "-I%T" is short hand for the compiler to include (thus the -I) the files from the pathname defined as TOSDIR. Usually this path is to the <install dir>/tinyos-1.x/tos/ directory. If it's just a "-I", then that means to include files relative to the current location where the compiling is taking place.

288 - How do I set the MICA2's radio transmission strength in TinyOS?

Method 1: Using the "CC1000Control" interface
1. Wire to the CC1000Control interface in CC1000RadioC.
2. Call CC1000Control.setRFPower(<hex value>) in which "<hex value>" is a hex number with the desired power level as per the CC1000 datasheet on page 29. The output power dB changes with frequency, so check the table on page 29 to pick your desired output RF power.


Method 2: Use MakeXbowlocal, that is, when using Crossbow's applications in tinyos/cygwin/opt/tinyos-1.x/contrib/xbow/apps/.

289 - How do I set the fuses on the ATmega processor on the motes?

For MIB510 users: To reset the fuse type in the lines (a) and (b)

(a) uisp -dprog=MIB510 -dserial=COM1 -dpart=ATmega128 --wr_fuse_h=0xd9
(b) uisp -dprog=MIB510 -dserial=COM1 -dpart=ATmega128 --wr_fuse_e=0xff

assuming the MIB510 is connected to serial port COM1; otherwise, change to the appropriate COM port.

290 - How long will the MICA2 motes work with AA batteries?

Crossbow has done an experiment to find out how long a MICA2 will function powered with two AA batteries.

The experiment was to have motes programmed with the TinyOS (v 1.1.0) application CntToLedsAndRfm, which transmitted a TOS packet once every four seconds. A listening basestation 30 meters away monitored the radio signals. The tests were run in an indoors, office enviroment.

The tests showed that the motes lasted for 172 hours or about 85% of the rated capacity of the AA batteries. Furthermore, the MICA2 motes continued to work until they reached about 2.1 V.

When an 85% efficient battery booster was used, the MICA2 motes continued to work another 5 hours (4%).

More details on this experiment can be found at http://www.xbow.com/Support/Support_pdf_files/MICA2_BatteryLifeTest.pdf

291 - What is a Makelocal file, why is it useful, and where do I save it?

A Makelocal file is useful for TinyOS users and programmers. A Makelocal file is used to store the variables in your custom programming environment. Variables such as your motes frequency, your group ID, the programming board that you are using, and any custom code that you want to include during compile or build time.

An example of it's usefulness is that you may be wondering why your motes cannot communicate even though they have passed MicaHWVerify and the application was successfuly built and downloaded. Often times, the mote's frequency were not properly set and so having your mote's frequency listed in the Makelocal file will eliminate the possibility that you have incorrectly set the motes TX/RX frequency.

There is a lesson/tutorial at the TinyOS website which talks about the Makelocal and give an example. The lesson is at http://www.tinyos.net/tinyos-1.x/doc/tutorial/buildenv.html.

For convenience an example Makelocal file is given below (in between the ------ lines)

------DON'T INCLUDE THIS LINE IN YOUR MAKELOCAL FILE-----------

# Makelocal File

# For adding a search path for code.
PFLAGS += -I%T/../beta/MyBetaCode

# For setting your local/active message group ID
DEFAULT_LOCAL_GROUP = 0x33

# For setting your motes frequency.
# IMPORTANT: We recommend that you use one of the variable names found
# in tos/platform/mica2/CC1000Const.h
# NOTE: the value after = is ONLY a variable name, not an actual number.
CFLAGS = -DCC1K_DEFAULT_FREQ=CC1K_915_998_MHZ

# For setting the type of mote interface board and COM port.
MIB510=COM1

------DON'T INCLUDE THIS LINE IN YOUR MAKELOCAL FILE-----------

The above Makelocal file adds a search path for code in ../../beta/MyCode, defines the default Group ID to be 0x33, sets the frequency to one of preset frequency variables in the CC1000Const.h file, for the MICA2/DOT-series motes, and sets the default programmer as an MIB510 attached to your computer's serial port COM1.

WARNING! - The MakeXbowlocal file and Makefile cannot exist at the same time or you will receive an error during programming. Make sure to rename one of these files to avoid this problem.

293 - What is the advantage of using TinyOS when compared to an RTOS like Salvo?

TinyOS...
- is made for ad-hoc, mesh networking of wireless sensors
- is designed with low-power sensors, processors, and radios in mind
- is open source
- has a redundant, fault-tolerant architecture
- provides software development tools for customization

294 - What does "CRC" mean and how is it used in a TinyOS message?

The CRC or cyclical redunancy check is used to ensure the integrity of the packet and check for bit errors, especially in the case when a packet is successfully received. The CRC itself is always a 2 byte code. The CRC bytes are the last two bytes of the packet

Let's say that this is a packet that you've received:
7E 42 FF FF 00 11 1D 81 02 01 00 B9 07 B0 07 BE 07 B5 07 7F 00 FF 01 FF
03 00 00 00 00 00 00 00 00 00 00 00 55 86 7E

The CRC in this case is "55 86" which are the third and second to last bytes. (NOTE: The "7E" is the framing byte used to signal the end of the packet. Answer ID #514 details the contents of a TinyOS packet.)

A CRC is calculated by XORing the current byte with a shifted CRC accumulator. The code to calculate a CRC follows:

uint16_t xcrc_byte(uint16_t crc, uint8_t b)
{
uint8_t i;

crc = crc ^ b << 8;
i = 8;
do
if (crc & 0x8000)
crc = crc << 1 ^ 0x1021;
else
crc = crc << 1;
while (--i);

return crc;
}

int xcrc_calc(char *packet, int index, int count) {
int crc = 0;

while (count > 0) {
crc = xcrc_byte(crc, packet[index++]);
count--;
}
return crc;
}
 

295 - Is there a way for me to figure out exactly what files were included in the build process?

You can determine what files are including by adding the following line to the local app/makefile:

NESC_FLAGS = -Wnesc-all -v

When building your application, type in

make mica2 > & tmp.txt

or

make mica2dot > & tmp.txt

This will pipe the make output to a text file called "tmp.txt". Then you can open that tmp.txt file to find out what files were included in the build.

296 - How do I find out the version of the tools and TinyOS I have on my system?

Open a Cygwin window.
Type: rpm -qa

An example output is below:

jsuh@jsuh-dell /
$ rpm -qa
tinyos-tools-1.1.0-internal4.1
task-tinydb-1.1.0-internal4.1
tinyos-vm-1.1.0-internal4.1
avr-libc-20030512cvs-1w
avarice-2.0.20030825cvs-1w
nesc-1.1-1w
tinyos-contrib-1.1.0-1
tinyos-1.1.5Mar2004cvs-1
nesc-1.1pre4-2w
tinyos-contrib-1.1.0-internal4.1
avr-binutils-2.13.2.1-1w
avr-gcc-3.3tinyos-1w
avr-insight-pre6.0cvs.tinyos-1w
tinyos-tools-1.1.0-1
task-tinydb-1.1.0-1
tinyos-vm-1.1.0-1

297 - Can I use tinyos Cygwin to run Stargate?

Yes, it is possible to use Cygwin on Windows platform to compile stargate applications. However, the GNU tools we currently provide for stargate are for Linux only. The GNU tools for cygwin are still under development.

299 - How do I change the radio data rate (baud rate) of MICA2?

The Radio Baud Rate is set by a variable called "CC1K_BAUDRATE" in CC1000Const.h file found under tinyos\cygwin\opt\tinyos-1.x\tos\platform\mica2.

300 - What type of security do you use (e.g. encryption, authentication)?

TinyOS contains security encryption that is not enabled by default. Since this is an open source, the users can develop and implement their own security protocols or enable the existing protocol.

302 - Is there a user's help/mailing list for TinyOS?

You can search the tinyos mailing list archives from the search page
here:

http://www.tinyos.net/search.html

This is the link to the search page on the tinyos support page. You may also find it on most of the tinyos pages in the upper
right-hand corner; look for the "I Want to Search the TinyOS Mail
Archives" link.

304 - Is it possible to use if-else types constructs in the nesC code?

Yes. In addition to the syntax added to nesc to support the network-sensor programming and execution models (e.g., "async," "atomic," "call," "command," "component," "event," "implementation," "module," "signal," "task," etc.), you can use any standard C syntax. After nesC preprocessing, the preprocessed file is passed on to the avr-gcc compiler.

305 - How can I be sure to get comma deliminated data using XListen?

Type in

xlisten -xr

to force the XListen program to export raw data into you log file.

For example, if you typed in

xlisten -xr > mts310_results.csv

then you could open the file "mts310_results" with MS Excel.

307 - I am using a European version of Windows and my Mote-View display does not appear. What causes this problem and how do I solve it?

Mote-View currently cannot support international times or characters in the database. The user needs to switch their system to use American time stamps(AM/PM).

To do this, go to Start>Settings>Control Panel>Regional and Language Options and from Regional Options and Advanced tab select English(United States). Reboot the PC, Run "resetdb.cmd" from \Program Files\Crossbow\MoteView and then run MoteView.

308 - Surge-View provides link quality information such as quality, yield and prediction. What do these terms mean and how are they determined?

The Quality, Yield and Prediction are determined using the equations below.

Yield = # packets received at base / # packets sent
Quality = # packets sent or received at parent / # packets sent or received
Prediction = Quality1 * Quality2 * ... * QualityN (for all hops to base)

309 - What are the XMesh utilities?

XMesh is Crossbow's multihop mesh networking stack that has various options including low-power listening, time synchronization, sleep modes, any-to-base and base-to-any routing. All of our sensor and data acquisition boards are supported with XMesh enabled applications.

310 - 1). Is there any clock inside the MICAZ like the system PC? 2). How do I determine the time of the MICAZ, if it is connected to the system PC.

1) Unlike PCs there is no year, month, day, hour, minutes clock in the MICA series. However, there is a 32-bit timer TOS service: Look at the LogicalTime.nc component.

2)You could use an application such as TOSBase to communicate TOS packets between a MICA mote and a PC over a COM port. Thereby putting a time stamp on the incoming packet however you should be aware of communication and driver latencies in the PC.

312 - I keep getting a series of flash errors while programming my motes. What is causing this?

The most common cause is either incorrectly specifying the frequency or the COM port while programming.

Your command line should be similar to the following:

"make mica2 install mib510,com1"

Pay particular attention to spacing and make sure that the letters are all lower case. In addition, you should check your MakeXbowlocal file to verify that the frequency selection is correct for the motes that you are trying to program.

313 - What JTAG programmer do you recommend for use with the MIB510?

Crossbow does not offer JTAG support for use with our programming boards, however most TinyOS users use either MK1 (old style) or (much cheaper) the www.olimex.com unit, as sold in the USA by www.sparkfun.com electronics - look under ATMEL program/developer tools. It costs approximately $50.

316 - When trying to log data with Mote-View, I receive an error that states "cannot open database". What is the cause of this error and how can I resolve it?

The error can be a result of one of the following items:

1) Not having sufficient privelages(full administrative access) or having security software that prevents the installation of the PostgreSQL database.
2) Not having "Password Never Expires" checked under system settings.

In order to install PostgreSQL properly, please ensure that you have full administrative access and all security software is disabled. In regards to the password expiration setting, please follow these steps;

From Control Panel, Admin Tools > Computer Management > Local Users and Groups > Users, look for postgres. Right click and chose Properties. Under General tab, check on "Password never expires".

317 - What is the difference between TinyOS and MoteWorks?

The MoteWorks has the following advantages over TinyOS apps available under open source.
1. Faster network formation time (5x improvement)
2. Enhanced data transfer rate (success rate went up from <80% to >95%)
3. IDE-like interface for compiling/debugging
4. GUI interface for programming (both UART based as well as over the air programming (OTAP))
5. XML interface via Xserve 2.0 for enterprise connectivity
6. API interface to proven XMesh routing stack (upstream and downstream).
7. Multiple topology support (Star, TrueMesh and Hybrid-Star)
8. One-click installer for quick start (vs. multiple install steps).
9. Plug and Play support for entire Crossbow hardware suite.
10. Crossbow's technical support for bug fixes and enhancement requests.

318 - What level of Zigbee support is included with MoteWorks?

The MoteWorks 2.0 will only have XMesh interoperability with ZigBee. Full ZigBee profile for Wireless Sensor Networks will be available in the future release.

396 - I have been looking and experimenting on the packet rate of the MICA2 motes for quite some time. I have concluded that given the current MAC layer of TinyOS a mote can transmit about 8 to 10 packet/second. There is an advertised speed on the TinyOS website claming 53 pkts/sec max rate. At first I believed that this is on a per mote basis; however, it seems more logical that this number is not the speed of a single mote but the amount of packets/second a TinyOS network can handle with infinite number of motes. Is that correct?

The 53packets/sec is the theoretical maximum.

To make your mote achieve 50-53packets/sec, set the MAC delay to 0. There are plans to expose this via a "MacControl" interface in the future.

With more than 1 mote, you should be able to saturate the channel with no problem with TinyOS 1.1.3. We have had others confirm this.

424 - We are designing signal conditioning for various sensors and we need to know the output impedance. Your specification sheet identifies Output Loading. It looks the same output impedance although I've never see it expressed along with capacitance in nF. Is it the same thing?

Output loading resistance (Rl) normally refers to the minimum load you should have on the sensor output to avoid creating voltage devider. The output loading capacitance (Cl) is the maximum capacitance you can have on the sensor output. If your load capacitance exceeds the recommended value, you may not get the full bandwidth of the device.

433 - According the format I could parse first part of the GPS packet as follow: 24 47 50 47 47 41 2C converts to $GPGGA, But I don't know how to translate the rest of data: 32 33 35 39 34 37 2E 39 39 39 2C 2C 2C 2C 2C 30 2C 30 30 2C 2C 2C 4D 2C 2C 2C 2C 30 30 30 30 2A 33 32 0D 0A

Under the NMEA-0183 standard, all characters used are printable ASCII text (plus carriage return and line feed). The data is transmitted in the form of sentences in which each sentence starts with a "$", a two letter talker ID, a three letter sentence ID, followed by a number of data fields separated by commas, and terminated by an optional checksum, and a carriage return/line feed.

A sentence may contain up to 82 characters including the "$" and CR/LF. The optional checksum field consists of a "*" and two hex digits representing the exclusive OR of all characters between, but not including, the "$" and "*".

Your example is a GGA sentence, its readble ASCII format is:

$GPGGA,235947.999,,,,,0,00,,,M,,,,0000*32(CR)(LF)

This is NOT a valid GGA packet. (Maybe the GPS receiver is indoors or you don't have the antenna attached.)

A more complete sample is provided as follows:

GGA - Global Positioning System Fix Data

$GPGGA,123519,4807.038,N,01131.324,E,1,08,0.9,545.4,M,46.9,M, , *42

> 123519 Fix taken at 12:35:19 UTC
> 4807.038,N Latitude 48 deg 07.038' N
> 01131.324,E Longitude 11 deg 31.324' E
> 1 Fix quality: where 0 = invalid, 1 = GPS fix, 2 = DGPS fix
> 08 Number of satellites being tracked
> 0.9 Horizontal dilution of position
> 545.4,M Altitude, Metres, above mean sea level
> 46.9,M Height of geoid (mean sea level) above WGS84 ellipsoid
> (empty field) time in seconds since last DGPS update
> (empty field) DGPS station ID number
> *42 (Optional) checksum in hexidecimal

Indeed, if data for a field is not available, the field is simply omitted, but the commas that would delimit it are still sent with no space between them. Since some fields are variable width, or may be omitted, the receiver should locate desired data fields by counting commas, rather than by character position within the sentence.

434 - Do you have a document that that maps Crossbow part names to descriptions that developers in the TinyOS community use? For example, what's the difference between a MIB510 and a MIB500? How does a mote relate to an MRP400 and MPR500? I think this would be a valuable resource for everyone. Thanks.

Crossbow has a "Smart-Dust Product Information Guide" at our website at Support>Application Notes (http://www.xbow.com/Support/Support_pdf_files/XBOW_Smart_Dust_ProductInfoGuide.pdf).

In addition to matching Crossbow's part names to the names used by the TinyOS developers, it has pictures and a high-level description of the products. It's categorized by sensor/data acquisition cards, motes, and gateways.

557 - What are the operating ranges for the Wifi card that you offer with Stargate?

Outdoor line of sight ranges are:

Low power Wifi - Ambicom WL1100C-CF
-1640ft max @ 1 Mbps
- 820ft @ 11 Mbps

High power Wifi - SMC2532W-B
- 2722 ft max

558 - I used the command `usetos tinyos` but I get the following error: plateforme@plateforme1 ~ $ `usetos tinyos` bash: /etc/profile.d/tinyos.sh: No such file or directory How do I fix this and interoperate between TinyOS and MoteWorks.

This is due to the fact that we don’t provide /etc/profile.d/tinyos.sh with MoteWorks installer.
We assume the user has it from a previous install of TinyOS-1.x.
You will find the missing file in the attachment that needs to be copied to /etc/profile.d directory. 

560 - I want to use the XSniffer GUI with the MIB600 gateway but I always get an error message. The XSniffer works fine with MIB510 and MIB520 gateways. How can I get Xsniffer working with MIB600?

You need to do the following:

1) Using Lantronix Device Installer you need to change the baud rate of the second serial port (Channel 2) on the MIB600 to be 115200. This is because XSniffer runs at a faster speed and MIB600 needs to be configured to that.

2) Then you start XServe your local machine and have it connect to the MIB600.
`xserve –i=[MIB600's IP address]:10002`

3) Finally you need to start XSniffer and connect to the XServe running on your local machine at port 9001 (i.e. localhost 9001).

561 - How to parse meaningful data from the MTS310_results table for a MTS300 sensorboard and get meaningful data from a MTS310 sensorboard from the MTS300_results table?

Please refer to the XServe manual for the packet contents of XMTS300 and XMTS310 apps

562 - Is there a way to store both MTS310 and MTS300 data to the database, different tables, at the same time? I was thinking of opening two applications of MoteView and trying to set one on the USB gatewayand one on the Serial gateway.

Yes, absolutely. The XMeshBase can receive data from multiple sensortypes and log them into their respective table. i.e. if you have a network of nodes that are programmed with XMTS300_xxx_yy.exe and XMTS310_xxx_yy.exe, the data from these will get logged to mts300_results and mts310_results tables respectively. You don't need two separate gateways (just one XMeshBase as a base station node). 

564 - Flash Memory Access and Sleep current issues with MPR2600 OEM modules

Affected product: MPR2600CA, part number 8350-0382-03 (PCBA 8040-0382-05) and MPR2400CA part number 8350-0334-09 shipped in March and April of 2007.

Problem Description: A small percent of the MPR2600 OEM modules and MPR2400CA hang up during Flash memory access operation. This is seen as freeze-out during OTAP-enabled local programming with MoteConfig.

Who does this apply: If you received MPR2600 OEM module and MPR2400 shipments in March/April 2007 and are either using Serial Flash or OTAP feature with them.

Root Cause: The suspected root cause of the problem is the Flash memory chip. When the MPR2600's were converted to be RoHS compliant, the RoHS-compliant flash memory chip used had an erase time of 75ms vs the 12ms for the earlier part. This increased delay seems to cause the Flash access routines to time out. Another symptom is that sleep current increased by 13 microamps when using this slower Flash chip.

Corrective action taken:
1. ECO to Revise BOM of MPR2600, PCBA (8040-0382-05) to incorporate correct flash memory chip.
2. Screen all the OEM module based radio products for the max sleep current and eliminate shipment of the units with the wrong part.

Work-around for the affected products in the field:
1) Rename /MoteWorks/tos/platform/mica2/HPLFlash.nc to HPLFlash.orig.nc
2) Save HPLFlash.fix.nc from the attachments into /MoteWorks/tos/platform/mica2/
3) Rename this new HPLFlash.fix.nc to HPLFlash.nc
4) Installation Complete

If you are using MoteConfig to OTAP-enable the Motes, please download the OtapGold_micaz.exe from the attachment and save it to \MoteConfig\GoldenImage folder.

566 - XMesh Low Power Current issues in MoteWorks 2.0.F

Problem Description:
The XMesh Low Power (LP) apps compiled under MoteWorks 2.0.F draw 100-200 uA more current compared to earlier version of MoteWorks.

Root Cause:
The default route update interval gets set to 32 sec instead of 360 sec causing the radio to transmit more frequently. This is the result of a bug in the nesC compiler (version lower than 1.2.7) that mis-interprets uint32_t value for RUI.

Work-around/fix:
Use the updated object files from the attachment. The steps are:
1. Download the zip file from the attachment and unzip them.
2. Copy these unzipped files into /MoteWorks/tos/lib/XMeshBin folder.
3. Recompile your apps with 'route,lp' flag.

572 - What are the differences between Imote2s from Intel and Crossbow?

They are identical from the hardware perspective but they may differ in the software that is pre-loaded and the accessories they ship with.

Also, the Intel C++ tool suite is no longer available from Intel but may be available from Marvell. However, there is no easy download of that as of yet.

The good news is that in most cases you don’t need that C++ tool suite. The Imote2 software is compiled with gcc. The only component from that tool suite that is sometimes needed is “xflash” which is the tool to download code into the Imote2 via JTAG.

Now, if you have a Crossbow mote then it will come pre-programmed with a USB boot loader. In order to download TinyOS code into the Imote2, use “USBLoaderHost.exe –p build/imote2/main.bin.out”. So you can just use USB and don’t need JTAG at all.

If you have an Intel Imote2 or if the pre-loaded boot loader got damaged, then you can use either “xflash” or “jflashmm” (the latter is freely available) to restore the boot loader. we have provided the necessary software here:

<a href="
http://www.xbow.com/Support/wobjectDetail.aspx?id=50160000000KXVYAA4&type=Solution&page=0" target="_blank">
http://www.xbow.com/Support/wobjectDetail.aspx?id=50160000000KXVYAA4&type=Solution&page=0</a>


You will need the Imote2 interface/debug board (IIB2400 or Intel equivalent) and the Intel JTAG Cable (or equivalent) to perform the JTAG programming. Once you have restored the boot loader you can load code via USB as described above.

For alternatives to the above, see the following posts:
<a href="http://tech.groups.yahoo.com/group/intel-mote2-community/message/392" target="_blank">http://tech.groups.yahoo.com/group/intel-mote2-community/message/392</a>
<a href="
http://tech.groups.yahoo.com/group/intel-mote2-community/message/393" target="_blank">http://tech.groups.yahoo.com/group/intel-mote2-community/message/393</a> 

573 - Crossbow states that its Motes can use mesh, star, and star-mesh hybrid topologies. The only topology that we know how to configure is the mesh topology (Xmesh). How can I configure Star, Hybrid Star and Mesh topologies in MoteWorks?

XMesh is not a topology, but a mesh routing protocol. it can support different topologies that are described.
- LP or HP nodes talking to a corresponding base station provide true mesh topology.
- HP nodes in conjunction with ELP nodes provide hybrid-star topology.
- ELP nodes directly talking to a HP base will provide Star topology.

Please refer to the XMesh manual for details on these various power modes (HP, LP and ELP).

576 - Where can I find an application to read sensors on ITS400 sensor board used with Imote2?

An example application can be found in the attachment file (TestITS400.zip).


--------------------------------------------------------------------------
This program allows reading of all Sensors on the ITS400 Sensor board.

To install, unzip the file into the .../tinyos-1.x/contrib/imote2/test directory. Go to the TestITS400 directory and type make imote2 debug. Then install the program using either the USBLoaderHost -p or JTAG.

Open a Blush window. You will have access to the following new commands:
ReadAccel - Reads the accelerometer x,y,z [g]
ReadTempReg - Reads the TI temperature sensor [deg.C]
ReadADCChannel <n> - Reads the ADC channels, n={0,1,2,3} [V]
Note: other values for n produce bogus data
ReadLightSensor - Reads the light sensor [Lux]
Note: The first reading after boot is bogus
SwitchTempI2CAddr - Changes the I2C address of the TI device
Note: This only applies to older Intel boards
Try this only if ReadTempReg hangs
DisplayI2CAddr - Shows I2C device addresses
ReadSHTTemp - Reads Sensirion temperature sensor [deg.C]
Note: Needs time to warm up
First 5 readings are bogus
ReadSHTHum - Reads Sensirion humidity sensor [%]

Note that entering/exiting sleep mode triggers the issues above as well.

This program is based on the Intel TestBasicSensorBoard application.

UPDATE: As of July 2008, this app has been updated to support ITS400CB. The new version features an updated version of the 3D accelerometer and fixes the interrupt line pull-up errata of the older version. This software update is backwards compatible with the ITS400CA sensor board.

577 - How to add Ethernet/Wifi/Bluetooth to the Imote2?

In order to add Wifi, Ethernet or Bluetooth to the Imote2, two components are needed, the actual hardware and software drivers. The latter exist for Linux, see: <a href="http://embedded.seattle.intel-research.net/wiki/index.php?title=SG2_System_Testing" target="_blank">http://embedded.seattle.intel-research.net/wiki/index.php?title=SG2_System_Testing</a>


While this article is nominally about the Stargate2 it also applies in large to the Imote2. The difference is in the HW configuration. The Imote2 does not have built-in Bluetooth or Ethernet so a driver-compatible USB adapter needs to be used. Also, there is no built-in Wifi in either platform, so again the solution is to pick a compatible USB adapter. The Stargate2 has a standard USB host connector while the Imote2 does not (the USB connector on the Imote2 is a client connector). It does, have, however, all the pins needed for USB on the advanced expansion connectors. A simple 4-wire cable adapter will do:

Imote2 connector/pin --------- USB plug pin

USBH_VBUS_5V (J3/18) --------- VCC (1)

USBH_N (J4/09) --------- D- (2)

USBH_P (J4/10) --------- D+ (3)

GND (J4/08) --------- GND (4)
 

578 - Can I have the part number of the micaz external crystal oscillator?

We use ECS-73-S-18-TR from ECS Inc. This is also available from Digi-Key under the P/N XC592TR-ND.

580 - XMesh-LP RF Power issues in MoteWorks 2.0.F

Problem Description:
The XMesh Low Power (LP) apps compiled under MoteWorks 2.0.F have lower RF power compared to earlier version of MoteWorks.

Root Cause:
The default RF power is set to 0x09 thus reducing the RF power. The RF power settings in MakeXbowlocal don't get utilized since the RFpower is hard coded in the XMesh binaries.

Work-around/fix:
Use the updated object files from the attachment. The steps are:
1. Download the zip file from the attachment and unzip them.
2. Copy these unzipped files into /MoteWorks/tos/radio/cc1000lp/bin folder.
3. Recompile your apps with 'route,lp' flag.

582 - Can you help me with Imote2.Builder kit software running on Windows Vista operating system?

Follow these steps.
1. Install the Imote2.Builder on the Vista machine.
2. Apply "Visual Studio 2005 Service Pack 1 Update for Windows Vista", the patch can be downloaded <a href="http://www.microsoft.com/downloads/details.aspx?familyid=90E2942D-3AD1-4873-A2EE-4ACC0AACE5B6&displaylang=en"target="_blank">here</a>.
3. Download and Unzip the revised USB driver ("Imote2 USB Driver Vista.zip" file from the attachement) onto the Vista machine.
4. Plug in the Imote2 to the Vista USB port, when it prompts for device driver, load the revised USB driver from this package. If the USB does not detect the new Imote2 device hardware, you need to force a device driver installation. Navigate to the Device driver folder, right click on the file spotusb_vista.inf, select install.
5. Ignore any warning seen in step 2 & 4.
6. The sample applications and tools in the Imote2.Builder should work now as in XP. 

584 - Where can I find a sample application to parse/display data sent from Imote2?

An example application can be found in the attachment file (SerialDump.zip).
The SerialDump tool will print the data an Imote2 is sending over its USB port out onto a simple text-based terminal window. All the source code for the SerialDump application is included in the zipped file to allow developers to quickly get started connecting to the data channel of the Imote2 in the .NET environment.

585 - Where can I find the linux version of uisp for the IRIS platform (ATmega1281)?

The attachment contains the uisp for the Atmel 1281 on linux.
Note that it is a Linux executable and that execute permission may have to be set.

586 - When I type the hostname of the Staragte NetBridge (eg. http://sluggo-0000x) in my web browser, I only get a grey screen, without an option to login. What do I need in order to access different web pages of the gateway?

If you have an older version of Flash player pluggin in your browser, you could get this. The MoteExplorer requires version 9 to work properly. If you have an older version, it should prompt users to get the version 9 from Adobe website (due to some browser settings issue you may not be seeing this pop-up).

You can check your version by right-clicking on the grey screen and "About Adobe Flash Player".
If you have version 8 or older, click <a href="http://www.adobe.com/go/getflashplayer"target="_blank">here</a> to obtain version 9.
You may have to turn off the pop-up blocker to allow ActiveX elements to be installed.
Once the latest version is installed, you may need to restart the browser for the changes to take effect.

593 - Where can I find the latest XServe software update for the Stargate NetBridge?

The latest version of the XServe for NetBridge available <a href="http://gyro.xbow.com//other/SGNBUpgrade.2.4.15.2.zip"arget="_blank">here</a> if you want to try. Please note that these is not fully tested/qualified.

The upgrade instructions are provided below.

1. Download and extract the zip file on to your PC local drive.
2. Copy the upgrade files over to NetBridge (using Samba) as described in section 7.4 of the NetBridge user's manual.

3. Upload the map image (if needed) as explained in section 7.1.3 of the NetBridge user's manual.

4. You may need to clear your browser cache.
Firefox:
1) Go to Tools->Clear Private Data
2) Make sure Cache is checked and click OK
3) Close the browser, Re-open the browser and go to the MoteExplorer page.

IE:
1) To to Tool -> Internet Options
2) Under Browsing History click Delete...
3) Delete Temporary Internet Files
4) Close the browser, Re-open the browser and go to the MoteExplorer page.

650 - How can I convert RSSI received from IRIS Motes into dBm?

The RSSI read from the IRIS Motes is a digital 5-bit value. You need to refer to page 51 of the RF230 datasheet <a href="http://www.atmel.com/dyn/resources/prod_documents/doc5131.pdf"target="_blank">here</a> for interpreting it into dBm.

654 - When I try to login to access the MoteExplorer, I get "LOGIN ERROR. ERROR #2048". Could you tell me what is reason and how to reslove this?


You need to upgrade the XServe software in your NetBridge to resolve this login error. The update is available <a href="http://gyro.xbow.com//other/SGNBUpgrade.2.4.15.2.zip"arget="_blank">here</a>.

The upgrade instructions are provided below.

1. Download and extract the zip file on to your PC local drive.
2. Copy the upgrade files over to NetBridge (using Samba) as described in section 7.4 of the NetBridge user's manual.
3. Upload the map image (if needed) as explained in section 7.1.3 of the NetBridge user's manual.

4. You may need to clear your browser cache.
Firefox:
1) Go to Tools->Clear Private Data
2) Make sure Cache is checked and click OK
3) Close the browser, Re-open the browser and go to the MoteExplorer page.

IE:
1) To to Tool -> Internet Options
2) Under Browsing History click Delete...
3) Delete Temporary Internet Files
4) Close the browser, Re-open the browser and go to the MoteExplorer page.

657 - All the temperature sensors on MTS300CB boards read -273.15C and are not responsive. Am I missing something? Do I need to calibrate these boards or do the temp sensors have an issue?

The MTS300/310CBs use a different power control line (PW0) for Temperature
sensor as compared to MTS300/310CA (INT2). The reason was to free up
INT2 line for radio control for MICAz.
It sounds like you are using CA code on CB hardware and hence the Temp
sensor never gets turned on.

The software modification involves changing one line of code.
In sensorboard.h file of the app, change
TOSH_ALIAS_PIN(TEMP_CTL, INT2) to TOSH_ALIAS_PIN(TEMP_CTL, PW0) 

661 - The .NET Micro Framework 2.0 will not install because the installation requires XP SP2 or Windows 2003. How do we get round this?

The work-around requires you to download and install <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EB0EF2A6-03E2-402C-89A4-A636BD0080C5&displaylang=en"_blank">.NET micro framework 2.5</a> from Microsoft.


This may require <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=BB4A75AB-E2D4-4C96-B39D-37BAF6B5B1DC&displaylang=en">SP1 for the Visual Studio 2005</a>, which can also be downloaded from Microsoft website.

663 - Where can I find the drivers for the IMB400 camera sensor board?

Currently the following drivers and sample applications are available for the IMB400 camera board:

1. Video
There is a preliminary TinyOS 2.x driver available in the contrib section. It can be found on SourceForge and downloaded using CVS or viewed <a href="http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x-contrib/intelmote2/apps/cameraTestJpegSerial/"target="_blank">here:</a>

Thanks to Brano Kusy for porting the original Enalab driver to TinyOS and Robbie Adler for helping debugging the code.

This application is based on TinyOS 2.x. It can be loaded using the USB boot loader if the user has up-to-date tinyos-2x and tinyos-2.x-contrib trees. The following environment variables must be set correctly (replace … with your local path):

export TOSROOT=…/tinyos-2.x
export TOSDIR=$TOSROOT/tos
export INTELMOTE2_CONTRIB_DIR=$TOSROOT-contrib/intelmote2
export MAKERULES=$TOSROOT/support/make/Makerules
export TOSMAKE_PATH=$INTELMOTE2_CONTRIB_DIR/support/make
export CLASSPATH="C:…\tinyos-2.x\support\sdk\java\tinyos.jar;."
export PATH=$PATH:…/Program\ Files/Java/jdk1.6.0_12/bin

Notes: CLASSPATH must be in Windows style for Windows platforms
Replace the Java version in PATH with the one that you have

Alternatively, loading this code will is possible using a FLASH programmer compatible with Imote2.

Also, the driver is currently limited to producing a 320x240 black and white image when compiled with the Wasabi (3.3.1) compiler. If compiled with the newer 3.4.3 xscale-elf-gcc, VGA mode is supported as well. Color mode works, however, the colors are not reproduced well, more work is needed here. Jpeg compression is currently NOT supported. The driver requires the serial interface board IIB2400. In order to use it, you will first have to compile the code in the java subdirectory. The start the serial forwarder as follows:

java net.tinyos.sf.SerialForwarder -comm serial@COMx:115200 -port 9002

Use the 2nd USB COM port of the IIB2400 for COMx. Then start the run script to activate the camera interface. Images will be stored in the C:\tmp\imote2 directory (which needs to be created if it doesn’t exist). They will be in .pgm format. Note that the color and jpeg options of the interface are currently not supported.
A back-port to TinyOS 1.x is in the works and will be posted in the 1.x contrib/imote2 section when ready.

2. Audio
This is a sample application that first plays a jingle, then listens for 3 seconds and finally plays back what it heard. It can be found on SourceForge and downloaded using CVS or viewed <a href="http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-1.x/contrib/imote2/test/TestAVboard/"target="_blank">here:</a>

This TinyOS 1.x application can be installed using the USB boot loader. Thanks to Robbie Adler for developing this driver!

3. PIR
Any TinyOS 1.x application can be used to test the PIR sensor, for example Blink. Make the following modification in the tos/platform/imote2 directory to enable the PMIC alarm interrupt:

############################################################
diff -r1.5 PMICM.nc
422c422
< mask = IMA_ONKEY_N | IMA_EXTON | IMA_CHIOVER;
---
> mask = IMA_ONKEY_N | IMA_EXTON | IMA_CHIOVER | IMA_PWREN1;
############################################################

Recompile, install via the USB boot loader, connect with ImoteConsole to the BluSH shell and type “GoToSleep 20” to put the Imote2 to sleep for 20s. If the PIR sensor is enabled any motion will wake the Imote2 before the 20s are up.


Comments and questions:
Please post to the <a href="http://tech.groups.yahoo.com/group/intel-mote2-community/"target="_blank">Imote2 Yahoo group</a> for the quickest way to get an answer.

Memsic wireless software faq
Memsic wireless software faq