IntroductionIntroduction
• The museum project idea is to supply The museum project idea is to supply museum visitors with a private guide to museum visitors with a private guide to guide them through their museum tour.guide them through their museum tour.
• Every visitor of the museum will be able to Every visitor of the museum will be able to rent a P.D.A at the entrance.rent a P.D.A at the entrance.
• From this moment the visitor (our user) can From this moment the visitor (our user) can interactively use the P.D.A as his private interactively use the P.D.A as his private guide.guide.
Product AdvantagesProduct Advantages
•A personal guide for each user.
•Dynamic.
•Interactive.
•Modular.
Project GoalsProject Goals
• Research - Blue Tooth.Research - Blue Tooth.
• Is it possible?Is it possible?
• Implementation of suitable server – Implementation of suitable server – client & Data Base application.client & Data Base application.
• Client features:Client features: The client will be able to get the following The client will be able to get the following
services: services:
- - MapMap: a map of the museum rooms + The : a map of the museum rooms + The client’s current position. client’s current position.
– RoomRoom: subject of room + links to exhibits.: subject of room + links to exhibits.– ExhibitsExhibits: picture + text.: picture + text.– General informationGeneral information: about the Museum and : about the Museum and
its facilities.its facilities.– SMSSMS: connections client-to-client, client to : connections client-to-client, client to
group.group.– Tour selectTour select: Choose a tour by field of interest.: Choose a tour by field of interest.
• Server FeaturesServer Features::
- The server will support all the client’s The server will support all the client’s feature.feature.
• Management & maintenance featuresManagement & maintenance features::
- Map control: maintenance of map feature.- Map control: maintenance of map feature.
- Room control: Add Room , Remove Room , - Room control: Add Room , Remove Room , Modify Room.Modify Room.
- Exhibit control: Add Exhibit , Remove - Exhibit control: Add Exhibit , Remove Exhibit , Modify Exhibit.Exhibit , Modify Exhibit.
- Groups: Add Group, Add Member, Remove - Groups: Add Group, Add Member, Remove Group, Remove Member. Group, Remove Member.
Project ArchitectureProject Architecture
• The way to achieve the needed The way to achieve the needed services is to build a wireless services is to build a wireless connection between the P.D.A’s (the connection between the P.D.A’s (the Users) and the museum server.Users) and the museum server.
• The sever holds a Data Base with all The sever holds a Data Base with all relevant information and manage relevant information and manage connection with the P.D.A’s (the connection with the P.D.A’s (the clients).clients).
Application Application Server & Server & Http server Http server are neededare needed
Every room may Every room may contain one or contain one or more wireless more wireless
pico – nets. pico – nets.
Pico net
PDAPDA
PDA
Hub
Pico net
PDAPDA
PDA
Hub
Server Mainframe
LAN
HTTPserver
Museumserver
Bluetooth units of all Rooms are connected to LAN
Every client has a Bluetooth unit
BluetoothBluetooth
Flow chart for client modes of operation in the pico-net
Park M ode
N o R equest forService wait Tout
EnteringActive M ode
R equest forService
C lient fin ished R equest
S ystem N otB usy continue
gettingservice
S ystem isB usy increase
S ervieC ounter
C ounter < M ax_A loud
C ounter>M ax_A loud
C lien t m ade request fo r service
Research Main Conclusions Research Main Conclusions •The piconets will work in the Master – Slave format.•The static devices will be Masters, the clients will be Slaves .•Direct communication between slaves will not be allowed.•Each piconet build of one Master & 7 slaves.•Each piconet can hold up to ~200 clients in Park Mode (like sleep).•It is possible for a few piconets to work in the same room.
Research Main Conclusions Research Main Conclusions (cont.)(cont.)
•Each client will get it's own IP number on the net.
•The client will get a new IP on each time it will become an active member of a piconet.
•The static device (Master) will assign the IP for the client.
•Masters of each Room will have fixed IP numbers that belongs only to the specific Room.
Research Main Conclusions Research Main Conclusions (cont.)(cont.)• In addition to IP each client will get a
static ID (that will stay the same during all the visit).
•*** It is advisable to have a central unit for every few rooms in order to decrease the transmission over the net.
•This unit will supply Data that deals with the few neighbor rooms.(We repeatedly supply this data all the time with no changes).
Ethernet vs. BluetoothEthernet vs. Bluetooth
Bluetooth : Bluetooth : • 1 M bit/sec1 M bit/sec• Wireless connectionWireless connection• 7 users per pico net (max).7 users per pico net (max).• P(Error)P(Error)
Ethernet :Ethernet :• 10 / 100 M bit/sec10 / 100 M bit/sec• Point to point connectionPoint to point connection• Number of clients limited by connection pointsNumber of clients limited by connection points• P(Error)P(Error)
Http ServerHttp Server
• Since a part of the client’s GUI (touring the Since a part of the client’s GUI (touring the museum) is a Web Browser - > an Http museum) is a Web Browser - > an Http server is needed to the project.server is needed to the project.
• The HTTP server is a regular http server The HTTP server is a regular http server that provides data on demand. that provides data on demand.
• On initialization the server must be set the On initialization the server must be set the root path for the museum web pages.root path for the museum web pages.
• All the other data is a regular HTTP server All the other data is a regular HTTP server data No special attributes.data No special attributes.
Application Application Server Server DesignDesign• This Server This Server
manages manages communicatiocommunicatio
n with all n with all clients.clients.
• It is basically It is basically divided into divided into three layers:three layers:
- ApplicationApplication- Routing Routing - COMCOM
Application layerMuseum manager
Routing Layer
COM Layer
LAN
Connectionhandler
Data Base
Clienthandler
Clienthandler
Data BaseData BaseData base structure
Data base
Client hash Room hash IP hashGroup hash
Struct has the followingfields:- name- group number- pointer to first client- number of PDA’s in group
Struct has the followingfields:- IP- room number- pointer next IP in room- pointer next IP in Hash
The Struct has the followingfields:- name- room number- pointer to first IP in room- List of neighbors- exist
Struct has the followingfields:- name- group number- pointer to IP- number of PDA- Message fifo & mutex for it- socket and managementflags for it- group index- current IP- next member in group
bla
Client DesignClient Design
• The client The client is also is also divided divided into three into three layers:layers:
- Application- Application
- Context- Context
- COM- COM
Application layer
Context manager
COM layer
WAN - Pico net
SendFIFO
ReceiveFIFO
Connection Connection stepssteps1. connect to 1. connect to ‘wall’. ‘wall’. 2. get IP.2. get IP.3. connect to 3. connect to museum museum server. 4. Get server. 4. Get waiting waiting messages or messages or Group info Group info response.response.5. Browsing. 5. Browsing.
Pico net
PDAPDA
PDA
Hub
Pico net
PDAPDA
PDA
Hub
Server Mainframe
LAN
HTTPserver
Museumserver
The Client’s CacheThe Client’s Cache• The cache is usedThe cache is used
By the client’s By the client’s ‘Browser’.‘Browser’.
It holds the recent It holds the recent HTML files that HTML files that were visited by the were visited by the client . client .
• It also support the It also support the option to browse option to browse BACK.BACK.
HTMLpage
Image Image Image
HTMLpage
Image Image Image
HTMLpage
Image Image Image
HTMLpage
Image Image Image
Cacheentry
Cacheentry
Cacheentry
Cacheentry
CommunicationCommunication
• In our project all the communication works In our project all the communication works
threw LAN.threw LAN.
• The Protocol we use is TCP/IP.The Protocol we use is TCP/IP.
• In order to make the connection between In order to make the connection between
clients and application server possible we had clients and application server possible we had
to create a specific protocol for ourto create a specific protocol for our
application.application.
The Application ProtocolThe Application Protocol
• This protocol is a packet protocol.This protocol is a packet protocol.
• It is used mostly for clients requests from It is used mostly for clients requests from server:server:
- Establish client / server connection.- Establish client / server connection.
- Close the above connection.- Close the above connection.
- Send a text message request.- Send a text message request.
- Room information request.- Room information request.
- Group information request.- Group information request.
The Packet Format:The Packet Format:Basic Message
command(long) PDA id(long) Message length(long) Additional data
Text Message
Additionaldata = Number of
recipientsID of
recipient 1ID of
recipient 2 ... Text Message
Group info resp Message
Additionaldata = Number of
MembersID of
member 0Name of
member 0 ... ID ofmember N
Name ofmember N
Room info resp Message
Additionaldata = Room
number
Project AlgorithmsProject Algorithms
• Client Client connectioconnection and n and receive receive algorithmalgorithm
Open connection
Activate MessageSender
Listen For a newMessage
Disconnected ?
Am I connected?
No
Yes
Add Message toreceive FIFO
• Client Send Client Send message message algorithmalgorithm
Recived message tosend
Add message to sendFIFO
Activates messagesender
Send Message andremove it from send
FIFO
Am I connected?
Finish
YesNo
messagesender
• Client connection to ServerClient connection to Server
Start server
Listen On socket
Received a newconnection
No
YesStart thread
of clienthandler
(ClientRun())
Active listen module(ActiveListenning())
• Client Client handler handler AlgorithAlgorithmm
Start client handler
Receive Messageheader
Is in header incorrect size?
If client Notinitiated exit elseDisconnect client
and exit
NoGet client and
message info fromheader
Yes
Is clientInitiated
set client statusconnected in Data-base and start theclient Messenger
No
Get MessageAdditional data Yes
Exit Thread
Got Data O.K. ?
No
Process MessageYes
• Message Message handling handling AlgorithmAlgorithm
ReceivedMessage
Case on message:Collect room infofrom Data Base
Room info
Text message
Build a group inforesponse message
Group info
Finish
Unknown
Build a room inforesponse message
Add the messageto the requestor
FIFO and activateit messenger
For each target inthe text message
targets
Make a copy of theoriginal message
Add the messageto the target FIFOand activate it’s
messenger
End loop
Add the messageto the requestor
FIFO and activateit’s messenger
Delete originalmessage
GUIGUI
• The Administrator manages the adding The Administrator manages the adding and removing of groups and single clients, and removing of groups and single clients, he can add and remove a group, add client he can add and remove a group, add client to a group, add or remove a single client to a group, add or remove a single client group. group. The Administrator cannot The Administrator cannot change part fo the group after the group is change part fo the group after the group is created.created.
• The Administrator have the following The Administrator have the following panels to manage grouppanels to manage group
1.Activates the Add new group dialog1.Activates the Add new group dialog
2.Activates the Add single client dialog2.Activates the Add single client dialog
3.Activates the Remove group dialog3.Activates the Remove group dialog
4.Activates the Remove single client dialog4.Activates the Remove single client dialog
5.Quit program5.Quit program
•application main windowapplication main window
1
2
5
3
4
Client main screen
•A link to the tour select page
•Opens “new Messages” dialog to write a new message if the client is a single client group this dialog is disabled.
Client’s GUIClient’s GUI•Opens “Read Messages” dialog to read new incoming message. if the client is a single client group or no messages to read this dialog is disabled.
•Quit program.
•“Room Info” to get local room info
In every room the user Will get an over view of the room’sExhibits + links for more informationBy his demand.
The user will get a few optionsBy links:
To see a map
Go back to previous page
Select a different tour
What did we learn?What did we learn?
– Bluetooth ProtocolBluetooth Protocol– MFC ProgrammingMFC Programming– Software development in visual & Software development in visual &
embedded studio environment.embedded studio environment.– Network Programming (Sockets etc.) Network Programming (Sockets etc.) – Windows NT/2000 OSWindows NT/2000 OS– Windows CE OSWindows CE OS– GUI ProgrammingGUI Programming– Using & configuration of P.D.A’sUsing & configuration of P.D.A’s