Ai Thinker A7 GPS/GPRS module

Hi Guys,

Thanks very much for this forum, I have gotten MANY tips off this forum!!!
I am schooled in electronics design (not very complicated stuff, just some op-amps,flip-flops, logic gates etc.) AND programming in Vb, Turbo Pascal, C and C#.
I have written some code for the Sim808, works very nice, also the esp8266 and Sim800.
Have now come across a hairy problem with the AI Thinker A7 module: Leonardo 32U4 + A7 GPRS GSM GPS Board.
Works very nice, GPS fine, also sending data to ThingSpeak, but cannot get the ussd code to get the airtime balance to work. Have tested on my phone, works well for Vodacom. Here is the code:

float GetSimBalance()
{
String tmp="",Response="";

sendData(F(“AT+CUSD=?”), 5000, debug);
//Serial.println(“Setting up function…”);
sendData(F(“AT+CUSD=1”), 5000, debug);
Serial.println(F(“Getting balance…”));
sendData(F(“AT+CUSD=1,”*100#",15"), 7000, debug);
tmp = FindResponseTarget(Response, “Airtime is”, 7);
if(tmp != “”){
tmp=tmp.substring(12,17);
return tmp.toFloat();
}
return -1.00;
} // end GetSimBalance

I also tried this:

//sendData(“AT+CSMP=17,167,0,0”,1000,debug); // have tried 0, 4 and 8 for last param.
sendData( “AT+CMGF=1”,1000,debug); // put in text mode
// GSM, HEX, PCCP936, UCS2
sendData( “AT+CSCS?”,1000,debug);
sendData( “AT+CSCS=“HEX””,1000,debug);
sendData(F(“AT+CUSD=1”), 5000, debug);
sendData(F(“AT+CUSD=1,”*100#",15"), 7000, debug);

This is the output:

+CUSD: 2, “D9775D0E1287D961F7B80C4ACF4152D9CC6583B940CF3A1DF436838269393DDD2EFF40C474980D52C562B111C8FC96838269393DDD2E8382647BD83D2EBB4054D3700E0AC3E1ECBC0B” ,15

Tested this string on an Internet site, to convert from HEX to Text, does not seem like proper Hex code in string. Or maybe it is Hex, but weird char set?

When I change the code and send: sendData( “AT+CSCS=“GSM””,1000,debug),
get garbage output:

+CUSD: 2, "⸮w]⸮⸮a⸮⸮ J⸮AR⸮⸮e⸮⸮@⸮:⸮6⸮⸮i9=⸮.⸮@⸮t⸮
R⸮b⸮⸮⸮⸮⸮⸮i9=⸮.⸮⸮d{⸮=.⸮@T⸮p
⸮⸮⸮ " ,15

Baud set at 115200. Everything else works.
Would appreciate some help, do not know what else to try.
Thanks very much.
Peet

Are we supposed to make some sense of the output without knowing how you printed it?