-
Notifications
You must be signed in to change notification settings - Fork 28
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
Connection is delayed 6 seconds by ADMIN:DIAGNOSTIC:BADREAD #64
Comments
I have an SD-Card in mine. If you tell me how you created the log I can try here. |
Connect using ADB, build the app and select "run" in android studio, open the "Android Monitor" tab at the bottom of the window and add the search filter "ConfigTree" (there's a lot of debugging output). This capture was made by opening the menu, connecting to the meter and then disconnecting as soon as it was finished. |
How do you build the app? |
Sorry, should have gone into more detail. You will need Android studio (probably available in your package manager) as well as the Android SDK and build tools, etc (should all come in as dependencies of android-studio, no worries). Check the app out from github and load it as a project in android-studio. First time around, it will fail to rebuild (it tries automatically as far as I can remember), and you will get messages saying stuff like "Gradle update failed" and a little link with a proposed solution (stuff like "Update build tools to 2.3.2" or "install newer Android SDK"). Keep clicking the links to get your environment set up and eventually the build will complete without errors. When it has built successfully, enable ADB debugging on your android device and connect it to the computer via USB (it can be done over wifi too, if you google around a little). Hit the "run" button in the tool bar of android studio to push the newly built application to the phone and run it. You will get a warning about signing and invalid app version, saying the currently installed Mooshimeter app needs to be uninstalled. Let it do that. Once it's up and running, you can see the log in the bottom of the android studio window, under "Android Monitor" (I think it's tab number 6) and it has a "Logcat" tab. You can filter the log by the string "ConfigTree" to cut down on the noise. |
OK, I've tried it with an ill-formatted SD-card (same problem), a properly formatted but empty card (same problem) and finally, a card with some log data on it. here is what happens with log data present on the card:
It appears that the timing behavior is the same, although more communication takes place during the BADREADs. |
Connecting to my Mooshimeter rev1 takes about 12 seconds, and the profiler indicates that most of this is during configuration. I was curious if it could be sped up somehow (it makes the app feel unresponsive and discourages "impulsive" use of the meter).
Three of the many calls to ConfigNode.reqValue() take the full two seconds (the awaitMilli() call is never aborted by a finished read, but rather time out), which accounts for half of this time.
This happens for the three codes 16, 17 and 18 (see attached LogCat), which as far as I can tell are for LOG.INFO.[INDEX, END_TIME, N_BYTES].
I don't have an SD card to test with, in case this issue only appears for users with no log data.
LogCat output:
The text was updated successfully, but these errors were encountered: