Skip to content

Architecture

Nuno edited this page Oct 15, 2018 · 3 revisions

Server Diagram

Server Diagram Architecture

The Server has 6 different modules, 4 of them are initialization only. The other 2 are receivers, in this case for bluetooth and input modules. The server listens for incoming bluetooth connections, once it receives an eligible client, forks the program and starts receiving events until closing. The parent continues to listen for incoming client connections. The server is listening for incoming bytes. If the server reports bytes available to read, attempts to read, if 0 bytes were read, then the server closes the connection with the client, this means that the connection was terminated Client Side.

Client Diagram

Client Diagram Architecture

The first run of the program, the user must select a device from the device bluetooth paired list devices. Once pressed, returns to the main activity and attempts to Connect. Tries to connect 5 times until it Toasts announcing failure. On success it creates a KeyboardMousepad Activity in which the user emulates interaction. The Activity interprets the interaction and sends a proper converted event via bluetooth. Each event sends 10 bytes. The activity tests each 5 seconds if it is possible to write (testing connection) if the write returns failure, then the activity exits giving the message "Connectivity with server closed". This means the Server closed the connection.