You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.12
List the steps to reproduce the problem below (if possible attach a sketch or
copy the sketch code in too): LIST REPRO STEPS BELOW
When using the example sketch FONAtest for the Adafruit Feather 32u4 FONA I encountered a problem sending the code to charge my sim-card. The message was 20 characters long, and only when sending it for the third time I noticed that the last characters were missing.
This in spite the fact that the test sketch tells the user that the message can be up to 140 characters long.
needs to be changed because it limits and truncates the message including the AT-command to 30 characters.
In order to allow for 140 character long messages it should be:
Arduino board: Adafruit Feather 32u4 FONA
Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.12
List the steps to reproduce the problem below (if possible attach a sketch or
copy the sketch code in too): LIST REPRO STEPS BELOW
When using the example sketch FONAtest for the Adafruit Feather 32u4 FONA I encountered a problem sending the code to charge my sim-card. The message was 20 characters long, and only when sending it for the third time I noticed that the last characters were missing.
This in spite the fact that the test sketch tells the user that the message can be up to 140 characters long.
in Adafruit_FONA.cpp from line #928
char sendcmd[30] = "AT+CUSD=1,\"";
strncpy(sendcmd + 11, ussdmsg, 30 - 11 - 2); // 11 bytes beginning, 2 bytes for close quote + null
sendcmd[strlen(sendcmd)] = '\"';
needs to be changed because it limits and truncates the message including the AT-command to 30 characters.
In order to allow for 140 character long messages it should be:
char sendcmd[140+11+2] = "AT+CUSD=1,\"";
strncpy(sendcmd + 11, ussdmsg, 140); // 11 bytes beginning, 2 bytes for close quote + null
sendcmd[strlen(sendcmd)] = '\"';
The text was updated successfully, but these errors were encountered: