1

I'm making a system for reading smart-cards. The reader devices send out udp packets. Wireshark can see the packets but it says that they have an incorrect frame check sequence. This is on Windows 7, while on Debian it works flawlessly. I tried adding rules, for the specific ports used, to the firewall... even disabled it altogether... no joy :/

I wrote this bare bones code that should verify that the packets are reaching the java app :

try {
    DatagramSocket s = new DatagramSocket(null);
    InetSocketAddress address = new InetSocketAddress("192.168.1.100",8888);
    s.bind(address);
    byte buffer[] = new byte[1024];
    DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
    while(true)
    {
    System.out.println("Waiting...");
    s.receive(packet);
    System.out.println("Received!");
    }
    } catch (Exception e) {
    e.printStackTrace();
}

It seems that they aren't ... any ideas?

Sachin Thapa
  • 3,559
  • 4
  • 24
  • 42
user2093348
  • 217
  • 2
  • 3
  • 10
  • I guess the windows network stack will filter out packets with broken frame check sequence? Code looks fine to me on first glance. – Fildor Sep 24 '13 at 15:03
  • any ideas how to disable fcs? :D – user2093348 Sep 24 '13 at 15:04
  • Have you tried with a smaller buffer? [This answer](http://stackoverflow.com/a/1099359/466862) suggests that sizes larger than 512 bytes might be dropped (eg when the MTU is smaller than the IP packet) – Mark Rotteveel Sep 24 '13 at 15:10
  • tried it just now... didn't work – user2093348 Sep 24 '13 at 15:13
  • 1
    i'm gonna flip! disabled udp checksum offloading on my nic and disabled the firewall completely(already tried the firewall part before) and now it works... obviously i have to add a rule of some sort... i already allowed the ports in use, but something is missing – user2093348 Sep 24 '13 at 15:20

0 Answers0