thehapyone / BareBoneSim800

A BareBone Arduino Library For SIM800 Modules
GNU General Public License v3.0
47 stars 18 forks source link

I am facing issue with char *mydataIn = strdup(tempData.c_str()); #12

Closed vksalian closed 4 years ago

vksalian commented 4 years ago

Hello,

I tried the BareBoneSim800 1.25 version library. It seems the line "char mydataIn = strdup(tempData.c_str());" has the problem which results in NULL value for the mydataIn pointer and the end result is "Status" value will remain 99.

For example, call to function sim800.isAttached() will always display "Not Attached" even if there was OK response from SIM800 for the "AT\r\n" command.

thehapyone commented 4 years ago

Hi, I think it will be a good start to post your hardware setup and possibly the code snippet you are using. The only reason (that I know off) you will get status as "99" is if there was a timeout. i.e the sim800 module didn't respond back within that time frame.

vksalian commented 4 years ago

Hello, I resolved the problem with ECHO OFF. Command : "ATE0\r\n". The function was reading the echoed messages first and then checking it against the expected response. Now this issue is resolved. Thank you.