pundik dmitry & blekhman alexandr 2001/02 final presentation semester a הטכניון -...
Post on 20-Dec-2015
224 views
TRANSCRIPT
Pundik Dmitry & Blekhman Alexandr 2001/02
Final PresentationFinal PresentationSemester ASemester A
המעבדה למערכות המעבדה למערכות הטכניון - מכון טכנולוגי לישראלהטכניון - מכון טכנולוגי לישראל
ספרתיות מהירותספרתיות מהירות הפקולטה להנדסת חשמלהפקולטה להנדסת חשמל
Pundik Dmitry & Blekhman Alexandr
Instructor: Konstanin Sinyuk
Pundik Dmitry & Blekhman Alexandr 2001/02
AbstractAbstract
In our project we rebuild the infrastructure of a project that is written by the
second team in CE Lab (Haim and Eran).
The system is called LIS (Local Information System), and it uses a LAP (LAN
Access Point) in order to connect an information service, and transfer data.
The connection and transfer is made through BlueTooth wireless communication
technology, and we have to replace the current stack, while making minimal
changes to the API, in order to minimize the effect on the already running
projects.
Pundik Dmitry & Blekhman Alexandr 2001/02
BlueTooth OverviewBlueTooth Overview
Short range wireless technology.
Network solution for handheld devices.
Pundik Dmitry & Blekhman Alexandr 2001/02
System OverviewSystem OverviewLAN
Client 1
Client 2
Client 7
• • •
BT
BT
BT
BT
PC
PC
PC
LAP
Pundik Dmitry & Blekhman Alexandr 2001/02
Our Project Part AOur Project Part A
The goal of our project is to develop and integrate a new BT stack in the current application:
The previous BT was built for concept demonstration system. This stack only partially implements the BlueTooth standard stack. The implementation of the stack was rather simple and inefficient.
Pundik Dmitry & Blekhman Alexandr 2001/02
Project Part A Project Part A Final ArchitectureFinal Architecture
In the end of current project part, we have released two java objects:
1. RFSocket – object, implementing the socket, which transferres the data.
2. RFServerSocket – object, implementing the server of the BT connection.
These objects allow transparent use of client/server architecture in Java applications over Bluetooth network.
Pundik Dmitry & Blekhman Alexandr 2001/02
Porting To JavaPorting To Java
Both classes were written in C/C++, and compiled into a Dinamic Link Library (DLL).
Their API’s were ported to Java, so the second project team can integrate it in their work.
The porting was made using JNI – Java Native Interface.
Pundik Dmitry & Blekhman Alexandr 2001/02
JNIJNI
The Java Native Interface (JNI) allows Java code to operate with applications written in other languages.
You can call functions and methods implemented in other languages, such as C or C++.
This can be used in integrating an already existing (legacy) application into a Java application.
Pundik Dmitry & Blekhman Alexandr 2001/02
Project Software DesignProject Software DesignServer SideServer Side
Digianswer BlueTooth stack
API
RFServices DLL (C++)
User 2 Java Objects
API
JNI
Pundik Dmitry & Blekhman Alexandr 2001/02
Project Software DesignProject Software DesignClient SideClient Side
Digianswer BlueTooth stack
API
RFSocket implementation (C++)
User Java Object
API
JNI
Pundik Dmitry & Blekhman Alexandr 2001/02
RFServerSocket FunctionalityRFServerSocket Functionality
RFServerSocket implements the server side BT connection.
Performs the clients search and sets up the connection.
It export RFSocket object for data transfer for each client connected.
It works on PC devices, and uses the Multi Point connection to clients.
RFServerSocket
Search
Accept
Connect
RFSocket
Pundik Dmitry & Blekhman Alexandr 2001/02
RFSocket FunctionalityRFSocket Functionality
RFSocket
Read
Write
Disconnect
RFSocket implements the basic socket stream functions, as object Socket in Java.
For the user it has the same API both on the iPaq devices, and the server.
This object operates with one BT device, using Point To Point connection with the server.
HCI Input Stream
HCI Output Stream
Pundik Dmitry & Blekhman Alexandr 2001/02
RFServerSocket APIRFServerSocket API
Main methods:Main methods:
Connect: initializes the connection, performs inquiry, builds the database of clients and services, creates the connections to all the clients found.
Accept: returns a reference to one RFSocket of all alive connections at a time.
Close: closes all connections, destroys databases, and exits.
Pundik Dmitry & Blekhman Alexandr 2001/02
RFServerSocket DesignRFServerSocket Design
RFServerSocket is based on DigiAnswer API, supplied with the DigiAnswer BT device.
The connection is created through Serial Port Profile, which creates a virtual COM port for every client.
The RFServerSocket creates the connection with all the clients found. The device list can be updated.
Every connected client has a corresponding RFSocket, stored in a list inside the RFServerSocket.
Every RFSocket has a different local service, used by the connection.
Pundik Dmitry & Blekhman Alexandr 2001/02
RFServerSocket API RFServerSocket API DiagramDiagram
Connected RFSockets, one to every available local service:
Connect
AcceptClose
Pundik Dmitry & Blekhman Alexandr 2001/02
RFServerSocket Design RFServerSocket Design DiagramDiagram
BT hardware
Digianswer BlueTooth stackAPI
RFServerSocket
Virtual COM port
RFSocket UserAPI
Pundik Dmitry & Blekhman Alexandr 2001/02
RFSocket APIRFSocket API
Main methods:Main methods:
GetInputStream: returns the stream, that reads the data. The stream implements Java’s inputStream interface.
GetOutputStream: returns the stream, that sends the data. The stream implements Java’s outputStream interface.
Disconnect: disconnects the client the object refers to, and notifies the server about the socket termination.
Pundik Dmitry & Blekhman Alexandr 2001/02
RFSocket API DiagramRFSocket API Diagram
Virtual COM port
GetInputStream
InputStream
Read
GetOutputStream
OutputStream
Write
Disconnect
Call the server for disconnection
Pundik Dmitry & Blekhman Alexandr 2001/02
Problems EncounteredProblems Encountered The server is located on the laptop, because
the DigiAnswer BT device is PCMCIA. Difference between BT stack versions on the
iPaqs, and the server caused many crashes and connection failures.
The Java VM on iPaq is a PersonalJava, which made the porting difficult.
Absence of Jbuilder on the laptop made us write the Java code on a PC, and run it on the laptop, without any debugging abilities.
General inconveniences, like writing on a laptop, transferring data to PC, and debugging on iPaq.
Pundik Dmitry & Blekhman Alexandr 2001/02
Semester BSemester B
Complete the porting of RFSocket for the client (iPaq) to Java.
Run numerous tests on the objects, and fix the bugs found.
Integrate the Java objects RFServerSocket and RFSocket in the project of the second team (Haim and Eran)
Transfer the LAP to the iPaq from the Laptop.
Pundik Dmitry & Blekhman Alexandr 2001/02
Time TableTime Table
21.4 Completing the RFSocket porting for client side.
1.5 Testing and fixing bugs in the existing objects.
21.5 Finishing the integration with the second project.
1.6 Research and study about Windows CE BT and API.
15.6 Operating with the BT API on the iPaq.
15.7 Transfer the LAP to iPaq.
1.8 Finish testing and fixing the new LAP in iPaq.