?
Solved

UDP connection in Windows CE 3.0

Posted on 2004-04-07
5
Medium Priority
?
803 Views
Last Modified: 2013-12-27
I'm trying to read data from a serial port on an Ipaq 3630 with Windows CE 3.0 and then transmit the data using UDP (not TCP) protocol to a PC (Windows XP) over the internet vía GPRS, all this in any Visual Basic language.

The problem is:
1. Embedded Viusal Basic Winsock control doesn't accept UDP protocol.
2. I haven't been able to find how to use the winsock API of Windows CE (suposing it accepts UDP protocol) from Visual Basic because apparently it uses a structure (which EVB doesnt accept) to initialice it.
3. Visual Basic .Net for pocket pc platform solves the socket problem but doesn't manage serial communications. I found an class to manage serial communications from EVB.NEt but it doesn't seem to work for a Windows CE 3.0 device.

Thanks in advace.
0
Comment
Question by:crocca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 10780139
http://www.pocketpcdn.com/articles/http.html

Good news Winsock does accept the UDP Protocol
0
 

Author Comment

by:crocca
ID: 10784336
Thanks Mika but I have alrady seen this article and:

1. The protocol used here is TCP, not UDP ("WinSock1.Protocol = CInt(0)", 0 is TCP, 1 is UDP but is not accepted in EVB)
2. This article (like others) says that Winsock Control accepts UDP but when you put a Winsock Control in a form, you get only 2 options for the protocol: 0 (TCP) and 2 (IR).

I've found one Micosoft Example (the socket example that comes for the HPC SDK, found in "C:\Program Files\Windows CE Toolsrama\wce211\MS HPC Pro\samples\eVB\WSock\Device") that uses the thre options, TCP, UDP and IR, but in the UDP part of the code it says that the winsock control doesn't accept UDP!!!!.
I tested it and it's true. If you put 1 in the protocol you get an error 380, "invalid property value", and if you use the bind() method (from the udp protocol) you also get an error ("object doesn't accept this method" or something like that)

I think the solution to implement this in VB passes through making API calls to the socket API but:
1. I haven't found the name of the socket dll to call or the API functions
2. What I've seen in C++ cals to the API, you need to initialize de socket calling a function with a structure as a parameter. And EVB doesn't accept structres.

I still haven't got a clue to the solution other than using TCP protocol, but I don't want to because I will be recieving packets from various "senders" to the same "reciever" so I dont want to establish a connection. Thats the definition of UDP!

Carlos
0
 
LVL 7

Accepted Solution

by:
CJCraft earned 1500 total points
ID: 10795252
I'd consider the VB.NET path.  It is more powerful and more supported.  If you need serial support in VB .NET you can use the Smart Device Framework, open source, from http://www.opennetcf.org/CategoryView.aspx?category=Home.
0
 
LVL 7

Expert Comment

by:CJCraft
ID: 10795262
0
 

Author Comment

by:crocca
ID: 10809258
Thanks CJCraft,

I used the Smart Device Framework. It got some errors that couldn't make it work but now it is almost working. I still get an error when closing the serial port but i guess I'll fix it soon.

Thanks for the tip on the Smart Device Framework.

I still can't believe microsoft didn't implement the serial com on VB .Net!

Carlos
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month8 days, 6 hours left to enroll

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question