Solved

UDP connection in Windows CE 3.0

Posted on 2004-04-07
5
797 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 500 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
iphone 5 nearly destroyed is there anyway to retrieve that data 21 101
phone mike not working samsung 4 149
Mobile app idea 6 106
Is attached iPhone screen an IOC 5 67
I recently asked a question (http://www.experts-exchange.com/Programming/Smartphones/Android/Q_28684946.html) about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

738 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