Show Posts
Pages: 1 ... 22 23 [24] 25 26
346  Using Arduino / Programming Questions / Re: Can not connect to the server and send a SMS on: January 13, 2013, 06:25:59 am
Ok then I tried,

Between the command and the answer, I delayed it with 1sed, then 2sec, then 5sec and lastely 10sec. In order to make sure that the command have time to sent.

In all case, I only got an "OK" for the other commande, it return a empty line like \n\r.
 I just would like to mentionned, I put the SIM card to my smartphone, and I could go the the web, send message.

Quote
Setting up APN Context

Activating PDP Context

Configuring TCP connection to TCP Server
OK
Starting TCP Connection



I supposed an empty line is not good?

Cheers
347  Using Arduino / Programming Questions / Re: Can not connect to the server and send a SMS on: January 13, 2013, 06:12:04 am
Dear John

Before trying, I thank for this proposition.
How many delay should I considere between the command and the answer?
I was thinking about 1sec

Cheers
348  Using Arduino / Programming Questions / Re: How can I limit the number of 54.00000000000 on: January 13, 2013, 06:10:30 am
Hello

myString is declared like this
Quote
PString myString(buffer,sizeof(buffer));

Did I answer to your question?

I solved my probleme like @robtillaart suggeseted

Serial.print(value, 2)
349  Using Arduino / Programming Questions / Can not connect to the server and send a SMS on: January 12, 2013, 03:39:05 pm
Dear All,

I ma very frustreted because I spent so many time to understand why my server does not answer. The script can not connect.
In the pasted it worked.

Some can tell me how I can debug it?
Do you see something wrong?
(My fire wall is open to the port81)

Many thank fro your help

My bauds are like this:
 Serial.begin(4800);
    cell.begin(9600);

Quote
void loop() {
  /* If called for the first time, loop until GPRS and AT is ready */
  if(firstTimeInLoop) {
    firstTimeInLoop = 0;
    while (GPRS_registered == 0 || GPRS_AT_ready == 0) {
      readATString();
      ProcessATString();
    }

    if(POWERPIN) {
      pinMode(POWERPIN, OUTPUT);
    }

    pinMode(13, OUTPUT);
   
    Serial.println("GPS Parser Initialized");
    digitalWrite(POWERPIN, LOW);
   
    //Serial.println("Setting Band for 1800 frenquency");
    //cell.println("AT+SBAND=4");
   
    delay(1500);

    Serial.println("Setting up APN Context");
    cell.println("AT+CGDCONT=1,\"IP\",\"internet\"");

    delay(1500);
    Serial.println("Activating PDP Context");
    cell.println("AT+CGACT=1,1");

    delay(1500);

    Serial.println("Configuring TCP connection to TCP Server");
    cell.println("AT+SDATACONF=1,\"TCP\",\"xx.xxx.xx.xxx\",81");

    delay(1500);

    Serial.println("Starting TCP Connection\n");
    cell.println("AT+SDATASTART=1,1");
   
    delay(2000);
   
   
    //Send SMS
    cell.println("AT+SBAND=4"); // for 900&1800
    cell.println("AT+CMGF=1"); // set SMS mode to text
    cell.println("AT+CMGS=");  // now send message...
    cell.write(34); // ASCII equivalent of "
    cell.println("0041762233440"); // wrong number to not publish it (0041=Country code, 76=areacode)
    cell.write(34);  // ASCII equivalent of "
    delay(500); // give the module some thinking time
    cell.println("Bipme Alarm");   // our message to send
    cell.write(26);  // ASCII equivalent of Ctrl-Z
    delay(15000); // the SMS module needs time to return to OK status
   
   
    Serial.println("SMS sent");

    onLed(redLedPin);

350  Using Arduino / Programming Questions / Re: How can I set band for SMS on: January 12, 2013, 01:59:47 pm
Here should be the answer
https://forum.sparkfun.com/viewtopic.php?f=13&t=25734

Cheers
351  International / Français / Command définir SBAND pour la suisse on: January 12, 2013, 01:32:25 pm
Bonjour à tous,

J'essayé de programmer mon Arduino pour qu'il envoie un SMS.

J'ai vu qu'il y avait la command AT+SBAND=7.

Mais es-ce que ca marche pour la suisse aussi?

Y a il une liste pour tous les pays?

Merci pour vos réponses
352  Using Arduino / Programming Questions / How can I set band for SMS on: January 12, 2013, 01:18:59 pm
Dear all,

I am traing to send SMS.
I red this:
Quote
Make sure the proper GSM band has been selected for your country. For the US the band must be set to 7.
To set the band, use this command: AT+SBAND=7

As, I am not in US, how can I know the band for other country?
For now I need for Switzerland.

But there is a lits of countries?

Thank a lot
Cheers
353  Using Arduino / Programming Questions / Re: How can I limit the number of 54.00000000000 on: January 12, 2013, 01:16:22 pm
Hello

Thank for your help
Cheers
354  Using Arduino / Programming Questions / How can I limit the number of 54.00000000000 on: January 12, 2013, 12:07:22 pm
Good afternoon,

I am looking to limit the number of decimal
this
Code:
myString.print(falt,DEC);

return 54.000000000
and I would like to have 54.00

Many thank
355  Using Arduino / Programming Questions / Re: Issue with DLINE and UART on: January 12, 2013, 12:24:45 am
Hello,
Thank for helping me.

I tryed several baud, but I mainly work on 4800. I once read to work 115200

Code:
Serial.begin(4800);
cell.begin(9600);

I am located in Switzerland
356  Using Arduino / Programming Questions / Re: Issue with DLINE and UART on: January 11, 2013, 03:46:24 pm
Dear PeterH
Thank fro answering.
I partially understand you answer.
If I understood well, the pin 0+1 shoud not be use. Pin 2+3 are software serial.

How can I make sure which pin are free?

Thank again
357  Using Arduino / Programming Questions / Re: Issue with DLINE and UART on: January 11, 2013, 02:28:43 pm
I discover some thing interesting.

I create a falk
//Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.
SoftwareSerial cell(2,3);

Then below, I am ready the at_buffer (Serial.println(at_buffer)smiley-wink.
Code:
/* Reads AT String from the SM5100B GSM/GPRS Module */
void readATString(void) {
  char c;
  buffidx= 0; // start at begninning
  while (1) {

    if(cell.available() > 0) {

      c=cell.read();
      if (c == -1) {
        Serial.print(F("true"));
        at_buffer[buffidx] = '\0';
        return;
      }
     
      if (c == '\n') {
         Serial.print(F("continue"));
        continue;
      }
     
      if ((buffidx == BUFFSIZ - 1) || (c == '\r')){
        Serial.print(F("true"));
        at_buffer[buffidx] = '\0';
        return;
      }

       at_buffer[buffidx++]= c;
       
       Serial.println(at_buffer);
     }
  }
}
on DLINE mode Serial.println(at_buffer); return something incoherent.
Quote
Starting SM5100B Communication...
`
`†
`†~
`†~˜
`†~˜
`†~˜
`†~˜
`†~˜
Quote
: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
+SIND: 10,"SF,,0Ã~˜
¡*WÉÑ¥¹SM5100B Communication...
0
0Ãþ˜
0Ãþ˜
0Ãþ˜

While in UART mode I got this
Code:
+SIND: 1
+SIND: 10
+SIND: 10,
+SIND: 10,"
+SIND: 10,"S
+SIND: 10,"SM
+SIND: 10,"SM"
+SIND: 10,"SM",
+SIND: 10,"SM",1
+SIND: 10,"SM",1,
+SIND: 10,"SM",1,"
+SIND: 10,"SM",1,"F
+SIND: 10,"SM",1,"FD
+SIND: 10,"SM",1,"FD"
+SIND: 10,"SM",1,"FD",
+SIND: 10,"SM",1,"FD",1
+SIND: 10,"SM",1,"FD",1,
+SIND: 10,"SM",1,"FD",1,"
+SIND: 10,"SM",1,"FD",1,"L
+SIND: 10,"SM",1,"FD",1,"LD
+SIND: 10,"SM",1,"FD",1,"LD"
+SIND: 10,"SM",1,"FD",1,"LD",
+SIND: 10,"SM",1,"FD",1,"LD",1
+SIND: 10,"SM",1,"FD",1,"LD",1,
+SIND: 10,"SM",1,"FD",1,"LD",1,"
+SIND: 10,"SM",1,"FD",1,"LD",1,"M
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC"
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"R
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC"
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"M
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME"
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME",
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME",1


It's a bit like if it is running and runngin until it crash...
358  Using Arduino / Programming Questions / Issue with DLINE and UART on: January 11, 2013, 01:57:59 pm
Dear All,
First I would like to list my Harware.
Arduino : https://www.sparkfun.com/products/11021
GPRS/GSM Module :  https://www.sparkfun.com/products/9607?
GPS Shield https://www.sparkfun.com/products/10710 with DLINE and UART switch
HPS https://www.sparkfun.com/products/465?

Firstly I assembled the arduino and the GPRS/GSM module and I added some sletch to push data to my ubuntu server. It's works fine!!
Secondely, I assembled the arduino and the GPS Shild with the GPS. I left the switch to the DLINE mode. I can upload code and run it. It's work on DLINE mode.

Lastly, I assembled the adruino with the GORS/GPS module on second position, and lastly the GPS Shield with the GPS.

From that point the DLINE/USRT mod make an issue. I can upload on DLINE mode, but I have to switch to UART to see my job.

I do not understand why I have to switch to UART while before I could run my GPS on DLINE mode, without the GPRS/GSM module.

I really need a solution to upload and run my code on DLINE mode.

Do you have some explication why when the 3 module are assembled, I need to swicth to UART?
Is there a solution to leave in DLINE mode at any time?

Many thank for your explication.

Cheers and nice day.
359  Using Arduino / Programming Questions / Re: How can we work with AT+SDATASTATUS on: January 10, 2013, 03:21:18 pm
Hello,
Ok I understand what you means, but I could get the result I want to have
The first question which come to my mind, how long should I wait until I can get a respond. I tryed with 5sec

Taking inconsideration this

Code:
cell.println("AT+CGDCONT=1,\"IP\",\"internet\"");
delay();
     status();

I add delay(5000); just before status().
I also tried to add delay(5000);
here
Code:
static void status(){
   
     while(cell.available()){
        incoming_status=cell.read();
        delay(5000);
        Serial.print(incoming_status);
      }

}
But in all case, I have not a result for

Code:
cell.println("AT+CGDCONT=1,\"IP\",\"internet\"")

Cheers
360  Using Arduino / Programming Questions / Re: How can we work with AT+SDATASTATUS on: January 10, 2013, 09:56:43 am
It still does not work.

I wish to display the result or status of each command, in order to make sure that all of them return me an OK.

Here is my code. Each command ate followed by status() function. I also add
Code:
cell.print("+SOCKSTATUS");
, but it does not show/display anythink

Code:
   Serial.println(F("Setting up PDP Context"));
     cell.println("AT+CGDCONT=1,\"IP\",\"internet\"");
     status();
     delay(1000);
     
     Serial.println(F("Activating PDP Context"));
     cell.println("AT+CGACT=1,1");
     status();
     delay(1000);
     
     Serial.println(F("Configuring TCP connection to TCP Server"));
     cell.println("AT+SDATACONF=1,\"TCP\",\"92.104.69.134\",81");
     status();
     delay(1000);
     
     Serial.println(F("Starting TCP Connection\n"));
     cell.println("AT+SDATASTART=1,1");
     status();
     delay(1000);
     
     Serial.println(F("Getting status"));
     cell.print("AT+SDATASTATUS=1");
     status();
   
    Serial.println(F("Display status"));
     cell.print("+SOCKSTATUS");
     status();

Here is my status() command
Code:
static void status(){
   
     while(cell.available()){
        incoming_status=cell.read();
        Serial.print(incoming_status);
      }
}

Please, help with exemple, it would be very nice from you.

Have a nice day.
Pages: 1 ... 22 23 [24] 25 26