Re: Need help with UDP packets -- 10% success not good enough
From: John Lindwall (jlindwall_no_spam_at__no_spam_yahoo.com)
Date: 04/16/04
- Next message: Joby: "How to check internet is available or not"
- Previous message: Nicholas Tsipanov: "Re: How to Unzip a .zip file in PocketPC"
- In reply to: John Lindwall: "Need help with UDP packets -- 10% success not good enough"
- Messages sorted by: [ date ] [ thread ]
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
>
- Next message: Joby: "How to check internet is available or not"
- Previous message: Nicholas Tsipanov: "Re: How to Unzip a .zip file in PocketPC"
- In reply to: John Lindwall: "Need help with UDP packets -- 10% success not good enough"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|