emericg / toolBLEx

A multiplatform Bluetooth Low Energy (and Classic) device scanner and analyzer.
GNU General Public License v3.0
182 stars 15 forks source link

[Feature Request] Persistent Data Storage #26

Open Megachip opened 1 week ago

Megachip commented 1 week ago

Would be nice to have (a) persistant data(base).

There is already a date in first seen, but when closing the app, all data is gone.

emericg commented 1 week ago

Hum there already is a persistent database :/ it's always been there, actually. From the other issue, I guess you are using the flatpak version?

The persistent database is a file in the standard folder for application stuff (/.local/share/toolBLEx/toolBLEx/data.db) and it save all the seen devices, and many things about them. There is also a folder (/.local/share/toolBLEx/toolBLEx/devices/) that saves the cached services and characteristiques for the devices, does that feature works?

Megachip commented 1 week ago

Hum there already is a persistent database :/ it's always been there, actually. From the other issue, I guess you are using the flatpak version?

Yes. At least for this request. Not tested windows or other OSses.

The persistent database is a file in the standard folder for application stuff (~/.local/share/toolBLEx/toolBLEx/data.db) and it save all the seen devices, and many things about them. There is also a folder (~/.local/share/toolBLEx/toolBLEx/devices/) that saves the cached services and characteristiques for the devices, does that feature works?

I would love to see the strike outed part ;) But Ill guess most of the BLE devices randominze there UID, so maybe this feature doesn't make so much sense as it seems on the first thought?

emericg commented 1 week ago

Damn sorry, the ~ character in the paths automatically put strikes in the comment :o Nothing is randomized in BLE, just the MAC addresses in iOS and macOS are replaced by a randomized UUID, but it's done once per computer, so you can reconnect to the same BLE device later (but can't identify one BLE device between two computers).

Path for saved data is /.local/share/toolBLEx/toolBLEx/ Path for saved config is /.config/toolBLEx/toolBLEx.conf

Maybe saving data need a special permission with flatpaks, I don't know...