-
Notifications
You must be signed in to change notification settings - Fork 56
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
sim808.isSMSunread() detecting an unread message even though there isn't an unread message #39
Comments
Thank you for your reply, #define MESSAGE_LENGTH 160 char phone[16]; #define PIN_TX 10 void setup() // Turn on the power
} void loop()
} } |
I apologize, I didn't write or test this library myself, and I currently don't have a template for testing. Therefore, I cannot immediately identify the issues you are facing. Can you ensure that running the library examples individually works correctly? If it does, there might be some conflicting functionality when used directly, requiring further testing. In that case, I might not have time to conduct the testing for a while. |
I've imported libraries and used their examples and somehow all of them have different error codes that stop the code from running before it reaches 'sim808 init error' |
@LokYinBarneyWong I can see that you use SoftwareSerial for communication between arduino and SIM808 module? So you are not using it in hat mode but have arduino and sim808 side by side and have manually made connected pwr and ground + arduino pin10/11 to sim808 pin0/1 |
what is hat mode, sorry I'm new to arduino and sim808. |
Hi, I've found this manual where it says "The bright “STA” LED will come on, and then the “NET” LED will blink once every 800 |
Perhaps you can take a look at this wiki. In our previous tests, all these examples were working fine. |
After reading through the wiki and did some debugging with DFrobot debugging tool, i found out that only GPS commands work, and the NET LED is blinking too fast, would that be the problem, and how would I fix it? |
I'm sorry, I'm not sure about the hardware differences between the two. However, the issue is likely not due to the software library. I recommend using a serial debugging assistant along with the SIM808 manual for manual function debugging. This might make it easier to identify the problem. |
which serial debugging tool would you recommend, and does it need a full-sized sim card that fits the entire sim card holder, my current set up is my sim card's metal part is touching the metal golden-ish part of the sim808 module, wondering if that would be the problem. |
Any serial port communication transfer module can be used, directly use the AT instruction, verify the function of sim808 module is normal. I'm not sure about the hardware problem you're talking about. |
So I input these commands from the wiki into the serial debugger and it showed this, basically error on every command I use, any clue as to why or how I can further debug, and how to fix it? (sorry for the closing and reopening the issue, I miss clicked) OK ATD1*********2; ERROR ATH OK at+cmgf=1 ERROR at+cmgs="1*********2" ERROR at+cmgr=5 ERROR` |
yea I can still use my sim card to call/text ppl on my phone, but what do you mean by wirelessly |
Wireless communication refers to network communication. If the product was purchased on our official website, sufficient instructions and precautions for normal use are already listed on our wiki. As for other situations, I lack sufficient information to discern the reasons for operational failures. |
Ok, is there any way I can give you enough information to know what is wrong? |
hello, I made some modifications to the code which was supposed to receive an SMS message and then get its GPS location and send the GPS location back to whoever sent the SMS message, basically a small GPS tracker, but when I put my SD into the sim808 module to test it, the message index is always 1 when the code proceeded into
void loop()
detecting an unread message, even though I already read all the messages before putting it in. Is there a way for me to fix this issue, Thank you for reading this. :slight_smile:here is the complete code:
`#include <DFRobot_sim808.h>
#include <SoftwareSerial.h>
#define MESSAGE_LENGTH 160
char message[MESSAGE_LENGTH];
bool messageIndex = 0;
char MESSAGE[300];
char lat[12];
char lon[12];
char wspeed[12];
char phone[16];
char datetime[24];
#define PIN_TX 10
#define PIN_RX 11
SoftwareSerial mySerial(PIN_TX,PIN_RX);
DFRobot_SIM808 sim808(&mySerial);//Connect RX,TX,PWR,
void setup()
{
mySerial.begin(9600);
Serial.begin(9600);
//******** Initialize sim808 module *************
}
void loop()
{
//*********** Detecting unread SMS ************************
messageIndex = sim808.isSMSunread();
Serial.print("SMS Index under loop: "); //degbug code
Serial.println(messageIndex);
//*********** At least one UNREAD SMS ***********
if (messageIndex > 0)
{
Serial.println("Entering SMS processing block");
}
else
{
Serial.println("No unread SMS");
}
}`
The text was updated successfully, but these errors were encountered: