Creating a GPRS Connection using Windows Mobile 6.5 - gprs

I am writing an application in which I need to make a GPRS connection.
Can someone please help me how I can setup this connection using C#.
thanks
EDIT
I will need to connect a GPRS connection because I need to call a webservice.

To make a GPRS connect using a dial up connection subsystem from .NET CF on PocketPC, you can use Connection Manager functions such as ConnMgrEnumDestinations, ConnMgrEstablishConnection and ConnMgrReleaseConnection. Check out http://msdn.microsoft.com/library/default.asp?url=/library/en-us/APISP/html/sp_cnmn_connection_manager.asp for details. There are no classes available for this in .NET CF, but it can be done quite easily using P/Invoke if you have some experience with this.
The following blog post covers this in detail and also contains some C# code: http://blogs.msdn.com/anthonywong/archive/2006/03/13/550686.aspx.
Another solution is using the Smart Device Framework by OpenNETCF.org that contains a wrapper class for the Connection Manager:
http://www.opennetcf.org/downloads/bin/SmartDeviceFramework14.zip
It is free for any commercial or noncommercial purpose up to the version 1.4. It also includes the source code, so you might either use it as is or as a reference for your own implementation if you prefer.
(solution taken from our website at http://forum.rebex.net/questions/503/how-to-establish-a-gprs-connection-for-ftp-use-on-net-cf)

This page might help...
http://msdn.microsoft.com/en-us/library/bb840031.aspx

Is it really important to explicitly create that connection? If you initiate any outgoing (eg. not localhost) connection (like a HttpWebRequest), the OS will automatically connect to the Internet using the preferred connection, which can be GPRS.

Related

QT Webkit seems oblivious to new wireless network connection

I am building a app that has a javascript layer on top that uses QtWebkit to occasionally access web pages; however if I start my app up without a wireless connection and then set up a connection (using ifup then a device connect then dhcpcd to get the gateway set up) the Javascript continues to be oblivious to the gateway to the wider world.
QNetworkConfigurationManager in my QtApp reports the connection is up OK after I updateConfigurations() and the IP and netmask are reported OK as well.
wget from the command prompt happily obtains whatever webpage I ask it to get.
But if I create an instance of QNetworkAccessManager then
manager->get(QNetworkRequest(QUrl("http://www.google.com/index.html"))); replies that it cannot reach the page.
Do I need to poke an update the QtWebKit somehow for the JS layer to update it's configuration as well?
The problem has been found; the implementation of Qt for embedded we have has an error in it for our implementation of uclibc. This has been patched by the (deleted for security reasons) company that supplied us with the libraries for our embedded solution.

OPC Service Processing and Monitoring

I'm writing a windows service that will be used for some data processing. The service will connect to an OPC (KepWare) service and will monitor specific items through event handlers. It will also have to write back to the OPC data item when necessary; however, the data to be written back will have to come from a windows mobile handheld device.
I'm just getting perplexed on the design aspect of this system. I'm trying to make sure that I design this in an abstract manner in order to make it scalable and easily maintainable. However, I'm just stuck on how to communicate with the service in order to tell it write this value to the OPC server. I'm thinking WCF is the way to go but I'm not exactly sure how to write it where I can obtain a reference to my connected OPC object when the client makes the call? Should I be writing a WCF library and host it inside the windows service or should I be going down a different route?
Thanks in advance
You should read up on the fundamentals of OPC-DA and OPC-Xi (also known as OPC .NET 3.0). The OPC Foundation has simple documentation available for free: look for the "specifications" that are available to non-members.
The KepWare server should support both (depending on the KepWare server you are using). OPC Xi is WCF-based and will be the easiest way for you to talk to it. However, that particular communication channel needs to be open and enabled for it to work.
If you don't have that, then you need to fall back to OPC-DA which is DCOM based. You can find .NET OPC client libraries that will help you with this. There are some free and some commercial ones out there from different companies.

How to create a receiver application in .NET that would accept messages or requests from ASP.NET page?

First of all thanks for taking the time to read my question. Here is what I am trying to accomplish followed by what I have so far on this.
What I want to do is create a Windows application (or server of sorts) that would listen for requests from an ASP.NET application. The windows application would be installed and would listen for messages from ASP.NET application and then do some processing. The flow is like this:
A user downloads the desktop application and registers their IP address on my web site. After downloading the desktop app, the ASP.NET application can then send requests to that particular desktop client for further processing. I think further processing is independent of the resolution in this case that's why i have skipped over details on what processing would be done. But if you think it is important, please let me know and I will add those details as well.
I have looked into creating a TCP server that would listen for requests. Because the user has already registered their IP address on my web site, my web site assigns them a unique identifier and stores the ID alongwith IP address in database. Now, the ASP.NET site can send requests to that desktop application.
I have looked into creating a TCP server for this purpose. While researching I also came across PNRP and it seems something like what I am trying to do.
Can you guys recommend some solutions or where I should be looking at for this scenario? Should I create a simple TCPLISTENER or may be go with PNRP approach? Or something else?
The basic requirement is for a web application to be able to communicate with a desktop application. The web application would be servicing numerous users and each user would have a desktop application installed. Which user for which desktop client question would be addressed by the web application that would maintain a database of unique user id's and their corresponding IP Address.
Thanks in advance for your help.
You could use .NET remoting or a web-service in the desktop app. Use WCF or WSE for the latter. You can use COM to add windows firwall rules.
Whatever you do, take firewalling/NAT into account. It might be easier for the client application to poll the server (initiate the connection) otherwise you open a can of worms by trying to have a remotely-accessible server in your user's computer without having to do some very manual configurations on the user's networking equipment.
Once you have that part sorted out, what I used in your situation was .NET Remoting. At the time WCF had not come out and when it did it was to crippled for my needs. TCP IP sockets were too raw (I had to write too much code) and so Remoting solved my problem ideally (a hand full lines of code to set up the connection, and everything was automatic from there on).
EDIT: I use an excellent third party library that makes Remoting even more flexible (flexible enough that I am still waiting for WCF to catch up with the featureset so that I stop using Remoting, and no luck yet!). Check out http://www.genuinechannels.com/ to see all the features they have. It includes making calls from server to client, and that sounds exactly like what you need to do. Check it out.

Bind QTcpSocket on dual-homed host

I have an application that is being built using Qt. It will be running on machines that will have two (or more) network cards. I need the ability for my application to select which ethernet interfaces for a TCP connection. Before anyone suggests it I cannot guarenteed that routing tables will be setup correctly. I know how to do this using the windows socket classes but have been unable to find anything about it for Qt. Any help would be greatly appreciated!
Are you referring to an outbound connection or an inbound connection?
If you're referring to an inbound connection, all you need to do is specify a QHostAddress to the QTcpServer::listen call.
If you're talking about an outbound connection, you can call QAbstractSocket::setLocalAddress to force the local address to something specific.
Cheers,
If you are using Qt 4.2 or later, you can use QNetworkInterface to get a list of network interfaces in the computer and then create some sort of network interface selection.

How to connect Adobe Air client side with Java VM Debug Interface?

I'd like to know if/how would it be possible to connect Adobe Air application to Java VM Debug Interface? I have some objects residing on server side and don't want to change the code there and server already allows to do remote debugging.
Here's the information about JPDA:
http://www.j2ee.me/j2se/1.3/docs/guide/jpda/architecture.html
Greatly appreciate for your advice in advance.
Be very careful about opening the remote debugging interface to the Internet. That could be a huge security problem.
Security considerations aside, only a single debugger process can attach to the JVM at the same time.
You should really look at some of the more regular remoting protocols, such as SOAP or REST over HTTP(S) to talk to your server. This is not more work (probably less) than trying to shoe-horn JPDA into something it was not meant to do.

Resources