AT+CMGF=1
15:55:56.529 -> OK
15:55:56.529 -> AT+CNMI=2,2,0,0,0
15:55:56.529 -> OK
15:55:56.529 -> AT+CMGD=1,4
15:55:56.529 -> OK // end of setup
15:55:56.529 ->
15:55:56.529 -> no prefixMatch //loop prefix match check NO MATCH
15:56:16.770 -> +CMT: "+447xxxxxxxxx","","18/10/16,15:56:16+04" //incoming SMS message 1
15:56:16.770 -> Status //incoming SMS message 1
15:56:16.770 ->
15:56:16.770 -> prefixMatch + //loop prefix match check MATCH +CMT
15:56:16.770 -> prefixMatch STATUS //loop prefix match check MATCH STATUS in message
AT+CMGS="+447xxxxxxxx"AT+CUSD=1,"*100#" //CreditStatus command
15:56:21.868 -> >
15:56:21.868 -> >
15:56:21.868 -> no prefixMatch //loop no match
15:56:25.664 -> +CMGS: 13 //sms message sent13
15:56:25.664 ->
15:56:25.664 -> OK
15:56:25.664 ->
15:56:25.664 -> no prefixMatch // loop no match
// serial monitor s pressed then enter
AT+CUSD=1,"*100#" //CreditStatus command
15:56:40.442 -> OK
15:56:40.442 ->
15:56:40.442 -> +CUSD: 0, "Your giffgaff balance is ⸮ //response incomplete
15:56:40.476 -> no prefixMatch // no match
15:56:58.719 -> +CMT: "+447xxxxxxxx","","18/10/16,15:56:58+04"
15:56:58.719 -> Status // process repeated with SMS status sent to module
15:56:58.719 ->
15:56:58.719 -> prefixMatch +
15:56:58.719 -> prefixMatch STATUS
AT+CMGS="+447xxxxxxxx"AT+CUSD=1,"*100#" //statuscredit
15:57:03.850 -> >
15:57:03.850 -> >
15:57:03.850 -> no prefixMatch
15:57:06.900 -> +CMGS: 14
15:57:06.900 ->
15:57:06.900 -> OK
15:57:06.900 ->
15:57:06.900 -> no prefixMatch
15:57:07.622 -> +CUSD: 0,"Hi, your giffgaff balance is ⸮xx.xx.", 15 // respone in full
15:57:07.622 ->
15:57:07.622 -> no prefixMatch
Note: I have removed the
if (strncmp(Grsp, "\r\n+CUSD:", 8) == 0 && newMessage == true)
{
Serial.println("USD no £");
prefixMatch = true;
newMessage = false;
}else
as not required to look at the first problem of credit balance retrival
As you can see the current code, doesn't respond properly to the SMS command Sent of Status until it is first activated by s and enter in serial monitor.
Can't work out why Serial monitor response is always ending at ⸮ which should be currency symbol £ I suspect.
Can't work out why SMS to activate StatusCredit(); function doesn't work until serial monitor has used s.
Can't work out why the Status Credit function seems to respond even after taking out the request until a power cysle has been performed.
If you need anything else from me please let me know, will be looking at this again later today/ tomorrow.
Thanks again.