PDA

View Full Version : network app not working on Windows 7 x64



^NyAw^
15th February 2012, 16:54
Hi,

I have developed an application that uses an UDP socket to get data from another deveice that periodically sends it by UDP datagrams.
The application works perfectly on Windows XP(x86) but when I run into Windows 7(x64) the application don't recive any packet.
I have tested that the packets arrive using Wireshark and the packets are correctly recived, but the application don't recive them.

Thanks,

Added after 1 7 minutes:

Hi,

If i start the application and then I run Wireshark, it starts receiving data.

I'm using Qt 4.6.1(x86)

Added after 6 minutes:

But when I stop Wireshark, it stops receiving data.

Added after 23 minutes:

Hi,

Just found the problem. It seems that there is any kind of problem on NIC card or NIC driver. It works perfectly on another NIC card. I will try to update the NIC driver and test it again.

Thanks,

Added after 20 minutes:

Well, the problem still persists. I forget to stop Wireshark so I was getting data.

ChrisW67
15th February 2012, 23:07
It sounds like your application is expecting a promiscuous network interface (http://en.wikipedia.org/wiki/Promiscuous_mode) to function. Wireshark is setting the interface that way for its purposes, and your application is benefiting until Wireshark puts things back the way they were at startup.

^NyAw^
16th February 2012, 09:07
Hi,

Yes, I'm receiving data from a device configured as multicast. It's like receiving stream data.
It seems that on Windows 7(and Vista) the TCP stack has changed to avoid this behaviour for "security reasons". It works on Windows XP.
Is there a easy way to configure the NIC card into promiscuous mode?

Thanks,

P.S.: Qt "broadcastsender" and "broadcastreceiver" examples will not work too if sending and receiving to diferent Hosts with Windows 7.

^NyAw^
16th February 2012, 16:10
Hi,

I have installed Windows XP on target machine and the problem persists.
I'm not able to understand why it works on development machine and don't work on target machine.
Could it be a hardware problem? The target PC have a different hardware configuration than development machine.

Thanks,

ChrisW67
17th February 2012, 00:21
Is there a easy way to configure the NIC card into promiscuous mode?
Probably, but it will be in the Windows API you will need to look.


I'm not able to understand why it works on development machine and don't work on target machine.
Have you deployed everything needed by the program on to the target machine? Plugins, third-party libraries, etc.?

Is the Windows 7 firewall simply blocking UDP other than to known ports?

^NyAw^
17th February 2012, 09:12
Hi,

Finally it works.



Have you deployed everything needed by the program on to the target machine? Plugins, third-party libraries, etc.?

Yes, I also checked it with Dependency Walker and it's all ok.



Is the Windows 7 firewall simply blocking UDP other than to known ports?

No, the firewall is disabled.

I will explain what happens:
Network NIC for LAN. IP(auto), range 192.168.1.X/255.255.255.0
Device NIC for logging data: IP 192.168.255.1/255.255.255.0. Device is in 192.168.255.10/255.255.255.0 sending UDP datagrams to 192.168.255.1 every 50ms.

Trying to connect to the Device by it's software manager, shows that the Device was connected to the LAN network. !?!?!???!!! Not able to understand, there is no cable connection beetwen them, so are totally isolated from each other.

Changing the IP to 169.258.1.1 to the Device NIC and 169.258.1.10 to the Device work.

Note that the same configuration have worked on development machine.

By now, it works perfectly on Windows 7 on target machine, so thank you for your time.

P.S.: Remeber that I said that the first configuration work when running Wireshark!