HP MSPOT Project
Overview
Raycomm developed a device communication library to
enable future application development which utilizes
HP’s new MSPOT technology.
Business Case
HP Labs came to Raycomm looking for expertise in
Pocket PC 2003 SE. They had invented a novel RFID
type device called the MSPOT.
They had developed both the memory device and reader
hardware which could be communicated via a USB link.
HP were looking to develop both demonstration
software and also a programming library that would
support the various functions available in the
reader.
Up to this point the reader had been developed using
windows PCs and simple C command line based tools.
HP was looking to put together some simple
demonstrations and a simple API that could be used
by customers to build test applications. That would
run on a Pocket PC 2003 SE PDA.
The prototype reader used an FTDI device to provide
the USB interface. FTDI provide a set of D2XX direct
drivers for Windows and Windows CE these drivers allow
direct access to the FTDI through a DLL. This DLL would
provide low level access to the reader API. HP required
a higher level abstraction of these APIs to provide a
set of simple Reader APIs for reading and writing an
MSPOT.
Solution
Most Pocket PC 2003 SE devices do not have a USB host
interface built in by default. Therefore a compact flash
based USB host was used which was supplied by RATOC
Systems International. By using the drivers supplied
with the compact flash device, any PDA running Pocket PC
2003 SE with a compact flash slot can have a USB host
interface added.
The MSPOT reader had a set of 9 basic commands that
needed to be available for customer applications. It
was decided to provide this functionality in a
managed C# API. This would make the development of
applications using the standard Microsoft Tools a
relatively simple operation.
Pocket PC 2003 SE runs a subset of the full .NET framework called the .NET
Compact Framework there are significant differences between the two frameworks
as regards functions supported however for this project the differences were not
significant.
As already discussed the FTDI driver provides a programming interface for the
FTDI hardware. In order to use this to communicate with the reader a managed
version of the D2XX API had to be developed that supported all the required D2XX
APIs. This required extensive use of Managed Interop to pass the data across the
managed unmanaged software boundary. Having developed a Managed D2XX it was
possible to build a managed API that would mimic the Reader API but at a higher
level for the C# and VB.NET programmer.
A .NET Compact Framework 2.0 library was developed using Visual Studio 2005 and
following the .NET API design guidelines to provide a consistent user interface.
The library also has two sets of custom Exception Classes that allow the
reporting of errors caused by the FTDI interface itself and by the Reader. By
Breaking down the two sets of errors it is hoped that the user would be able to
indentify if the cause was the reader and MSPOT or the USB interface that caused
the problem.
The API Library was tested by unit tests and the library conformity was
verified by use of FXCop (a tool developed by Microsoft to test their code
conforms to the Microsoft Code standard). The combination of these two tools
allowed not only the identification of a number of errors in the error
management reporting but also identified a few problems in the Reader API
itself.
The final library provided was a fully managed C# based library that would allow
a customer to quickly develop software to use the MSPOT Reader without having to
worry about the requirements of the driver and other hardware.
In addition to the library we also provided a sample
application that allowed the exercising of all the API
commands and could also act as a demonstration of the
possibilities that the MSPOT offered.
Technologies Involved
- PDA
- Windows CE
- Pocket PC 2003 SE
- FTDI USB chip FT245BM
- FTDI USB driver D2XX
- C# .NET Compact Framework 2.0
- FxCop
- HP MSPOT technology
Raycomm are a UK based, custom
software and electronics design and
development service company creating
bespoke electronic products, mobile
device software applications, backend
web server software and e-commerce
database software.
For a no-obligation discussion with one of our senior consultants on
your project needs:
- Call us on +44 (0) 1275 847553
- or fill in our
Enquiry
Form
- or email us using the link at the top of the
page
We look forward to hearing from you.