Results 1 to 6 of 6

Thread: network app not working on Windows 7 x64

  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: network app not working on Windows 7 x64

    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.
    Last edited by ^NyAw^; 15th February 2012 at 16:54.
    Òscar Llarch i Galán

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: network app not working on Windows 7 x64

    It sounds like your application is expecting a promiscuous network interface 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.

  3. #3
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: network app not working on Windows 7 x64

    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.
    Òscar Llarch i Galán

  4. #4
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: network app not working on Windows 7 x64

    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,
    Òscar Llarch i Galán

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: network app not working on Windows 7 x64

    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?

  6. #6
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: network app not working on Windows 7 x64

    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!
    Òscar Llarch i Galán

Similar Threads

  1. Xml parse not working in windows 7
    By athulms in forum Newbie
    Replies: 1
    Last Post: 12th September 2011, 07:01
  2. Does anyone actually have Phonon working on Windows?
    By pssss in forum Qt Programming
    Replies: 7
    Last Post: 18th March 2011, 18:51
  3. Qt Designer Working from network drive
    By list@ceepro.dk in forum Qt Tools
    Replies: 1
    Last Post: 9th April 2010, 19:26
  4. Getting Phonon working on windows XP
    By keshava in forum Installation and Deployment
    Replies: 0
    Last Post: 12th May 2009, 16:37
  5. Qt4: QDir::entryList bug in windows when listing network files?
    By Yvon Halbwachs in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2006, 14:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.