Skip to content
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

ERROR_ALREADY_IN_STATE #255

Closed
2 of 10 tasks
KennethEvans opened this issue Mar 20, 2022 · 1 comment
Closed
2 of 10 tasks

ERROR_ALREADY_IN_STATE #255

KennethEvans opened this issue Mar 20, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@KennethEvans
Copy link

Platform on which you observed the bug:

  • Android
  • iOS
  • Other
  • Platform is not relevant for this bug

Device on which you observed the bug:

  • Polar OH1
  • Polar Verity Sense
  • Polar H10
  • Polar H9
  • Other
  • Device is not relevant for this bug

I started getting this error. It is coming from the error branch of the RxJava code for getting ECG. It continued to get HR and RR values. It never got ECG values. I catch that exception and show an exception dialog.

It persisted. Removing the H10 from the strap did not fix it. I was eventually only able to get it working again by removing and replacing the battery. So it clobbered the H10.

I had made no significant changes to the code. The primary one was to just not call the API if all permissions were not granted. (This keeps it from crashing as in #246 if permissions are not granted, since the crashing is in the SDK, and it doesn't look like that's going to be fixed soon.) I did nothing that would affect taking EGCs. I had just checked it with no permissions granted before restoring the permissions and getting this error. Since it no longer starts the API without all permissions granted, that should not have mattered.

This is the Logcat output.

ERROR_ALREADY_IN_STATE-2020-03-20.txt

@KennethEvans KennethEvans added the bug Something isn't working label Mar 20, 2022
@jimmyzumthurm
Copy link
Member

Hi @KennethEvans
Looking at your logs, it seems that you are getting ECG data, for example here :

2022-03-20 13:13:23.925 D/PolarAPI: BlePMDClient/pmd data: HEX: 00 D8 F2 92 9C 49 D9 BA 09 00 95 FF FF 9A FF FF 98 FF FF 93 FF FF 90 FF FF 93 FF FF 93 FF FF 8E FF FF 8E FF FF 8E FF FF 80 FF FF 80 FF FF 8C FF FF 87 FF FF 80 FF FF 85 FF FF 87 FF FF 85 FF FF 87 FF FF 89 FF FF 8E FF FF 90 FF FF 8C FF FF 8C FF FF 90 FF FF 8C FF FF 7D FF FF 6D FF FF B9 FF FF C3 00 00 5E 01 00 B5 00 00 C3 FF FF 75 FE FF 59 FD FF 3B FE FF 66 FF FF 33 FF FF 12 FF FF 63 FF FF 7B FF FF 79 FF FF 90 FF FF 8E FF FF 80 FF FF 87 FF FF 95 FF FF 90 FF FF 87 FF FF 87 FF FF 93 FF FF 9F FF FF 9F FF FF 9A FF FF 9C FF FF 9F FF FF A1 FF FF AB FF FF B2 FF FF B4 FF FF BB FF FF C7 FF FF CE FF FF D1 FF FF DD FF FF EB FF FF ED FF FF F0 FF FF FC FF FF 02 00 00 0B 00 00 1E 00 00 28 00 00

that occurs right before "ALREADY_IN_STATE_ERROR".

First byte (0x00) indicated ECG measurement type data frame is received on Data Characteristic of the BLE Pmd service, which explains "ALREADY_IN_STATE_ERROR" as it seems the device is already streaming ECG data.

Next 8 bytes are time stamp : D8 F2 92 9C 49 D9 BA 09 (little endian)
And next one is the frame type : 0x00 -> which is the frame type used for ECG by H10.

It doesn't seem to be a bug, I will close the ticket, but feel free to open a new one if you still have issues with getting ECG data from H10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants