Through the Internet, use socket programs to setup a simple link layer protocol between your computer and a server to ful?lls 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 con?guration 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
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more