On-Line CS111, Winter 2017 --- Lab 4 Description

Project 4: Embedded Systems

PROJECT GOALS

This project will familiarize you with some simple distributed systems characteristics and tools. It will also give you some experience in working with hardware for embedded systems and provide some exposure to basic tools for securing distributed systems. The goals are:

ASSIGNMENT OVERVIEW

The assignment is divided into three general parts.

  1. Building an application that emulates the use of a sensor to gather data on an embedded device.
  2. Convert this application to become a client using a predefined network protocol to interact with a remote server program.
  3. Change the basic client application to make use of SSL/TLS to communicate securely to a remote server that requires cryptographic protection of communications.

In this assignment, you will:

Your deliverables for this assignment will include:

PART 1 - Building a emulated embedded device

SUMMARY OF DELIVERABLES

DETAILED INSTRUCTIONS

Write a program that emulates an embedded device that accesses a temperature sensor. The program should read the sensor once per second and output its reading (in Fahrenheit) to a log file, in the format:

Timestamp Temperature

(Use a space between the timestamp and temperature, not a tab or multiple spaces.) The timestamp should be obtained by running the time() system call on machine running the emulation, and should be converted to an HH:MIN:SEC format. The temperature should be in the format ##.#. (For example, 98.6.) Produce temperatures in a reasonable manner, such as choosing a base temperature and adding or subtracting a random amount from each reading.

PART 2 - Integrate your emulated device into a client/server system

SUMMARY OF DELIVERABLES

DETAILED INSTRUCTIONS

Here is a description of the device you are to emulate.

The server will be running on r01.cs.ucla.edu, on port 19000. You should be able to connect to the server on this port from anywhere.

PART 3 - Convert your emulated sensor client program to use SSL/TLS to protect communications

SUMMARY OF DELIVERABLES

DETAILED INSTRUCTIONS

The emulated device should act precisely as in Part 2, but should connect to a server that required TLS/SSL encryption of the communications between client and server.

The TLS/SSL server will be running on r01.cs.ucla.edu, on port 19050. You should be able to connect to the server on this port from anywhere. However, if you do not properly implement TLS/SSL in your client program, it will reject your connection.