I am currently doing a project which needs my program to receive data from a data logger.
Some of you might have seen the related entry couple days ago.
I thought I succeeded to receive the data from the data logger, but anyway, I made a really stupid mistake. :-[
I investigated some code on the internet.
some websites say that by setting the following item to 0, my socket will listen to all the ports.
IPEndPoint(IPAddress.Any, 0)
However, as I set this to 0 and monitored the packet by WinDump, my socket received nothing. :o
last time you suggested me to receive the data via the sending port.
for example, in this picture, the sending port is 51159.
how do I receive the data via port 51159 in my program? (every single time,the sending port changes, so I don’t really know how to fix that sending port)
Additional note: by binding your socket, you will also receive UDP broadcast messages to port 8030.
So for security reasons you might want to use ReceiveFrom instead of Receive. This way you will receive the EndPoint from where the data comes, and you can compare that EndPoint with the dataloggerEP…
Further question: why are you still on netmf 3? Seems you have (or are building) a commercial product, but why not move to something that is more supportable from the community? Luckily the things you’re talking about right now are generic networking things, but you could find yourself in a sticky situation if you start asking behavioural questions since most are on 4.1 (and hanging out for 4.2)