Main Site Documentation

Cellular Radio and Azure Cloud Services


#1

Hi there,

I started a few weeks ago trying to build a system that includes Cellular Radio trying to reach a Web Service (WCF) on a Azure Cloud Server.

As part of my project I started to use the default sample program that comes within this site:

using Gadgeteer.Modules.GHIElectronics;
using GHI.Networking;
using Microsoft.SPOT;
using Microsoft.SPOT.Net.NetworkInformation;
using System.Net;
using System.Text;
using System.Threading;
using Gadgeteer.Modules.GHIElectronics;


namespace SampleCellRadio
{
    public partial class Program
    {
        void ProgramStarted()
        {
            NetworkChange.NetworkAvailabilityChanged += (a, b) => Debug.Print("Network availability changed: " + b.IsAvailable.ToString());
            NetworkChange.NetworkAddressChanged += (a, b) => Debug.Print("Network address changed");

            this.cellularRadio.ModuleInitialized += this.cellularRadio_ModuleInitialized;

            this.cellularRadio.PowerOn(30);
        }

        void cellularRadio_ModuleInitialized(CellularRadio sender)
        {
            new Thread(() =>
            {
                Thread.Sleep(15000);

                this.cellularRadio.UseThisNetworkInterface("internet.movistar.com.co", "movistar", "movistar", PPPSerialModem.AuthenticationType.Pap);

                while (this.cellularRadio.NetworkInterface.IPAddress == "0.0.0.0")
                {
                    Debug.Print("Waiting on DHCP");
                    Thread.Sleep(250);
                }

                Debug.Print(cellularRadio.NetworkInterface.IPAddress);
                
                // What shoul i do??


                
            }).Start();
        }
    }
}

and I partially achieved until the lease of the IP but after that I donĀ“t know what to do.

Does some body of you could help me with this?.


#2

@ r.ricardog - If you reached that point, that means that the module is successfully initialized and got an IP address. You can now make web requests and process the responses.


#3

Thanks for your answer, but can you point me to what should be the next set of instructions?. Or perhaps give me some class of pseudo algorithm? . Or perhaps pointing me to some shared code and give me some clue of how to join both the WCF and the cell redio software.

Thanks.