[SOLVED] a problem in receiving packets via MATLAB

Status
Not open for further replies.

h.v

Junior Member level 2
Joined
May 27, 2008
Messages
22
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,281
Activity points
1,515
hello

i need to receive an NTP packet via MATLAB.
as you may know NTP packet is send out using UDP with destination port=123 and source port =123.
so i need to get the packet with an object which has source port(LocalPor)=123 but MATLAB do not allow me to create one :sad:

This is the code

u1 = udp('192.168.56.102', 'RemotePort', 123, 'LocalPort', 123);
fopen(u1)
fscanf(u1)
fclose(u1)
delete(u1)
clear u1


MATLAB gives this error message

??? Error using ==> icinterface.fopen at 83
Unrecognized Windows Sockets error: 0: Cannot bind


it means that it cannot open the object:sad:

Any one has an :idea: what can i do?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…