Streaming logs over BLE and other news
This is a combination announcement and general update.
New Feature in Beta: Streaming Logs over BLE
Up to now, retrieving the data log required retrieving the SD card itself from the meter. With the latest firmware and app, it is now possible to retrieve logs wirelessly. It’s been released to Android beta users and the iOS beta is awaiting Apple approval (they usually take 1-2 days for beta approval, so I estimate it will be available Wednesday). Information on joining the beta programs is here.
How to use
I’ve expanded the wiki to include instructions on the new feature here.
Avenues of improvement
The feature presently lacks data compression and is streaming the CSV files out in native ASCII. This is extremely inefficient, especially given the repetitive nature of most multimeter logs. Compression ratios of 80 or 90% are achievable with simple algorithms. But I’m pushing up against a wall I hit a while ago with the Mooshimeter firmware – there’s no code space left, so any new feature needs to be crammed in to space I carve out by optimizing what’s already there. The firmware is almost out of low-hanging-codespace-fruit, so development is a game of ROM Tetris.
Subtle SD card initialization issue corrected
I found an issue that could reduce the reliability of SD card initialization and corrected it. It was causing flaky initialization with some SD cards. Detailed explanation follows (for engineers):
SD cards communicating in SPI mode require a pullup resistor on the MISO line (more details at elm-chan’s excellent write-up). The CC2540 at the core of the Mooshimeter has internal pullup resistors on its IO lines that can be turned on and off. However there’s a caveat to their use: the CC2540 automatically turns off the pullup resistors as soon as an input is mapped to a peripheral, like the UART. This seems a strange design choice on TI’s part. So when the Mooshimeter wakes up and tries to initialize the SD card, it inadvertently disconnects the necessary pullup resistor moments before the initialization process. Most cards work fine with this, some cards fail, and (worst case) some cards work most of the time and fail rarely.
The correction for this issue was to reorder the song-and-dance that forms SD card initialization. The first part of the initialization process is now bit-banged so the necessary pullup resistor can stay connected, with the UART mapping happening after the SD card has been set up.
Android Intents Feature in use
Duane did a write-up of how he’s using the new Intents Broadcasting feature of the Android app to trigger Tasker events. Phedders hooked it up to his Pebble so he can see multimeter values on his wrist (link to thread here).
That’s all for now, thanks for reading
Thats not a wear but a Pebble! I do _wear_ it on my write… but use Tasker and AutoPebble for the display.
Doh! Thank you – corrected :)
Just saw your stuff on ElectroBoom.com
Really glad that you’ve shown Mehdi your support!
I <3 Mehdi
I lent my Mooshimeter to a friend and told them they just need to download the app to get it working. Then I remembered I have the beta app which allows streaming logs over BLE. At that point I realized it was 7 months since the Beta app came out. I was just checking to see if you would be willing to provide an estimated time for the Beta app to make it to production for Android.
Can you try uninstalling the Android app and reinstalling? Your comment prompted me to look at the Google Play Store developer portal, because I promoted the beta to production months ago. However I saw I had missed a new feature in the developer portal, which was set for a “partial rollout” – basically only 50% of users got the update. I caught the issue and now everyone should be on the latest version. Please let me know if the issue persists, thanks.