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

Feature inquiry: TPMS #34

Open
L3m0nk opened this issue Mar 9, 2023 · 7 comments
Open

Feature inquiry: TPMS #34

L3m0nk opened this issue Mar 9, 2023 · 7 comments
Assignees

Comments

@L3m0nk
Copy link

L3m0nk commented Mar 9, 2023

Hey super happy you dropped this. I've been working on a similar app, but due to time haven't had a chance to finish it. This is far more refined!

I haven't reviewed your code yet, however, is the scanning lib your using capable of scanning for low power BLE TPMS sensors? Sometimes they're hidden/unnamed and only visible on deep scans.
This would give the tool to detect most newer following vehicles with functioning TPMS sensors. It may require TPMS specific detection logic though.

I would also suggest additional filters, such as maybe RSSI thresholds. Also a setting to detect via GPS or accelerometer when on the road and only scan when mobile may be useful.

@L3m0nk L3m0nk added the bug Something isn't working label Mar 9, 2023
@Semper-Viventem Semper-Viventem added Feature request and removed bug Something isn't working labels Mar 9, 2023
@Semper-Viventem
Copy link
Owner

Hey, thank you for your feedback! Those are awesome ideas about road mode, I think it may be helpful.

Regarding TPMS and BLE library, I use the standard android framework's mechanism working with BLE, I'm not sure if there is only one standard for TPMS communication. If some of these sensors work with BLE so it may be possible to detect this.

@L3m0nk
Copy link
Author

L3m0nk commented Mar 9, 2023

Some of the specific identifiers for TPMS/tire pressure are in this: https://www.bluetooth.com/specifications/assigned-numbers/

Categorizing/filtering by some of these could be useful - unsure if this is different from manufacturer id though.

Another valuable feature for the road mode/filters are inclusion/exclusion radiuses on the map like IFTTT

@L3m0nk L3m0nk closed this as completed Mar 9, 2023
@L3m0nk
Copy link
Author

L3m0nk commented Mar 9, 2023

Accidental close

@L3m0nk L3m0nk reopened this Mar 9, 2023
@L3m0nk
Copy link
Author

L3m0nk commented Mar 9, 2023

doing some testing: two other questions:
Are you using CALLBACK_TYPE_ALL_MATCHES?
Also what type of SCAN MODE - low latency or balanced?

Thanks and great work!

@Semper-Viventem
Copy link
Owner

Are you using CALLBACK_TYPE_ALL_MATCHES?

The app process all BLE data, I don't segregate it by the callbackType. Shall I?

Also what type of SCAN MODE - low latency or balanced?

I use SCAN_MODE_LOW_LATENCY because it gives us more realistic data. Android has a lot of restrictions for background scanning so it is good to improve accuracy in anyways

@L3m0nk
Copy link
Author

L3m0nk commented Mar 10, 2023

By default, if you don't specify a callbackType, Android's BLE API will use CALLBACK_TYPE_FIRST_MATCH. This means that the API will stop scanning as soon as it finds the first matching device, and won't continue scanning for other devices.

On the other hand, if you specify CALLBACK_TYPE_ALL_MATCHES, the API will deliver a callback for every advertisement packet received from all scanned devices, regardless of whether the device has already been seen before. This means that you will get more frequent callbacks and potentially more data, which could result in a larger number of visible devices.

Thoughts?

@L3m0nk
Copy link
Author

L3m0nk commented Mar 10, 2023

May be effective, as our goal isn't to successfully connect, but just identify existence and proximity.

Also, I see mention of the other reported 'bug" that devices aren't visible - this may be related.

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

No branches or pull requests

2 participants