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

Not showing temp or anything in the screen #3

Closed
simpxlify opened this issue Sep 8, 2021 · 14 comments
Closed

Not showing temp or anything in the screen #3

simpxlify opened this issue Sep 8, 2021 · 14 comments

Comments

@simpxlify
Copy link

simpxlify commented Sep 8, 2021

Hello, I found out this by coincidence while studying Bluetooth and coroutines on android studio kotlin and I found out your library in java which is amazing and works amazingly, I found out this one too just now and wanted to run a test if it worked as smooth as the java one but the text when you measure temperature is not showing, didn't test anything else but that for now but I don't know if you are going to look into this, in the logcat it all works wonderful.

@simpxlify simpxlify changed the title Not showing in the screen Not showing temp or anything in the screen Sep 8, 2021
@weliem
Copy link
Owner

weliem commented Sep 8, 2021

That is strange. Works totally fine on my phone.... can you try again or try on a different phone?

Make sure you have uninstalled the Java version if you have it installed....otherwise 2 apps are competing for the same data.

@simpxlify
Copy link
Author

I've tried with the heart rate machine and works fine, the temp one only works sometimes somehow, does it have to do with battery at all?
I'll test with a phone later for sure.

@weliem
Copy link
Owner

weliem commented Sep 8, 2021

As you can see in the code, all measurement types are treated the same way. Don't see anything different for the temperature measurement. Can you share a log for a case where it doesn't appear?

@simpxlify
Copy link
Author

simpxlify commented Sep 9, 2021

image

The logs do appear when temperature appears on the screen, I was comparing the java version because on java seems to always work, might be the coroutines fault for not being as fast? I really have no clue but the java one actually always work so it cant be the devices fault. In this example he connects but cant read any value or present it on the screen

@martijnvanwelie
Copy link

As you can see in the logs, no temperature value was received. So nothing will be displayed.

@simpxlify
Copy link
Author

simpxlify commented Sep 9, 2021

As you can see in the logs, no temperature value was received. So nothing will be displayed.

Yes, but that's the thing, it's giving a temperature on the thermometer but it's just not getting passed, with some exceptions that sometimes they do pass occasionally, also tried with a scale and pulseOx today and they dont even connect, I think I need to dig better into this.

@weliem
Copy link
Owner

weliem commented Sep 10, 2021

I see you are using the Taidoc 1241. It indeed behaves a bit strange. The first measurement normally comes through but the second doesn't. I usually disconnect 2 seconds after receiving measurements and then I wait for it to turn off (around 30 seconds). That sort of makes it manageable. But the real problem is the device itself...

@simpxlify
Copy link
Author

simpxlify commented Sep 10, 2021

I see you are using the Taidoc 1241. It indeed behaves a bit strange. The first measurement normally comes through but the second doesn't. I usually disconnect 2 seconds after receiving measurements and then I wait for it to turn off (around 30 seconds). That sort of makes it manageable. But the real problem is the device itself...

Okay, so it might be indeed the device himself, I'll try to get another thermometer with bluetooth, thank you very much sir, but I simply cant get how in java it just works wonders reading it and in kt it just behaves so odd.

@simpxlify
Copy link
Author

Alright I made them all connect, I have yet to get better understanding of this, Im doing a general scan for now because oximeter and scale werent getting connected, I get them all to connect but once again they just dont show their values or anything and I cant find the cause at all, the only one that always instantly show his values is the blood pressure one, I dont know what is failing here to them not to write on logcat or screen when they connect, if you have any suggestion please let me know, thank you in advance.

@weliem
Copy link
Owner

weliem commented Sep 10, 2021

Please share some logs, otherwise I have no clue what is going on....

@simpxlify
Copy link
Author

image
Im sorry, alright here are the logs for the pulse oximeter right as he starts I get values on the pulseOx but they are not passed to the mobile phone.

@martijnvanwelie
Copy link

Ok, you should know that all Taidoc devices use a mix of standard services and proprietary services. The pulseoximeter you are using does not have the standard PulseOX service. You need to use the proprietary service and it's protocol of writing commands. You should contact Taidoc to get their official documentation.

@simpxlify
Copy link
Author

Okay, I will do that, sir I have one more question if you could answer, could you please explain me as an example this part of the code:

val timestampPresent = flags and 0x02 > 0 val userIDPresent = flags and 0x04 > 0 val bmiAndHeightPresent = flags and 0x08 > 0

I dont quite understood this flags and numbers, if you could please explain I would be grateful to you.

@weliem
Copy link
Owner

weliem commented Sep 14, 2021

The first byte is used to indicate whether certain content will be in the byte array. So every 'bit' of the 'byte' has a meaning. This code just tests which bits are on/off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants