Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

? I started this assignment and got like 20% through now im stuck, Im using matlab. Heres what i got. clear all; close all; fid1

?image text in transcribed

I started this assignment and got like 20% through now im stuck, Im using matlab. Heres what i got.

clear all; close all;

fid1 = fopen('C:\Users\Khalid Shohatee\Downloads\471\ece 471 project 2018\umdlogo.jpg');

data = fread(fid1,'ubit1');

packet = data(1:1024)';

header = [0 1 1 1 1 1 1 0];

counter = [0 0 0 0 0 0 0 0];

div = [1 0 0 1 1];

E = zeros(1,length(packet));

M = length(packet);

N = length(div);

tmp = packet(1:N);

for i =1 : M-N

if tmp(1) ==1

tmp = bitxor(tmp,div);

end

tmp = [tmp(2:end) packet(i+N)];

end

crc = bitxor(tmp,div*tmp(1));

crc(2:end);

packet = [packet, crc(2:end), [0,0,0,0]];

N =4;

packetH = [];

for i = 1: length(packet)/N

packetH = [packetH, dec2hex(bi2de(packet(1 +(i-1))))];

end

fclose(fid1);

u=udp('199.223.115.24',9990,'LocalPort',3000);

fopen(u);

for i=1:10

message=packetH;

fwrite(u,message);

fprintf('%d,transmitted: %s, received: %s ',i, message,fscanf(u));

pause(0.1);

end

fclose(u);

1) Read the small jpeg file umdlogo.jpeg or other files in a binary format using the transmitter computer or phone. 2) Pack the bit stream of the file into many I-frames with sizes of 1024bit (or others) payload. ) Each frame contains a header of 01111110. ) Each frame has a frame counter (1Byte 5)Each frame attach with a CRC check by using a divisor4 +3 +z21 (11101) or standard CRC16. 6) The server will bounce back the packets at a packet error rate of 20% randomly, 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 file in binary format and play/show it. 9) the server address is: http:.vehi-com.com/udp php 1) Read the small jpeg file umdlogo.jpeg or other files in a binary format using the transmitter computer or phone. 2) Pack the bit stream of the file into many I-frames with sizes of 1024bit (or others) payload. ) Each frame contains a header of 01111110. ) Each frame has a frame counter (1Byte 5)Each frame attach with a CRC check by using a divisor4 +3 +z21 (11101) or standard CRC16. 6) The server will bounce back the packets at a packet error rate of 20% randomly, 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 file in binary format and play/show it. 9) the server address is: http:.vehi-com.com/udp php

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions