-
Notifications
You must be signed in to change notification settings - Fork 52
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
App halts on background on Lollipop #2
Comments
Hi! Sulka, could you talk with that user and retrieve a "debug" MedtronicFile.log???..Please? You know how to do it. |
I can try. I just installed the platform tools on a new computer and Google has changed the process to something freakishly complicated... |
Hi, I try to find and send it to you (here) when I get home (Tero, Marjo's husband). I just don't know (yet) how to do it. Sulka: do you have any address where I could send you e-mail? If you have one, and are willing to share it with me, you can send me e-mail (it's easy to guess and find my university e-mail address). |
sulka at sulka.net would be the address :) |
Hi, I just made a new attempt to further investigate what is going on with my Nexus 2012, Lollipop 5.0.2 WLAN and Medtronic uploader. I used my device as usual between 10.04 p.m. – 10.29 p.m. so that the screen was on. Everything was functioning as it should. After that I pushed the Clear log, and waited a couple of minutes until the screen switched off. After that, there was no new data coming into our Azure Nightscout website. At 11.00 p.m. I turned the screen on, and Medtronic uploader was running there, but showed no log data on the screen. However, after just two minutes, and just after the arrival of the latest signal from my CGM to CC1111 and Nexus, all the measured CGM data between 10.30 – 11.02 p.m. was uploaded and available in the web. Therefore, the Medtronic uploader was probably all the time running perfectly with the exception of not sending the data forward when screen was not on. Also, I have checked that Medtronic uploader sends data to the cloud even if another application is running on the screen (and Medtronic is not shown on the screen, but is running in the background). And YES, I have selected in my device (Advanced Wi-Fi) “Keep Wi-Fi on during sleep.” -Tero |
Definetively...I want the MedtronicFile.log. The behavior that you have described is caused when the uploader can't access the mongodb properly or it detects that you have not internet access...Could be that the function which is checking if you are online or not is failing in Lollipop or for some reason that I can't guess right now.... Mongodb becomes unreachable when your phone sleeps... |
How can I send the log file to you? |
easy, send it to me |
I sent the log file to you arbox() and Sulka. |
thanks!! I'll check it ASAP!! |
I forgot to mention: I also checked the Mongolab database: the data does not get there either when the screen is switched off (just as you expected, arbox). When I turn the screen on, CGM data (“the lost values”) get there when it is uploaded there next time (I guess the uploading interval of the device is around five minutes). The Nexus device, however, is still running otherwise properly when screen is off, and it can for example receive e-mails. Therefore, the WLAN is actually still working and running normally even if the Medtronic uploader does not use it when screen is not on. |
I have read the log, and I have noticed that I have received NOTHING I restore the data at 23:00 because the sensor stream carries the last 9 values and I detect that I have lost some values so I retrieve them from the sensor stream. But from 10:29 to 23:00 It's like the CC1111 was disconnected... I don't Know right now what could be happening... |
But the uploader was running and collecting correct the data through CC1111, right? It just did not send it, |
Could you try another thing???, could you open the nightscout, wait until receive some values, then press "back" button on your android...that should close the app, but It should start a service also...and you should keep receiving data (tell me If that happens...or not... if not, please send me the log again ;-)). Along this process, please, Do not allow the phone to go to sleep... |
Ok, I first close NIghtscout (even restart the Nexus device), then I open NIghtscout and wait until I receive some data values (like 10 minutes, and then I press "back" button. At the same (before pressing the "back" button, I check that the data also gets into the Mongolab. Then I zip the log file and send it to you, ok? |
That's exactly what I have asked for...;-) |
After about five minutes after starting the Nightscout, I had received 3 sensor data values, and the it was updated into the Mongolab. I pressed the “back” button. Now let’s see in three minutes whether the Mongolab database still receives data… |
Yes, after five minutes Mongolab correctly received data, so the service was running properly even if the Nightscout was not running in the visibly in the foreground (but IS running in the background). What should I do now? |
let it go to sleep |
OK! |
The device is not sending anything to Mongolab. However, if I open the screen, Nightscout MAY send the data quite quickly into Mongolab DB, so I'll close the application/service immediately after turning the screen on, right? |
what Mongolab just received some data? (timestamp 01:29, but it was not there just three minutes ago (01.30). |
have you opened the screen?? |
No, the screen ahs been, and still is, closed. Could it be that the mail I sent was syncronized to my gmail in the device, and that somehow triggered the OS and the update action? |
After that (1:29) Mongolab has not received anything, |
Could be...I don't know...perhaps if someone send you a whatsapp, or triggers any event on the phone, It could trigger the uploads again... I am not really sure... |
Ok, no news in Mongolab. What shall I do next? Open the screen and turn off the Nightscout, and then send you the log file? I tried to send me an e-mail to my gmail address, but this time nothing happened (or after that). There should not be any other program running in the background. |
You don't have to turn off the Nightscout, just send me the log |
I sent the log to your e-mail. And of course, soon after turning the screen on, Mongolab was updated because the Nightscout was and still is running in the background |
I have sent you an answer.... ;-) |
Has someone also fixed something related to the selection of mmol/L nad mg/mL ? And possibly also some other changes? |
Sorry, the new version did not help either. It has the same problem as the earlier version and it also behaves otherwise similarly. I’ll send you both the new log file related to this software version. |
Please, could you check if you have active the "Battery Saver" and in case you do...Could you turn it off and try again??? I have read this: "To help improve battery life, battery saver reduces your device's performance and limits vibration and most background data. Email, messaging and other apps that rely on syncing may not update unless you open them." Which seems exactly what is happening to you.... If you have any other app like battery saver, or battery shield or some like that...could you deactivate it??? |
I have the battery saver turned on with Android 4.4 and the Uploader works fine. Having said that, Google really emphasised Lollipop as a battery saving update, so it's possible they've changed how OTG devices work. Luis have you checked the multitasking changes in Lollipop? There's a new API for tasks that run when the app is not active. |
Sorry, battery saver mode was off all the time during the tests. When I got into trouble I tried to minimize all such things that could cause troubles (I did not have anti-virus software, firewall or any other additional software/services on). I wiped the cache and also restarted the Nexus device between different tests yesterday so that I could eliminate any possible outside effects. |
I do not have any other Lollipop compatible devices, so I can't test and tell whether this symptom is related to the whole Lollipop 5.0.2 OS (and thus all the devices using it) or if this is just happening with Nexus 7 (2012). |
Hi. I think this problem is still not solved, right? I am presently trying to make NightScout running on a HTC ONE (M7) with Lollipop 5.0.2. But after a while there are no more values received by the medtronic uploader. Could be the same problem. I also use a SONY Xperia Z3 with Lollipop 5.0.2 and will shortly start a test with this one. So, if you are still interested in LOG-files, just let me know. |
@MosiGitHub note there's more than one issue related to the uploads stopping spontaneously, which affect all versions of Android. Can you describe the issue you're having in more detail? As in, does the upload stop very quickly and consistently or a few hours after starting the app? |
From what I've heard the USB OTG power changes in lollipop have been causing issues for most using OTG in lollipop |
Hi stavlor, thank you. I just ordered an y-cabel. Maybe this stabilizes the power the mmcommander receives. Should be there tomorrow. Thanks Amazon 😉 |
@sulkaharo: thanks for your assistance. the transfer stops approx. after 30 minutes. It seems to be sufficient to disconnect the cabel from the phone and reconnect after a couple of seconds. They it work again for ~ 30 minutes. I reprogrammed the mmcommander, but no change. Which release of the uploader would you recommend? |
@stavlor: it is now working for two hours - New record for me. Because of your advice I installed "OTG Power Lock". Maybe it was really a problem with the OTG power supply. |
So, lost connection again... |
@sulkaharo: I didn't find anything about the issues that could cause the problems in the net. Is there any site you could recommend to me? Please advise, because I still have the problems and it would be great to get nightscout running. Best regards. |
Are you on the latest version of MMCommander as released a couple of weeks ago? It improves calibration of the RF module on the C1111 which for us has stopped it not receiving/uploading after some 8hrs + |
Also note the uploader was updated just today - please update and report if it helps. :)
|
@melsmith: thanks for the hint with the mmcommander 👍 |
So, after some more days of testing it seems to me that it works better but still not stable 😔 |
I agree, I have a Moto G 1rst Gen with android 4.4.4, and it runs all night, the issues that I have are: |
When you press "back button", you kill the main app and a background service is started, which continues using the cc1111 to receive data and upload it to Mongo DB, when you tap on the nightscout icon again the background service is stopped and the main app is "restarted" but the data info is shared between them, that's why "CGM Service stopped" appears in red on your screen, because you are starting the app again. I have kept my LG G3 on airplane mode 5 minutes and the app has not crashed, how much time do you wait until it crashes?. Instant calibration should work well...but If you are changing the cc1111 from one phone to another, perhaps the method for calibration that you are following is not the "ideal"...you should wait until a new value is received from the sensor....(with your oldest calibration), and after that you do instant calibration...that should do the trick!!... |
Ok, thats good to know! I have it working with azure rest api. |
Which version of the uploader are you using? Manual calibration should not be available in the lastest version...Instant calibration is the only choice and is the best option |
You should have this version installed https://github.com/arbox0/MedtronicUploader/releases/tag/MEDTRONICUPLOADER_R1_V7 Please, before install it uninstall the previous version |
I modified the source code of the latest version to enable the manual calibration and recompiled, so its the latest one. I´ve now changed to the unmodified one R1 V7, and in about 10 mins, the app freezes, its unresponsive to touch, or messages on screen. Its android 4.4.4 Moto G v1. |
Yes! I am from Spain. OMG! 10 minutes before freezing???....that's too weird....could you change the use from API rest to Mongo API REST???. I would like to see your preferences also, and If it is possible, I would like to get the MedtronicUploader.log file which is located in your Internal Memory on the root directory, in my LG is /storage/emulated/0/MedtronicUploader.log I didn't know about rileylink, I'll talk about this with Jesús Berian, and I'll tell you if I can change my code to support it. I have already other plans to add BLE to the medtronic uploader, but I'll check this option as well. |
I'm from Mexico, so we can talk in Spanish or in English if you prefer. The settings are: mmol/l diabled, Type: Medtronic CGM, Pump ID: nothing, I know where the log is, what level would you want, error, info or debug? Also, I dont know If I could have your mail so we dont have to write here El nov. 12, 2015 2:22 AM, "arbox0" [email protected] escribió:
|
Debug level would be perfect.... you can send it to [email protected]. In that mail you can use Spanish if you want to, but here and thinking on other people that might be reading us, it is better that we keep using English for communication. The pump makes its own calculations on the data received from the sensor, we can't replicate those calculations, but your glucometer is more accurate than the pump, so I would think that the difference between your pump and your nigthscout values, could be more accurate in the lastest...(or not).... If you set the pump value, it should work as you expect. Thanks for the info!! |
Hi. Just an update to the problems I reported 5 month ago. I changed the uploader phone and I am now using a Sony Xperia Z3 instead of the HTC One (M7). Everything is working now. The problems seem to be caused by the phone. Best regards and thanks for your work. |
Just reading this and having similar issues on my nvidia shield K1 tablet (w lastest android). Using all the latest releases but guessing the OTG must turn off when the tablet sleeps. When tablet is awake, with app open or closed, works flawlessly. As soon as tablet is turned off, cover closed it halts. Problem solving it now, but going to try my setup on an older Samsung Note 2 and see. Thanks for all the back and forth on this. Does anyone know for sure if this is a common problem on newer devices? |
Report from user: when running on Nexus 7 (2012, Android Lollipop 5.0.2), the Uploader stops if the app is put to background. Something changed in Lollipop regarding background app processing?
The text was updated successfully, but these errors were encountered: