0

What happens to Fonatest.ino if you remove unit8_t line
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

What happens to Fonatest.ino if you remove unit8_t line

by mromero on Tue Sep 29, 2020 7:57 am

IF you remove:

"uint8_t readline(char *buff, uint8_t maxbuff, uint16_t timeout = 0);"

This line is not used in the send sms spart so can you still send SMS

It is used in the receive sms so if you commented out does it mean the system does not receive sms?

mromero
 
Posts: 44
Joined: Fri Mar 18, 2016 12:10 pm

Re: What happens to Fonatest.ino if you remove unit8_t line

by rskup on Wed Sep 30, 2020 9:25 pm

I'm not great with coding details, but will give it a shot, maybe someone else will confirm whether my thoughts are right or wrong.

I think that line simply calls the "readline()" function, defined at the very bottom of FONAtest, with "timeout = 0".

In general, looks to me like the readline() function formats whatever you enter in the serial monitor, and has nothing to do with whether or not your Fona will receive texts. Seems to get called every time you need to enter something, like a number or text.

Again, not great with coding details, so I could be wrong, just have some experience coding an Uno, and more recently a Feather, to work with a FONA 3G and an old rotary dial phone.

It's easy enough to test your idea though, just remove the line and upload the code, then try to send your FONA a text or two from other phones.

And if it helps to answer your other FONA forum question about unwanted texts, yes, my FONA 3G also receives unwanted texts. Most of them seem to be addressed to the previous owner of the number, as the texts (from different numbers) are addressed to the same name.

rskup
 
Posts: 60
Joined: Sat Aug 01, 2020 9:04 pm

Re: What happens to Fonatest.ino if you remove unit8_t line

by mromero on Sat Oct 03, 2020 3:07 pm

tested it still got incomming texts. will study the AT command later.. thanks for the comments

mromero
 
Posts: 44
Joined: Fri Mar 18, 2016 12:10 pm

Please be positive and constructive with your questions and comments.