Roedy Green said:
Why are these called "stacks"? what does "stack" mean in this context?
OK, JSR-82 is the official Bluetooth API for Java. It is a top level
API to allow Application programmers to write simple bluetooth
applications in Java.. However unlike most other JCP specifications
there is no reference implementation..
Why not? i hear you cry....
Well It's near enough Bluetooth hardware specific, And unlike IP
networking an abstraction is not part of the operating system and so
there is no easy (java.net.* easy..) way of doing it....
If we continue to use the example of IP networking you have hardware
which talks via OS device drivers to the kernel. The kernel also has a
Networking protocol stack which handles the protocol issues that come
with TCP/UDP/IP which App programmers never see... On top of the Stack
is a nice POSIX or otherwise interface so we can make sockets and send
juck down them and then of course there is (in Java) the java.net.*
components which talk through native parts to the OS dependant library
and make it even simpler.... nice.
The term stack takes it name from the ISO/OSI model of an abstract
communications stack -> ie layers of abstraction all stacked up on top
of each other... from high level Application stuff down to Physical
(electromechanical) specifications.
Back to Bluetooth.... Bluetooth too has a communications stack and is
divided between Hardware and Software. Some parts run on the
Bluetooth Chip, and some parts run on the Host (PC/PDA/PhoneCPU/). The
two parts talk accross what is know as the Host Controller Interface
(HCI). this wrt bluetooth is some form of UART (serial
port,USB,Compact flash adapter,PCMCIA adpater).
Because there is no defined means of linking Bluetooth devices to a PC
(or other host CPU) one cannot just trivially add Bluetooth to Java.
JSR-82 provides the java.net.* classes but what is missing is the bit
in the middle (the software stack) or more specfiically
RFCOMM/OBEX/SDP/L2CAP/HCI Bluetooth layers...
The stack is designed to talk to a set or range of devices and built
for each OS /platform. With the case of Serial Port BT devices
Javax.comm already exists to provide native serial comms. Other stack
vendors would have to provide USB drivers or a compact flash interface
or the like...
A JSR-82 compliant stack is a bluetooth stack for java which
(regardless of how it talks to hardware, which components are
implemented and which parts are native or java) Is accessible through
the portable API defined by JSR-82.
This principle can be seen in J2ME with the notion of MIDP. A MIDP
system will provide java MIDP access to things like input and screen
output but if you look at a variety of Java smart phones, the
applications all function the same but underlying implementation id
completely different.
It's not as simple as java.net stuff but at least it provides a common
interface for different implementors to stick too and make platform
independant application writing... This actually goes back to Java's
roots as an embedded Platform Programming environment...
HTH
Ever curious for the Java glossary.
No problem
Rob
---------------------------------------------------------------
| Rob Shepherd
| can be contacted privately through a temporary email account.
| Courtesy of
http://www.mailinator.com
|
| (e-mail address removed)
|
| This address will not be checked (by me) after May 31st 2004
---------------------------------------------------------------