Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3809868
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:22:19+00:00 2026-05-19T15:22:19+00:00

I’m in need to create an GPRS connection in an PDA that has windows

  • 0

I’m in need to create an GPRS connection in an PDA that has windows ce 6. Now normally i would had to use the manufacturer’s dll to create that, but they said that they use ras to accomplish this. The only problem of using that is that i program in .net c#, and the library is an unmanaged code one.

Fortunately i came by the opennetcf ras library that does already the necessary pInvokes for the windows ras library, the only problem being the poor documentation.

I created then an library that would call and set-up the necessary GPRS connection on windows. I’m using an Portuguese telecom operator that uses the following definitions:

Operator Name: Optimus P
Apn:  umts
Password: *******
User: ******

Consulting the gsm module definition, i had the following modem settings:

Connection Name: GPRS
Device: Hayes Compatible on COM1:
Baund Rate:115200
Data Bits: 8
Parity:1
Stop Bits: 1
Flow Control: Hardware

and of course the extra settings (or how i call it the atCall)

+cgdcont=1, "ip", "umts"

This settings when i use the control panel and do an connect with that profile, it connects and i’m able to call all the webservices without an error. It also shows an extra profile for the modem that shows the settings for the device, incluid the ipaddress, subnet mask and even the default gateway.

The problem is that when i use the library that i created to create an gprs connection programatically, and then call the webservices at some point it throws me an web exception : The remote name could not be resolved. I also checked and the extra icon does not appear, but if i see the GPRS status it appears as it is connected.

The code that create, destroys and query if it exists an connection is as follows:

using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using OpenNETCF.Net;
using OpenNETCF.Diagnostics;

namespace gsmAdapterNet
{
/// <summary>
/// GPRS Connection class
/// </summary>
public class GPRS
{
    private static string connectionName = "GPRS";


    /// <summary>
    /// Connects the GPRS.
    /// </summary>
    /// <returns></returns>
    public static bool ConnectGPRS()
    {

            //precisamos de obter as connecoes e ligar

            RasEntryCollection connecoesPossiveis = Ras.Entries;
            RasEntry _currentEntry = connecoesPossiveis[connectionName];
            _currentEntry.RasStatus += new RasNotificationHandler(RasStatusHandler);
            RasError resultado = _currentEntry.Dial(false);
            if (resultado == RasError.Success)
                return true;
            else
                return false;


    }

    static void RasStatusHandler(int hConn, RasConnState State, RasError ErrorCode)
    {
        Logger.WriteLine("");
        Logger.WriteLine("RAS STATUS: " + ErrorCode.ToString() + " , State: " + State.ToString());
    }


    /// <summary>
    /// Disconnects the GPRS.
    /// </summary>
    /// <returns></returns>
    public static void DisconnectGPRS()
    {
        RasEntryCollection entradas = Ras.Entries;
        foreach (RasEntry possivelEntrada in entradas)
        {
            if (possivelEntrada.Name == connectionName)
            {
                possivelEntrada.Hangup();
            }
        }


    }

    /// <summary>
    /// Determines whether this instance is connected.
    /// </summary>
    /// <returns>
    ///     <c>true</c> if this instance is connected; otherwise, <c>false</c>.
    /// </returns>
    public static bool isConnected()
    {

        RasConnection[] conecoes = Ras.ActiveConnections;
        foreach (RasConnection conecao in conecoes)
        {
            if (conecao.Name == connectionName)
                return true;
        }
        return false;

    }

    /// <summary>
    /// Dumps the ras entries.
    /// </summary>
    public static void DumpRasEntries()
    {
        foreach (RasEntry entry in Ras.Entries)
        {
            Logger.DumpRasEntry(entry);
        }
    }

}

}

So resuming the question is how i can create an viable connection with the opennetcf ras library

Best Greetings

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:22:20+00:00Added an answer on May 19, 2026 at 3:22 pm

    It seems as if the network interface for the GPRS connection that you get when dialing in is not configured with the correct DNS servers. Alternatively, the domain names needed for your service calls may be wrong.

    To verify this:

    Is it only a specific web service whose domain name cannot be resolved? Is it always the same? Do others work? Can you simply HTTP GET something like http://stackoverflow.com programmatically after the connection has been established?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.