µTasker Forum
µTasker Forum => µTasker general => Topic started by: tr111 on September 06, 2007, 09:08:51 AM
-
hello:
Now I can use the fnSendUDP to send the data!But I want to get the data from the udp! How Can I do!
I know the fnHandleUDP's received_ip_packet have data and Header.
I know If I #define SUPPORT_SUBNET_BROADCAST .I will get the data that I send.
But I don't like to use the #define SUPPORT_SUBNET_BROADCAST ;
I like this:
when I send the data to the MCF52235 from PC:source part=1999;
destination port=1999
PC
send:11 22 33 44 55
I want the MCF52235 can get the data 11 22 33 44 55 ,and send back to
PC:
source part=1999;destination port=1999
MCF5223 get and send :11 22 33 44 55
-
Hi
I don't think that SUPPORT_SUBNET_BROADCAST is relevant here. This will allow IP to receive broadcasts to its subnet (for example, without it, IP will not accept 192.168.0.255 - a broadcast to the subnet 192.168.0.xxx. With it this will be accepted).
All UDP frames received for the port number of the UDP socket will cause the call back function (fnUDPListner in the demo project). The listener will be called with the event type UDP_EVENT_RXDATA.
The code in the demo project will send the received data back, as you would like it to be done.
Note that it is possible to check the IP address and port number of the sender and reject these if necessary.
Regards
Mark
-
Mark:
You are right about the SUPPORT_SUBNET_BROADCAST !
I have known how the use the udp! Thank very much!