I try it years ago, but not success. Now I try again, still bad.
There are several drivers for GHI driver, Seed driver, Byron’s Driver, Progressio’s Driver.
Also, there isn’t existing a Tutorial for this. It is hard to start it.
I review the forums trying a code to start but not success.
public partial class Program
{
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
/*******************************************************************************************
Modules added in the Program.gadgeteer designer view are used by typing
their name followed by a period, e.g. button. or camera.
Many modules generate useful events. Type +=<tab><tab> to add a handler to an event, e.g.:
button.ButtonPressed +=<tab><tab>
If you want to do something periodically, use a GT.Timer and handle its Tick event, e.g.:
GT.Timer timer = new GT.Timer(1000); // every second (1000ms)
timer.Tick +=<tab><tab>
timer.Start();
*******************************************************************************************/
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");
cellularRadio.DebugPrintEnabled = true;
cellularRadio.PowerOn(40);
cellularRadio.SendATCommand("AT");
cellularRadio.SendATCommand("AT+CPIN=0000");
cellularRadio.SendATCommand("AT+CMGF=1");
cellularRadio.SmsReceived += new CellularRadio.SmsReceivedHandler(cellularRadio_SmsReceived);
cellularRadio.SmsRetrieved += new CellularRadio.SmsRetrievedHandler(cellularRadio_SmsRetrieved);
cellularRadio.ModuleInitialized += new CellularRadio.ModuleInitializedHandler(cellularRadio_ModuleInitialized);
}
void cellularRadio_SmsRetrieved(CellularRadio sender, CellularRadio.Sms message)
{
if (message != null)
{
Debug.Print("RETRIEVED");
Debug.Print("FROM: " + message.TelephoneNumber);
Debug.Print("MSG: " + message.TextMessage);
Debug.Print("WHEN: " + message.Timestamp);
Debug.Print("STATUS: " + message.Status);
Debug.Print("POS:" + message.Index);
}
}
void cellularRadio_ModuleInitialized(CellularRadio sender)
{
Debug.Print("MODULE INITIALIZED");
}
void cellularRadio_SmsReceived(CellularRadio sender, CellularRadio.Sms message)
{
if (message != null)
{
Debug.Print("NEW SMS");
Debug.Print("FROM: " + message.TelephoneNumber);
Debug.Print("MSG: " + message.TextMessage);
Debug.Print("WHEN: " + message.Timestamp);
Debug.Print("STATUS: " + message.Status);
Debug.Print("POS:" + message.Index);
}
}
}
output
[quote]Program Started
The thread ‘’ (0x3) has exited with code 0 (0x0).
CellularRadio : Turning ON
CellularRadio : Turning module on
CellularRadio : <
RDY
CellularRadio : <
+CREG: 2
+CREG: 0
+CGREG: 0
+CFUN: 1
+CPIN: SIM PIN
CellularRadio : <AT
OK
CellularRadio : SENT: AT
CellularRadio : SENT: AT+CMGF=1
CellularRadio : <AT+CMGF=1
OK
CellularRadio : SENT: AT+CSDH=0
CellularRadio : <AT+CSDH=0
ERROR
CellularRadio : SENT: AT+CPBS=“SM”
CellularRadio : SENT: AT+CPMS=“SM”
CellularRadio : <AT+CPBS=“SM”
ERROR
AT+CPMS=“SM”
ERROR
CellularRadio : SENT: AT+CNMI=2,1,0,1,0
CellularRadio : SENT: AT+COLP=1
CellularRadio : <AT+CNMI=2,1,0,1,0
ERROR
AT+COLP=1
ERROR
CellularRadio : SENT: AT+CGREG=1
CellularRadio : SENT: AT+CREG=1
The thread ‘’ (0x5) has exited with code 0 (0x0).
CellularRadio : <AT+CGREG=1
OK
AT+CREG=1
OK
[/quote]