locked
GPRS Communication using GSM Mobile RRS feed

  • Question

  • User320793524 posted

    Dear all, 

    I am working on a project which involves send messages through GPRS modem to a specified server port(having static IP).

    I need .net code to send data through GPRS modem to server's specified port. If anyone having experience in this area please guide me.

     Thanks,

    Shanmugam

    Saturday, June 6, 2009 4:37 AM

All replies

  • User1572444908 posted

    Hi,

    In this moment, I'm working on  the same project too, GPRS data is datagram packets, so we need a UDP socket that listens in an specific IP  and  port, to test, i began by writing console application in C#, i launched it in my VPS,

            private const int UdpPort = 8002;  
            private const string sIPAdress = "A.B.C.D";

            public GpsListner()
            {
                Inits();
            }

            public void Inits()
            {
                try
                {
                    UdpThread = new Thread(new ThreadStart(StartReceive));
                    UdpThread.Start();             
                    Console.WriteLine("AStarted GPS Server");
                    Console.ReadLine();
                }
                catch (Exception ex)
                {
                    Console.WriteLine("An UDP Exception has occurred!" + ex.ToString());
                }

            }

     

            public void StartReceive()
            {

                try
                {
                    IPEndPoint localIpEndPoint = new IPEndPoint(IPAddress.Parse(sIPAdress), UdpPort);
                    UdpClient Udp = new UdpClient(localIpEndPoint);
                    Console.WriteLine("Start to Receive on :" + sIPAdress, EventLogEntryType.Information);

                    while (true)
                    {
                        Console.WriteLine("In Loop", EventLogEntryType.Information);
                        IPEndPoint tmpIpEndPoint = new IPEndPoint(IPAddress.Parse(sIPAdress), UdpPort);
                        EndPoint remoteEP = (tmpIpEndPoint);
                        Byte[] received = Udp.Receive(ref tmpIpEndPoint);
                        String device_id = null;
             
                        Console.WriteLine("GPS is connected through UDP From: " + tmpIpEndPoint.ToString() + "\n" + BitConverter.ToString(received) + "\n" + "Packet Size :" + received.Length, EventLogEntryType.Information);


                    }

                }
                catch (SocketException se)
                {
                    Console.WriteLine("A Socket Exception has occurred!" + se.ToString());
                }

            }

     

    Now, when i send an asynchronous string remotly from a client socket, the socket server catch the data but when sending packets from gprs unit nothing happens

    I hope that we can find a solution together

     

    Thank you  

    Saturday, June 6, 2009 5:35 AM
  • User320793524 posted

    Hi,

    Thanks for your response.

    The problem is transmission from modem itself. I successfully tested the modem for sending SMS over gprs. As we mentioning the SMSC to send SMS it reaches safely to the required mobile.

    We don't verify whether the data was transmitted over gprs or not. While try to send data over gprs to a specified server, in my guess it should pass through mobile operator's server and proxy (atleast for connection establishment). When I queried to mobile operators, they told there is no block in their side.

     I am working for last three days only to fix this problem. Please update if you get any improvements. I always believe 'Teamwork works'.

    Thanks

    Saturday, June 6, 2009 7:21 AM
  • User-2060689755 posted

    HI shanchin2k,

    I suggest you take a research gsmcomm 3rd party component, which provide the function to send SMS. For more information:

    http://www.scampers.org/steve/sms/libraries.htm

    http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesvbcs/thread/3e7c3c64-8201-4eee-9bd2-f505b75938e4/

     

     

    Best regards,
    Guang-Ming Bian - MSFT

    Friday, June 12, 2009 5:20 AM
  • User320793524 posted

     Dear Guang-Ming Bian,

       Thanks for your reply. I already succeeded with SMS sending but it is some what costlier solution. I need a solution at the server end which receive the GPRS data through a port.

      Both TCP/IP and UDP packets are tested manually but while sending through GPRS there is no symptoms at the server end.

     Thanks,

    Shanmugam

    Monday, June 22, 2009 5:47 AM
  • User-455432347 posted

    Please you help me.

    We're programming on the mobile platform and the tools as follows:
    Windows Mobile 6.0 operating system, programming with Windows Mobile 6.0 SDK, used in the ActiveSync 4.5,  Emulator and Windows Mobile 6.0 SDK propessional provided. Work on the Windows XP SP2.
    My job is programming applications GPRS technology to send data over the network from a mobile phone to a Server (with public IP). But now I do not have server so I need to set up your computer simulation is a server. But I do not know the settings for computers and phones in the Emulator is installed on it to communicate with each other through network protocols. hope you help me. I am very need.


    Monday, March 22, 2010 10:46 AM