Topic | Meter seems to lock up after disconnecting

Home Forums Mooshimeter Support Meter seems to lock up after disconnecting

Viewing 19 reply threads
  • Author
    Posts
    • #9794 Reply
      Anonymous
      Inactive

      I am using the latest android beta app with the firmware that is included with the beta app – connecting to the meter for the first time works great. If I go back to the meter selection screen, and disconnect from the meter – I am unable to reconnect to the meter and if I do a manual scan no meters are found. The idle LED on the meter stops flashing and I have to open the meter up and use the reset button before it will appear again.

      I am using a Samsung Galaxy S6. Is this the ‘ghosting’ issue that I’ve seen some posts about? It’s getting more then a little frustrating trying to use the meter if I have to unscrew it to reset it every time I want to use it.

    • #9808 Reply
      admin
      Keymaster

      Hi Shockwaver,

      That does sound frustrating, and I have another experiment for you – if you reboot the phone will it allow you to reconnect to the meter? If it’s the “phantom connection” issue then the phone is maintaining a connection to the meter but not giving access to the connection to the app – rebooting either end of the connection should fix it.

      If rebooting the phone fixes the issue as well, you can be pretty sure it’s the phantom connection issue. It may also be possible to work around this by setting your phone to airplane mode, then setting it back, forcing a disconnection.

      Hope this helps, best
      ~James

    • #9839 Reply
      Anonymous
      Inactive

      Hi James,

      Sorry for the delay in getting back to you – I ended up out of town for a few days.

      Rebooting the phone doesn’t cause the meter to come back (nor does enabling/disabling airplane mode) – and the LED idle light is no longer blinking on the meter when I’m not able to connect to it. The only way I’ve been able to bring it back is by opening it up and resetting it. After that, the LED lights up, and flashes the idle pattern until I connect.

      Once I reset it, the app will connect with no problem – I get readings with no issues. I can even disconnect and reconnect within a relatively short time with no problem. The problem comes when I disconnect for more then 15 seconds or so (if I close the app, or move out of range of the meter) – the LED stops flashing and I can no longer find it on the scanner.

    • #9842 Reply
      admin
      Keymaster

      Hi shockwaver,

      You are the second person to describe the “disconnect from Android for more than an hour, find meter unconnectable” issue, so now I have something to look for.

      I have another suspicion – when the meter is in the unconnectable state, does it appear in scans from another device? How about if you turn off the Android phone you originally used to connect to it?

      My suspicion is that Android is doing something stupid… one of the features of the Android BLE API is that you can tell it to try to connect to a peripheral in the background. The Mooshimeter app doesn’t use this feature, but my suspicion is that Android is connecting in the background as soon as your phone is in range of the meter, then Android is not handing the connection to the app, so it doesn’t appear in the scans. Just a hunch, but all bug-hunts start with a hunch.

      Thanks
      ~James

    • #9852 Reply
      Anonymous
      Guest

      I loaded the 1462564395 firmware and see a similar but not identical behavior after the meter has been disconnected for a while – just over 30 minutes. If I reconnect within this window, I don’t see any issues. The 5 second LED blink is no longer present after the 30 minutes.
      I do notice that when you go to the device scan page after the 30 minutes, that the signal strength value will update for a few seconds and then stop. If you switch to a different app and then switch back, the dBm updates again for a little while and then stops.
      Selecting that entry will fail to connect – Says “Initializing” for a minute or so and then the messages “The Android device is not scanning. Please tap “Scan” to scan for Mooshimeters.” and “No Device Found” appears. At this point, the “Connection Plug” icon is greyed out and the dBm does not change.
      I’ve also seen “Discovering Services” followed by “Initialization Failed. Status -1” as well. When this happens, the device disappears from the list entirely and scanning doesn’t show anything.

      If I reset the device and scan a new entry with a bold “connection plug” icon will appear and I can connect the meter without issue. At this point, the dBm for the old entry no longer changes.

      This is on a Verizon LG G3 Marshmallow phone.

      P.S. Great device that will only get better with age. Good job guys!

    • #9859 Reply
      Anonymous
      Guest

      Well I have a very similar problem as well. And if I leave logging on for say 12 hours the meter becomes unconnectable from any device and The LED blinks fast and stays lit. I have to open up the meter and hit the reset button to get it to be able to connect again. I have a video of the led light if that is helpful.

      Also on …4395 firmware.

    • #9875 Reply
      admin
      Keymaster

      Thanks insurgent and Luke – the extra details are very helpful.

      Luke – what kind of phone do you use?

      This bug is a strange one and quite annoying to hunt, because it only manifests after many minutes have elapsed. I’m working on it, thanks again guys.

    • #9885 Reply
      Anonymous
      Guest

      James,
      Yep, both of my mooshimeters exhibit the same “walking dead” state under the same conditions as the other posters here. I am so accustomed to just pressing the reset button on the meter, I never really tested it much. Some clues to add. The only reliable characteristic is when the led flashing every 10 seconds is “barely perceivable”. I thought it was dead. I actually took the meter into a totally dark room to see the flashing :). In this state, sometimes android settings Bluetooth would list the meter, sometimes it wouldn’t. Neither android 4.4.2 nor android 5 could revive the meter, including rebooting the phones. Also, I would get various messages that insurgent, including one I hadn’t seen before: Status 129. Happy hunting.
      —Duane

    • #9904 Reply
      Anonymous
      Guest

      I’m seeing behaviour similar to that described above. It’s quite reproducible:

      Starting with a freshly reset Mooshimeter, the meter’s LED flashes once every 5s, plus a dim flash every 10s. For a while the Mooshimeter will connect to the phone OK, but after about 37 minutes the 5s flashes stop and the Mooshimeter will no longer connect.

      When this happens the Mooshimeter still appears in the app’s list of devices, and the indicated signal strength fluctuates (making me think there’s a real connection). But now the app gets stuck at “Initialising”. If I try a second time to connect, the Mooshimeter does not appear in the scan list at all. Rebooting the phone does not help, it seems the Mooshimeter itself has crashed. As soon as I reset the Mooshimeter the phone connects once more.

      The dim 10s LED flash continues throughout.

      I’ve repeated this cycle 3 times, and it seems consistent.

      App 1.0.22(1820)
      FW 1462564395
      Nexus 5 with Android 6.0.1
      No devices connected to the Mooshimeter inputs, no memory card installed, fresh batteries

    • #9905 Reply
      Anonymous
      Inactive

      Tim’s steps to reproduce are pretty much exactly what I’ve seen happen with my meter.

    • #10123 Reply
      Anonymous
      Guest

      Hello everyone. I habe the same issue: Mooshimeter with newest Firmware, Galaxy S5 Neo running Android 5.0. After reseting the Mooshimeter and rebooting the phone, the Mooshimeter connects, after two or three attempts. I am thinking about sending it back to the Internet shop I bought it.

    • #10124 Reply
      Anonymous
      Guest

      Sorry for the late reply. I am using a Nexus 6. I have tried it on a tablet as well and the same issue. I actually have tested it on many devices. It does not seem to be device dependent, but firmware on the device. Do you maybe have the source available for this so that maybe we can dig into it and find the issue?

    • #10167 Reply
      admin
      Keymaster

      Hi Luke, Hobelsepp, Shockwaver, Tim, Duane,

      I found a bug that could account for what you’re seeing. I found a memory leak. If you don’t know what that is, you can learn here:
      https://en.wikipedia.org/wiki/Memory_leak

      Basically there is a periodic task that runs in the background to check if the SD card has been inserted and read the battery voltage. It sends a message to the main task (very short, only a few bytes). When the main task is not BLE connected, it just ignores the messages, but it was not de-allocating them. So they were slowly piling up in memory. All of TI’s BLE code uses the same memory allocation pool, so after a certain amount of time no memory is left for the little allocations that the TI stack needs to do its work.

      Sorry I haven’t posted to the blog in a while. I bought a LG Volt because LG users were consistently reporting failure and was able to reproduce their issue, that also required some firmware changes.

      Bundling the new firmware with the Android app is quite simple, I’ll try to get that out this afternoon.

      Thanks again for the details, they help narrow it down.

      ~James

      Also – Luke – to answer your question about firmware source code – This code is not public, sorry.

    • #10168 Reply
      Anonymous
      Inactive

      Awesome news James! I look forward to giving it a shot!

      Thanks for the explanation too – that makes perfect sense.

    • #10247 Reply
      Anonymous
      Inactive

      I downloaded the latest update, and attempted to install the firmware (1466039460 I believe). When the update is complete, it appears to have failed and the meter boots in to bootloader mode. I’ve tried updating multiple times, resetting my phone and the meter – but to no avail.

    • #10253 Reply
      admin
      Keymaster

      Hi Shockwaver,

      So the upload itself is failing? Default answer would be new batteries… there’s a known issue where uploads fail on low batteries. Have you tried that?

      I’m hoping to address the low battery upload failue issue on the next manufacturing run, but unfortunately can’t patch meters in the field because that’s an issue with the bootloader, which is programmed once in the factory.

      ~James

    • #10254 Reply
      Anonymous
      Guest

      I downloaded the new app & firmware yesterday, and the upload of the firmware went smoothly. On re-connection the app still thought the Mooshimeter was in bootloader mode, but swiping it from the list of running apps seemed to force it to quit and all was well when the app was relaunched (this has happened on every firmware update, so far as I remember).

      I got an “Unknown request code” once on trying to exit the app, and was returned to to the readout page. This happened after renaming the meter.

      The LED flashing has changed, now giving one flash every 10s and no dim flashes. When the phone is connected the LED flashes once every 1s.

      The crash after 37 minutes is gone. My Mooshimeter has been running with the new firmware for about 1 day now without needing a reset.

      Graph mode is running very nicely. The readout seems very smooth, with no jitter between data points.

      All in all, a very nice update. Thanks, James! I haven’t tested the logging function yet, but will do so soon.

      By the way, what is the correct way to exit the app? If I use the “back” button (bottom of screen, next to the home button) the Mooshimeter continues to flash once every 1s, as if it is still connected. As soon as I swipe the app out of the list of running apps the flashing returns to every 10s. If I press the 2-plugs icon on the scan page the Mooshimeter (appears to) disconnect immediately, but now the auto-connect function is lost.

      App 1.0.23(1849)
      FW 1466039460 (previously 1447458797)
      Nexus 5 with Android 6.0.1
      No devices connected to the Mooshimeter inputs, no memory card installed, fresh batteries

    • #10308 Reply
      admin
      Keymaster

      Hi Tim,

      People usually come to the forums when something doesn’t work, so it makes me really happy to see a post that’s just about how well everything worked! Thank you!

      Correct way to exit the app: not really. If you just press the home button and the app falls to the background, the meter will stay connected but stop sampling. Impact on battery life is quite small. That’s what I do. It has the added convenience that next time I open the app, if I haven’t walked out of range of the meter, it’s faster to re-initialize.

      The LED flashing scheme has been totally redone and should be much more consistent and meaningful now. This is from the draft of the blog post I have going (haven’t published yet because I’m still chasing a logging bug that manifests only after a few hours… very troublesome to pin down)

      1 blink/sec: BLE connected
      1 blink/10 sec: BLE disconnected and advertising, no SD card
      2 blink/10 sec: BLE disconnected and advertising, SD card mounted
      4 blink/10 sec: BLE disconnected and advertising, SD card error
      1 blink/20 sec: BLE off, shipping mode
      3 fast blink: sample written to SD card log

      Thanks again, let me know if anything comes up
      ~James

    • #10309 Reply
      Anonymous
      Guest

      The latest firmware seems to have nailed the problems I’ve recently seen. The new blink scheme rocks.

      For requests, I would still love the maths functions to be graphable, and also to be to disable one or other channel in the graph as before.

      Loving the mooosh. Like right now I’m quantifying the performance of a repaired fridge – love being able to leave the moosh with a k-type inside to monitor and log.

      Cheers!

    • #10356 Reply
      admin
      Keymaster

      Wonderful. Thank you for the feedback!

Viewing 19 reply threads
Reply To: Meter seems to lock up after disconnecting
Your information:




This site is protected by reCaptcha and the Google Privacy Policy and Terms of Service apply.