Giter Club home page Giter Club logo

a6lib's People

Contributors

1technophile avatar beyondszine avatar gnaeser avatar lukasvyhlidka avatar per1234 avatar skorokithakis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

a6lib's Issues

timed out connection always

Hi, I'd like to ask for your assistance please if you manage to solve this issue:
-qþÿáPower-cycling module...
Done, waiting for the module to initialize...
Done.
Autodetecting connection rate...
Trying rate 9600...
Issuing command:
AT
Reply in 2000 ms: ÿÿ
Timed out.
Issuing command:
AT
Reply in 2000 ms: ÿÿ
Timed out.
Trying rate 115200...
Issuing command:
AT
Reply in 2000 ms:
AT

Timed out.
Issuing command:
AT
Reply in 2000 ms:
AT

Timed out.
Couldn't detect the rate.
Waiting for module to be ready...
Autodetecting connection rate...

Already tried different baudrate, the output still the same. Thanks a lot.

software serial library ??

hey I am using this with Arduino IDE 1.6.8 and 1.6.9 but in both of them there are two errors coming up.

  1. D6 and D5 are not defined. Got to change them to 6 and 5.
  2. Software Serial library in the default library folder is not matching with the Software serial that you are using. Correct me If I am wrong here.

https://www.arduino.cc/en/Reference/SoftwareSerial

I am using the default software serial library.

Your constructor:

A6lib::A6lib(int transmitPin, int receivePin) {
    A6conn = new SoftwareSerial(receivePin, transmitPin, false, 1024);
    A6conn->setTimeout(100);
}

default Softwareserial lib. takes the last argument ??

Greek SIM

I have you faced any issue with Greek SIM (cosmote/wind)?
Never connected.

Can you send me a pic with connections?

I tried also directly with Putty Serial Connection,

Receive SMS

I wrote that lib in the Arduino IDE. Sending works fine but I can´t receive anything. only gibberish.

Issuing command: AT&F
REPLY:
OK
Reply in 56ms. Reply OK. <
OK

Issuing command: ATE0
REPLY: ATE0Å
OK
Reply in 55ms. Reply OK. <ATE0Å
OK

Issuing command: AT+CLIP=1
REPLY:
OK

Reply in 1055ms. Reply OK. <
OK
⸮>
Issuing command: AT+CMGF=1
REPLY:
OK
Reply in 55ms. Reply OK. <
OK

Issuing command: AT+CNMI=1,0
REPLY:
OK
Reply in 144ms. Reply OK. <
OK

Issuing command: AT+CPMS=ME,ME,ME
REPLY:
+CPMS: 21,2521,25,1,25
Reply in 202ms. Reply OK. <
+CPMS: 21,2521,25,1,25

OK

Issuing command: AT+CSCS="UCS2"
REPLY:
⸮OK
Reply in 56ms. Reply OK. <
⸮OK

Issuing command: AT+CSDH=1
REPLY:
OK
Reply in 58ms. Reply OK. <
OK

      Waiting for module to be ready...

Issuing command: AT+CMGL="ALL"
REPLY:
+CMGL:1,"REC READ",+4366306",,"2017/10/16,09:10:01+02",J⸮⸮⸮⸮⸮⸮Z⸮
Reply in 173ms. Reply OK. <
+CMGL:1,"REC READ",+4366306800",,"2017/10/16,09:10:01+02",J⸮⸮⸮⸮⸮⸮Z⸮>

Here the code
https://pastebin.com/fqCe3x9T

Problem in showing message body

First of all thank you very much for this good library, I have a problem reading SMS.
Both sms date and sms number are Ok but the message is not shown correctly, rather than the text it shows some random number and squares!
Text is simple English , is there any special decoding ?

Received SMS wont display on Serial Monitor

Hi, thanks for this awesome library of yours. I've tried this, everything's working fine. But the only problem is that, the text messages that I send to GSM A6 wont display on the serial monitor. Do you happen to encounter this problem? Thank you.

Unable to get balance from network provider

If i text "BAL" to my service provider using a sim card in my phone i get the current balance returned to me by text, if i text the service provider using A6Lib i get a response;

New message at index: 1
2732
2019/01/04,13:51:04+00
Sorry, I didn't understand that. For information, text MENU to 2732, or visit mobile.asda.com

If i text "MENU" i get the same response. Is it possibly sending a wrong character format for the service provider to read via its automated service? - If so how and where am i best to change this

Sms read problem

Getunreadsmslocs() not return value.
Readsms(3) function is working.
I changed cpp file in "rec unread" to "all" but nothing.
Where am i doing wrong?
i use arduino nano with a7 module.

+CLCC scrambled charters for answer

I'm tring to run gsm relay with A6 module and run into stability issues with A6lib. ProMicro board, SoftwareSerial.
I'm using "A6l.checkCallStatus();" function to extract "cinfo.number", so I could see who is calling before answering.
In serial monitor I got randomly scrambled charters between RING.
So far I have found two things to make it run better:

  1. in A6lib.cpp change A6conn->setTimeout(100); to A6conn->setTimeout(20);
  2. hold your finger on some A6 module grounded part, so some EMC isssue

Feel free to: verify, comment, help further.

Issue with diacritics

Hello,

it seems that i can't read sms that contains special chars like ă î ș ț

getUnreadSMSLocs does not count them.

Do you have any idea why ?

Parse the response SMS

Hello. Using this function
`sscanf(response.substring(respStart).c_str(), "+CMGR: "REC %s","%s",,"%s"\r\n", type, number, date);

sms.number = String(number);

sms.date = String(date);

// The rest is the message, extract it.
sms.message = response.substring(strlen(type) + strlen(number) + strlen(date) + 24, response.length() - 8);
`

I can't make out the answer
`
New message at index: 2
Command: AT+CMGR=2
1067 ms
+CMGR: "REC READ","+79833583606",,"2021/04/17,21:08:34+07"
Jdiekdnd djdkdkdo djdkkd

OK

number ==
date ==
message == djdkdkdo djdkkd

`

stuck in the blockUntilReady

Hi. I have an issue with the dial.ino. it gets stuck in the blockUntilReady function.
If I invert the RX and TX lines, then it passes but no data comes to the ESP8266. Signal Strength shows some number like 6845364 and cinfo.number is blank.
How can I tell that the A6 is actually working?
I tired calling it but the call goes to voice mail. I dont have the module to connect the A6 to the serial port of my PC, so I can only use the ESP to validate.

,

tcp/ip implementation

Hi, Could you precise if your code let ESP connect the internet over the A6 GPRS connexion ?

DEBUG mode

Hi, how I can run the example in DEBUG mode?
I want to see all Serial.println message
thanks

read sms issue

Hello, I am using Arduino A6 GSM module (Ai-Thinker) and having a weird problem that I cannot resolve. After reading first incoming SMS module stops responding to further read sms commands with timeout error. I can provide dump if that helps. Please advice

Often WDT resets

Hello,
i've tested the library for a big period of time, and with esp8266 resets are quite often. They occur at initializing while in delay, or when sending SMS.
Power source is not the issue. I suspect that has something with software serial an interrupts, eg modem is sending data and esp can't capture it because is doing something else.
Do you have any improvements ? Or ideas ?

Thank you.

Arduino IDE doesn't verify

Hello,
Neither of the samples doesn't verify in Arduino IDE 1.6.12.
SMS:4: error: 'A6' does not name a type
A6 A6l(D8, D9);
^
/SMS.ino: In function 'void setup()':
SMS:16: error: 'A6l' was not declared in this scope
A6l.powerCycle(D0);
^
SMS:16: error: 'D0' was not declared in this scope
A6l.powerCycle(D0);
^
/SMS.ino: In function 'void loop()':
SMS:21: error: 'A6l' was not declared in this scope
callInfo cinfo = A6l.checkCallStatus();
^
exit status 1
'A6' does not name a type

Great project so.

MODULE SIM TO SHARE INTERNET?

Hello, I have visited the page very often, obtaining very good results and always taking my knowledge.

Now something occurred to me and I still do not find anything concrete. My question is the following ... Is it possible to use any of the SIM modules to use the data that has the microSIM, and that way to connect to the internet, just as we do when sharing the internet with the cell phone?

I think it should be activating this function using AT command but before moving something, I prefer to make sure, besides I do not know if I have to add the WIFIesp8266 to transmit this data. Thank you and a big greeting, even if I do it before, I will not hesitate to share it with the community.

Problem with A6command. Passing quotes in the AT String

Hi.
I need to pass user and password to the APN like this:
AT+CSTT="web.tmovil.cl","web","web"

but I dont seem to find how to do this.
Here is what I have tried:
retstatus=_A6l->A6command((const char *)"AT+CSTT=web.tmovil.cl,web,web", "OK", "yy", 20000, 1, NULL);
This will retrun:
Issuing command: AT+CSTT=web.tmovil.cl,web,web
Reply in 155 ms:
OK
If I start adding quotes to the AT part of the line it still show the same Issuing Command.

sms:10: error: 'D6' was not declared in this scope A6lib A6l(D6, D5);

Hello guys,

can you help me find out what I did wrong and why I get this error when veryfing the example sms sketch ?

I'm using Arduino IDE 1.8.0 and now I also tried other examples and I get the same error.

What I'm doing wrong ?

Thank you.

`sms:10: error: 'D6' was not declared in this scope

A6lib A6l(D6, D5);
^
sms:10: error: 'D5' was not declared in this scope

A6lib A6l(D6, D5);
^
E:\Google Drive\Software\arduino-1.8.0\libraries\A6lib\examples\sms\sms.ino: In function 'void setup()':

sms:22: error: 'D0' was not declared in this scope

 A6l.powerCycle(D0);
                ^

E:\Google Drive\Software\arduino-1.8.0\libraries\A6lib\examples\sms\sms.ino: In function 'void loop()':

sms:29: error: request for member 'endsWith' in '"+1132352890"', which is of non-class type 'const char [12]'

     if ("+1132352890".endsWith(cinfo.number)) {
                       ^

sms:31: error: 'new_number' was not declared in this scope

         A6l.sendSMS(new_number, "I can't come to the phone right now, I'm a machine.");
                     ^

sms:48: error: expected '}' at end of input

 }

 ^

exit status 1
'D6' was not declared in this scope

`

unreadSMSNum is 0 every time obtain after setting A6command("AT+CMGF=1", "OK", "yy", A6_CMD_TIMEOUT, 2, NULL);

salute to you for your support !!!
+CMS ERROR: 304 Invalid PDU mode parameter and time out error solved.
using SMS to text mode A6command("AT+CMGF=1", "OK", "yy", A6_CMD_TIMEOUT, 2, NULL);

but every time obtain unreadSMSNum is 0 even if sended new message .SMS to text mode set according to your suggestion . but not enter in this loop for (int i = 0; i < unreadSMSNum; i++)

void loop
{
callInfo cinfo = checkCallStatus();
if (cinfo.direction == DIR_INCOMING)
{
Serial.println(cinfo.number);
hangUp();
A6command("AT+CMGF=1", "OK", "yy", A6_CMD_TIMEOUT, 2, NULL);
unreadSMSNum =getUnreadSMSLocs(unreadSMSLocs, 30);
Serial.println("unreadSMSNum");
Serial.println(unreadSMSNum);
for (int i = 0; i < unreadSMSNum; i++)
{
Serial.print("New message at index: ");
Serial.println(unreadSMSLocs[i], DEC);

        sms =readSMS(unreadSMSLocs[i]);
        Serial.println(sms.number);
        Serial.println(sms.date);
        Serial.println(sms.message);
    }
}

}

and got the response like this

Issuing command: ATH
Reply in 1055 ms:
OK

Reply OK.
Issuing command: AT+CMGF=1
Reply in 1055 ms:
OK

Reply OK.
Issuing command: AT+CMGL="REC UNREAD"
Reply in 1058 ms:
OK

Reply OK.
unreadSMSNum
0
Issuing command: AT+CLCC
Reply in 1055 ms:
OK

Add "__attribute__((used))" to function definition of sscanf

I tried to compile the example "dial" in Arduino V1.6.13. After I got the error message

sscanf' referenced in section .text.startup' of C:\Users\BJ\AppData\Local\Temp\ccVAm20R.ltrans0.ltrans.o: defined in discarded section `.text' of libraries\A6lib-master\sscanf.cpp.o (symbol from plugin)

I searched a bit and found this one:
https://forum.repetier.com/discussion/2389/stepperwait-referenced-in-section-text-compiliation-issues

After I changed
int sscanf(const char *buf, const char *fmt, ...) {
in sscan.cpp to
int __attribute__((used)) sscanf(const char *buf, const char *fmt, ...) {
the sketch "dial" was compileable.

INVALID_PDU 304 error for int getUnreadSMSLocs(). what problem here? please assist me

int getUnreadSMSLocs(int* buf, int maxItems)
{
String seqStart = "+CMGL: ";
String response = "";

// Issue the command and wait for the response.
byte status = A6command("AT+CMGL=\"REC UNREAD\"", "\xff\r\nOK\r\n", "\r\nOK\r\n", A6_CMD_TIMEOUT, 2, &response);

int seqStartLen = seqStart.length();
int responseLen = response.length();
int index, occurrences = 0;

// Start looking for the +CMGL string.
for (int i = 0; i < (responseLen - seqStartLen); i++) {
    // If we found a response and it's less than occurrences, add it.
    if (response.substring(i, i + seqStartLen) == seqStart && occurrences < maxItems) {
        // Parse the position out of the reply.
        sscanf(response.substring(i, i + 12).c_str(), "+CMGL: %u,%*s", &index);

        buf[occurrences] = index;
        occurrences++;
    }
}
return occurrences;

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.