Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call #7

Closed
GoogleCodeExporter opened this issue Mar 20, 2015 · 15 comments
Closed

call #7

GoogleCodeExporter opened this issue Mar 20, 2015 · 15 comments

Comments

@GoogleCodeExporter
Copy link

How can this work if the phone number sent to SIM900 in the next format:

[code]
ATD
+420123456789
;
[/code]

???

Fix in call.cpp

void CallGSM::Call(char *number_string)
{
  if (CLS_FREE != gsm.GetCommLineStatus()) return;
  gsm.SetCommLineStatus(CLS_ATCMD);
  // ATDxxxxxx;<CR>
  gsm.SimpleWriteWOln("ATD");
  gsm.SimpleWriteWOln(number_string);    
  gsm.SimpleWrite(";");
  // 10 sec. for initial comm tmout
  // 50 msec. for inter character timeout
  gsm.WaitResp(10000, 50);
  gsm.SetCommLineStatus(CLS_FREE);
}

Original issue reported on code.google.com by dmg...@gmail.com on 15 Jan 2012 at 1:22

@GoogleCodeExporter
Copy link
Author

On svn-69 this function is:

void CallGSM::Call(char *number_string)
{
  if (CLS_FREE != gsm.GetCommLineStatus()) return;
  gsm.SetCommLineStatus(CLS_ATCMD);
  // ATDxxxxxx;<CR>
  gsm.SimpleWrite("ATD");
  gsm.SimpleWrite(number_string);    
  gsm.SimpleWrite(";\r");
  // 10 sec. for initial comm tmout
  // 50 msec. for inter character timeout
  gsm.WaitResp(10000, 50);
  gsm.SetCommLineStatus(CLS_FREE);
}

No SimpleWriteWOln, but last '\r' seems odd.

Original comment by aapo.rantalainen on 16 Jan 2012 at 6:11

@GoogleCodeExporter
Copy link
Author

Why? You tested the command on the real SIM900?

Original comment by dmg...@gmail.com on 16 Jan 2012 at 6:32

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

The difference between SimpleWriteWOln and SimpleWrite is the \r at the end ;) 
the first is without so the command is ATD+3933282343;

Original comment by martines...@gmail.com on 18 Jan 2012 at 10:03

@GoogleCodeExporter
Copy link
Author



void SIMCOM900::SimpleWrite(char *comm)

{

    _cell.println(comm);

}



void SIMCOM900::SimpleWrite(const char *comm)

{

    _cell.println(comm);

}



void SIMCOM900::SimpleWrite(int comm)

{

    _cell.println(comm);

}



void SIMCOM900::SimpleWriteWOln(char *comm)

{

    _cell.print(comm);

}



http://arduino.cc/en/Serial/Println
Description
Prints data to the serial port as human-readable ASCII text followed by a 
carriage return character (ASCII 13, or '\r') AND A NEWLINE CHARACTER (ASCII 
10, or '\n').


Original comment by dmg...@gmail.com on 18 Jan 2012 at 10:54

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

You send this: ATD/r/n+3933282343/r/n;/r/r/n

Original comment by dmg...@gmail.com on 18 Jan 2012 at 10:59

@GoogleCodeExporter
Copy link
Author

From sniffer

Original comment by dmg...@gmail.com on 18 Jan 2012 at 11:05

Attachments:

@GoogleCodeExporter
Copy link
Author

Yes... but pay attention that the last one is _cell.print(comm); and not 
_cell.println(comm)
it is WithOut ln at the end ;)

Original comment by martines...@gmail.com on 18 Jan 2012 at 11:06

@GoogleCodeExporter
Copy link
Author

Which code is correct?

1)
 gsm.SimpleWrite("ATD");
 gsm.SimpleWrite(number_string);    
 gsm.SimpleWrite(";\r");

2)
 gsm.SimpleWriteWOln("ATD");
 gsm.SimpleWriteWOln(number_string);    
 gsm.SimpleWrite(";");


Original comment by dmg...@gmail.com on 18 Jan 2012 at 11:14

@GoogleCodeExporter
Copy link
Author

Cool the sniffer program.. Which is its name? :) 
OK I've checked...the solution is that the correct one is 
 gsm.SimpleWriteWOln("ATD");
 gsm.SimpleWriteWOln(number_string);    
 gsm.SimpleWrite(";");
But if you ask me why in the last version there is the first..I don't know. 
Sorry, I didn't understood your right suggestion in the first comment!
Thank you :)

Original comment by martines...@gmail.com on 18 Jan 2012 at 11:24

@GoogleCodeExporter
Copy link
Author

> Which is its name? :) 
http://www.saleae.com/Logic

ps/ check all code, for example:

  gsm.SimpleWrite("GET ");

  gsm.SimpleWrite(path);

  gsm.SimpleWrite(" HTTP/1.0\nHost: ");

  gsm.SimpleWrite(server);

  gsm.SimpleWrite("\n");

  gsm.SimpleWrite("User-Agent: Arduino");

  gsm.SimpleWrite("\n\n");

  gsm.SimpleWrite(end_c);

and etc...

pps/ see attachment for email, HTTP, FTP for SIM900

Original comment by dmg...@gmail.com on 18 Jan 2012 at 11:48

Attachments:

@GoogleCodeExporter
Copy link
Author

Thank you! 
For the PS (get method) it works, but now I'm going to check all the code.
I also fixed another point where there was the same mistake.
For PPS: For now I want to improve the stability and try to fix all bugs before 
start new implementations (I haven't a lot of time in this months). But if you 
want to try or just to publish some your functions, I can add you at the 
project. Let me know :)

Original comment by martines...@gmail.com on 18 Jan 2012 at 11:59

@GoogleCodeExporter
Copy link
Author

Original comment by dmg...@gmail.com on 21 Jan 2012 at 4:45

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

This issue section is not longer supported.
Please check the support page www.gsmlib.org 

Original comment by martines...@gmail.com on 6 Jul 2013 at 11:27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant