Question: Project I: A Simple Data Link Layer Protocol 1 Project Description Through the Internet, use socket programs to setup a simple link layer protocol between
Project I: A Simple Data Link Layer Protocol 1 Project Description Through the Internet, use socket programs to setup a simple link layer protocol between your computer and a server to fullls the following tasks: 1) Read the small jpeg le umdlogo.jpeg or other les in a binary format using the transmitter computer or phone. 2) Pack the bit stream of the le into many I-frames with sizes of 1024bit (or others) payload. 3) Each frame contains a header of 01111110. 4) Each frame has a frame counter (1Byte). 5) Each frame attach with a CRC check by using a divisor x4 + x3 + x2 + 1 (11101) or standard CRC16. 6) The server will bounce back the packets at a packet error rate of 20% randomlly. When receiving the packet, perform CRC check. 7) Use stop and wait automatic repeat request (ARQ) for error control by resenting incorrect packet until it is correctly received. 8) Write the receiver bit stream to a le in binary format and play/show it. 9) the server address is: http://www.vehi-com.com/udp.php
2 Requirements and Suggestions
1) Working individually, NOT in groups. 2) Demonstrate your project in lecture and submit a report to Canvas on due. 3) Test sample codes as the rst step. 4) Use a build-in test frame to realize the function before actually transfer the le. 5) Addition to transfer the le, the option is to establish a live audio/video streaming, if time allows.
3 Socket Sample Codes in Python
import socket
import time sock=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
server_address=(199.223.115.24,9991)
with open(bugsbunny1.wav,rb) as f:
buff=f.read()
message=[{:02X}.format(b) for b in buff]
result=bytes([int(h,16) for h in message])
with open(1.wav,wb) as f:
f.write(result)
for i in range(50):
packet=buff[0:1200]
sent=sock.sendto(packet,server_address)
data,server=sock.recvfrom(2048)
print(data.hex())
print(i)
time.sleep(0.02)
4 Project Format
4.1 Project Descriptions, 1-2 pages including 1 system diagram, 1 frame conguration and 1 ow chart for your codes
4.2 What are the main issues you met and how you solve them
4.3 What you have learned from this project
4.4 Figures and Outcomes of your program
4.5 Original and Complete Source Codes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
