h.v
Junior Member level 2
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?
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?