Please note that a Beta tester of the new version of the Android App (V2.6.x) has reported it crashing on Android V9.
This is because I missed off a permission that is not required for older versions of Android (so works ok on them), but is needed on V9.
I have just submitted V2.6.3 to the Google Play store for Beta Testing which should fix the problem.
Unfortunately I am still having disagreements with Google about whether this app needs to be able to send SMS text messages as part of its ‘Core Functionality’ or not, so the update has been rejected so I don’t think it will appear on Google Play Store until I sort out the disagreement.
In the meantime, if you would like to test the new version, please install V2.6.3 directly from the source code repository here. You will probably have to accept warnings about installing software from un-trusted sources though, because I am not Google!
It should be pretty simple to use the same Android App work with a seizure detector using a Fitbit smart watch (Versa or Ionic), so I think I will develop that and release them as a pair.
Does anyone have a Fitbit Versa or Ionic watch that they could use to test the app? (I’ll buy one myself, but it is good for others to check how well it installs on other systems to mine).
If you can help, please drop me a line at graham@openseizuredetector.org.uk or leave a comment on the post on the facebook page.
I had intended to release the new version of the OpenSeizureDetector Android App just after Christmas, but have had a few issues:
Google Play now requires us to target a recent version of Android. This required quite a lot of code changes, because I was still targeting a very old version – I think I have it working now.
I decided to fix the ‘feature’ where you sometimes had to re-boot the phone after changing settings, or it did odd things. It took a lot of finding, but fixed now. (for those who are interested, it was a race condition – often the start-up activity was being called before the background service had terminated. If this happened the background service did not shutdown and re-start as intended, so I ended up with two copies of the data source running with different settings – hence odd behaviour. I added a delay between asking the background service to shutdown, and starting the start-up activity, which cured it)
Google wants me to take away the need for the SEND_SMS permission. Unfortunately I think we need it if we want to send SMS text messages automatically – Google’s recommended alternative approach just displays a SMS composing screen, and the user has to press ‘send’, which is no use.
Google judged that sending SMS was not a core part of the App so said I need to take away that requirement, or they will delete it on March 9th.
I have started the appeals process explaining that sending SMS is a core part of the app, so hopefully they will agree.
If not I will end up having two versions of the App – one on Goggle play store that can not send SMS messages, and another that you will have to download manually if you want SMS functionality – I hope to avoid that, because I am always very suspicious about downloading apps from random websites….
I have released V2.6.1 for Beta testing (Google allow this until March 9th). This version includes support for Garmin watches.If you would like to test the new version, please sign up for testing here: https://play.google.com/apps/testing/uk.org.openseizuredetector, and feed back any issues to graham@openseizuredetector.org.uk.
As part of the upgrade of the Android App that I need to do for Google Play Store, I have enabled support for the prototype Garmin watch based seizure detector, with associated Heart Rate alarm.
It is very experimental so there are probably issues with it that will stop it working sometimes, but if anyone has one of the higher end Garmin watches, I’d be grateful if you would test it and feed back any results.
Well I was going to publish a beta test version of the updated Android App tonight, but discovered that Google is forcing us to upgrade to target Android V8. Trying to make that change seems to have broken a few things – the background colour of the app has turned white so it looks odd, and most importantly it is not showing a notification. I haven’t worked out how to change it so it will show the notification and still work on lower versions of Android. Maybe tomorrow……. Suffering a slight sense-of-humour failure with Google for enforcing this upgrade that I don’t need!
I need to update the OpenSeizureDetector Android App (https://github.com/OpenSeizureDetector/Android_Pebble_SD). This is because the rules on apps having direct access to telephone and SMS services are changing, and if I don’t update how I do SMS messages, the app will be deleted from the Google Play Store.
Now since I don’t do many updates the the App, I am thinking of doing a few other changes at the same time, so the changes will be:
Change method of sending SMS text messages to be consistent with the new rules.
Add an extra ‘Passive Network Data Source’ which seems to be the way to communicate with alternative devices such as Garmin and Fitbit smart watches.
Add the skeleton of a ‘BLE Data Source’ that I will use for the (possible) future Open Hardware seizure detection watch.
See if I can work out why we sometimes end up with more than one copy of the background service running, which can cause some odd behaviours when you change settings.
Are there any other ‘features’ that are a annoying users that you would like me to have a look at as part of this update? Please either post to the Facebook Page, or drop me an email with any thoughts (graham@openseizuredetector.org.uk).
I have been working on the custom hardware seizure detector for a couple of weeks. The code and schematics are on Github.
Progress to date:
We can write firmware for the ESP32 microcontroller using the FreeRTOS framework 🙂
Access the I2C bus to talk to external sensors (such as the ADXL345 accelerometer).
Wire multiple devices to the I2C bus (I have a heart rate and blood oxygen saturation sensor, and a small display on it too).
Proved that we can communicate with both the accelerometer and display modules.
In Progress at the moment:
Modifying the I2C bus access code to make sure that only one process accesses the bus at a time, otherwise things will go horribly wrong when we try to use multiple devices, all managed by their own software process (task in FreeRTOS speak).
Ordered the main parts for the prototype (I am feeling lucky that I will get the ESP32 based system power consumption down far enough to complete the Proof-of-Concept.
The current proof-of-concept hardware is a rats nest of interconnected bought-in modules – not pretty!
Proof-of-Concept OSDWatch Hardware (ESP32 based)
Work to Do to Complete Proof-of-Concept
Complete the I2C bus access framework and routines to access:
ADXL345 Accelerimater
MAX300102 Heart Rate and Saturation module
OLED Display
Write code to send data to parent device over bluetooth periodically.
Check Power Consumption
Switch off the un-used ESP32 peripherals (e.g. WIFI) to reduce power consumption to give us at least 12 hours from a small LiPo battery.
Work to do for Prototype
Design a custom PCB to hold the main components (rather than using bought in modules that are wired together) – necessary to get it down to wrist watch size.
Get a small number of PCBs manufactured (there seem to be a few companies that do this cheaply in China).
Design a watch case, and manufacture a few using 3D printing.
Populate PCBs with components and solder them.
Test using proof-of-concept code.
Extend the OpenSeizureDetector android app to have a new Data Source which will be the custom OSD watch
Update the firmware to communicate with the Android App.
I am re-starting efforts to build a custom seizure detector hardware platform, because commercially available devices always seem to lack something! The idea is to build a platform with several sensors in it that we can log to see if we detect anything useful with them, in addition to an accelerometer which we know works.
We use one of the original design Pebble watches for Benjamin. There is a known issue with them that users called ‘Screen Tearing’. It is an issue with a poor connection between the main board in the watch and the ribbon cable connecting it to the screen.
Benjamin’s watch has been doing this for some time – the image on the screen gets lines across it and gets difficult to read. It can usually be corrected by squeezing the watch as though you are trying to press the back cover on more firmly. It has got much worse over the last week or so and the screen stopped working altogether and the ‘squeezing’ solution stopped working. This would not be a problem because OpenSeizureDetector works fine without the screen – in fact not updating the screen probably helps with battery life.
The problem is that Benjamin rather likes to look at the display on his watch, and he can tell if it is not right and complains to us, and expects us to fix it for him, which is quite exhausting as anyone who knows Benjamin appreciates! So I decided to take the risk of repairing it…….
Watch back with one of the Torx screws remove
The back cover is held on with four very small Torx T6 screws. If you remove those, you can prise off the back cover of the watch (you can get a finger nail or very small screwdriver between the back cover and the side of the case). It takes a bit of pressure because it is a close fit to make it watertight:
Starting to prise the back cover away from the main case.
Watch back removed – indicating vibration motor, which may be attached to the back cover.
The back cover might not come all the way off, because the vibration motor is glued to the back cover. But in my case the vibration motor detached from the back cover, which made it easier to see what we are doing:
Indicating the ribbon cable that causes the screen tearing problem
I rolled up a small piece of tissue paper and stuffed it in the gap between the ribbon cable and the case – used a small flat bladed screwdriver to push it into the gap. Added another piece of rolled tissue on top so the top of the ribbon cable is pushed down when the cover is replaced.
Rolled up a small piece of tissue paper and stuffed it between the ribbon cable and the case
Added another piece of rolled tissue paper on top of the ribbon cable so the watch back will press on it when it is reassembled.
Reassembled the back (watch out for a small (0.5mm diameter) rubber O ring coming out of the groove in the back cover), and it seems to work – Phew!
Screen working nicely after the repair – that was a relief!
I have started work on a video based seizure detector that will use an Artificial Neural Network to distinguish between ‘Normal’ and ‘Odd’ behaviour to attempt to spot partial seizures.
Unfortunately at the moment the best I can do is get something to tell me that Benjamin is ‘Normal’ and I am ‘Odd’, so still a way to go! A bit more info on this page.
Me Demonstrating ‘Odd’ Behaviour to attempt to train the Neural Network.