local_port = randi([49152 65535]); remote_port = 3040; hudpr = dsp.UDPReceiver('LocalIPPort',local_port); hudps = dsp.UDPSender('RemoteIPAddress','255.255.255.255','RemoteIPPort',remote_port,'LocalIPPortSource','Property','LocalIPPort',local_port); setup(hudpr); %['5a' '00' '5b' 'db' 'ff' 'ff' 'ff' 'ff' 'ff' 'ff' '00' '00']); % step(hudps,uint8([90 0 91 219 255 255 255 255 255 255 00 00])); for i = 1:10 pause(1); msg = step(hudpr); if numel(msg)>0 break; end end if numel(msg)==0 error('No prologix found on network'); end ipaddress = join(num2str(msg(21:25)),'.'); release(hudps); release(hudpr);