Re: Need help with UDP packets -- 10% success not good enough

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: John Lindwall (jlindwall_no_spam_at__no_spam_yahoo.com)
Date: 04/16/04


Date: Fri, 16 Apr 2004 00:26:39 -0700

Problem solved -- thanks for your advice and attention.

The problem turned out to be rather mundane (and perhaps embarrassing
for me). There is a setting for "Power Save Mode" in my Pocket PC's
WLAN control panel. The default is "Auto". When I disable this
setting the UDP performance goes from dismal (about 10% success) to
stellar (near 100% as far as I can tell).

I had read references to disabling power save mode but I thought that
referred to the various settings related to automatically turning off
the device if unused. I was mistaken.

Sincerely,

John Lindwall

John Lindwall wrote:

> I need some help with receiving UDP packets on a Pocket PC. I have a
> simple program that receives UDP packets in a tight loop. I use
> PocketConsole to print a message when a packet arrives. When I run it I
> only get 10-12 packets received out of 100 sent. I know that UDP is not
> guaranteed delivery buit this seems ridiculously poor. I suspect my
> code is flawed or my network/Pocket PC configuration is not correct.
>
> If I run my ping utility that come with my Axim X3 (or the ping in
> VxUtil) and all ping packets are sent/received properly. It seems like
> my dorky little program should be more reliable.
>
> FYI: I also wrote a Java version of this program using the Ewe VM and
> get similar (un)reliability with receiving UDP.
>
> I'm attaching the C# code that receives the UDP packets, and if it
> matters, the java code that generates the packets.
>
> The method of interest is StartReceiveFrom() in the file Class1.cs, near
> the bottom of the file. I pasted it below also.
>
> The program creates a thread that executes this StartReceiveFrom()
> method. This method blocks waiting for a UDP Packet. I run a java
> program to generate 10-byte packets to test it with, which contain a
> packet number (1,2,3,...) in byte 0. This code attached prints the
> packet number found at byte 0 of the received data and goes back to
> waiting for another packet.
>
> If you have a code that does what I am trying to do please share the joy!
>
> (I'll attach that (UGLY) java packet generator program in case that
> helps you too)
>
> THANKS IN ADVANCE!
>
> John Lindwall
>



Relevant Pages

  • DatagramSocket receive performance
    ... We are experiencing a problem that packets are ... PC listening for those UDP packets. ... other in java. ... java -fullversion results in 1.6.0-b105 on my test platform (in ...
    (comp.lang.java.programmer)
  • Re: iptables performance
    ... There are connections and connections. ... actually know for how long) keep the way open for packets coming back the ... (as dropping all inbound ICMP would do -- f.ex. ... failure information returned by outbound UDP packets which were refused ...
    (comp.os.linux.networking)
  • RE: USB data verification-UDP packets
    ... The UDP packets I am talking about are the CETK ... > USB driver doesn't have much to do with networking, ...
    (microsoft.public.windowsce.app.development)
  • Algorithm - UDP Throughput Calculation
    ... attention to Java as a better language for GUI development. ... that streams x packets/sec of x bytes long to a server i also wrote. ... total number of bytes in the 10 packets divided by the elapsed time. ... If i keep the same rate but this time use 20 x 50byte UDP packets every ...
    (comp.lang.java.programmer)
  • Re: DatagramSocket receive performance
    ... We are experiencing a problem that packets are ... missing when the message rate gets higher than 50/second. ... PC listening for those UDP packets. ... the java test ...
    (comp.lang.java.programmer)