-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with .available() #34
Comments
Perhaps the stop bit time matters? If there really is a problem, I'm afraid I can't do anything (and must close this issue) unless you provide a (hopefully small) complete program that demonstrates the problem, and all other details needed to reproduce the problem. Realistically, the test program needs to be used with other hardware, which must be something like another Arduino or Teensy board also running a complete program, or some other hardware that's readily available for testing. |
Thank you for answering so quickly
If I ask twice in a row, it leaves the loop correctly, since data has been received but it becomes false. In the second case, within the finite state machine where the incoming data is processed, the available data questions in each case cause it to return false, causing the function to re-enter when it exits, since there are data available. Similarly in the previous case, it does not matter whether the comparison is boolean or numeric.
In this case I can not enter a delay, since it causes overflow of the input buffer (up to 320 characters can be processed). The solution has been to not enter the function until there are the minimum of characters to process, 8 in my case.
I hope this helps to locate the problem, anything else you need, you tell me. |
I'm currently working on another project. Actually, a very long list of other projects. With only code fragments, I can't dedicate the time to fill in the rest to make this into a complete program, and then try to find a modem which will reproduce the problem. If you want me to actually investigate, to actually put engineering time into this, you must post a complete program I can copy and paste into Arduino and upload to a board. If any part is missing, if it doesn't compile, I will stop there and do nothing more, so please take a moment to actually copy the program you post back into Arduino and verify it truly does reproduce the problem. Then I'm going to need to know where to buy this modem. Ideally, you could write a 2nd program to run on another Arduino which does the simplest possible modem responses to reproduce the problem. I have plenty of Arduino boards. But if this modem is readily available, I could buy one. I do have a modest budget for such thing. But the thing I do not have is time for guesswork. An incomplete program or lack of specific details means I will not look into this problem. I simply have far too many other urgent projects to do. |
I have been having problems with
.available()
, returning zero when there really was data in the input buffer. It seems that you need to leave a small amount of time between queries to return a correct value. Even though is not always like that.The text was updated successfully, but these errors were encountered: