1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-16 18:34:03 +02:00
Commit Graph

26 Commits

Author SHA1 Message Date
License Bot
9aadb2f2fd Update license headers 2019-04-21 18:53:10 +02:00
Andreas Böhler
6577ad69b0 Add initial support for Gatt server in BtLEQueue 2019-02-18 20:20:57 +01:00
License Bot
beedb653e6 Update license headers 2019-02-13 20:43:31 +01:00
Daniele Gobbetti
75d3dffb14 Migrate to androidx support libraries and bump compile SDK version
"Optimize imports" has been run on all source files, there might be
unrelated changes, but these should be harmless.
2019-01-26 16:00:56 +01:00
cpfeiffer
fb85326939 performConnected() -> builder.qeueue(getQueue()) 2019-01-03 00:44:34 +01:00
José Rebelo
cc6c57bd4c Add support for LED Color, FM Frequency 2018-08-31 14:03:39 +01:00
License Bot
238bacde9f Update license headers 2018-02-26 14:27:33 +01:00
License Bot
e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
cpfeiffer
6282597790 Handle BT issues with discovered characteristics
It occurred to me that onServicesDiscovered() was called multiple times
whenever I connected to my Mi Band 2. Either the band actually sent the
characteristics in multiple chunks or Android itself notified multiple
times.

So we gracefully handle this by
- updating the list of characteristics
- *not* initializing the device again when it *is* already initialized
or at least initializing.
2017-03-09 22:49:13 +01:00
cpfeiffer
839da4f06a Shuffle some logging things around 2016-10-21 00:50:41 +02:00
cpfeiffer
ccdb843b6e Improved Mi Band 2 support #323
- connecting works and is stable
- firmware and hardware version is displayed
- time is set
2016-09-20 23:12:17 +02:00
JohnnySun
53d4681763 Optimize Imports 2016-09-13 23:53:35 +08:00
cpfeiffer
b43b7948b0 Let GallCallback return boolean values in order to mark an event as "consumed"
(to avoid dispatching the event to further listeners (ble profiles)
2016-07-28 23:04:37 +02:00
cpfeiffer
f5ba09ebe0 Some babysteps towards miband2 support #323
Start to implement standard BLE profiles/services.
2016-07-25 00:00:22 +02:00
cpfeiffer
1997a9b7fa some more service discovery logging 2016-07-18 23:55:44 +02:00
cpfeiffer
c360eb3392 This should fix some connection problems #274
Some APIs have become synchronous, it seems, e.g.
connectGatt() -> onConnectionStateChanged() -> discoverServices() -> onServicesDiscovered()
appears to happen synchronously. So connectGatt() will not return before services are discovered!

So now we deal with this situation.
2016-05-26 19:03:38 +02:00
cpfeiffer
5e02724c4c Make automatic reconnect after connection loss configurable #293
Mi Band: automatically reconnect when the device is back in range

Also: #89
2016-04-28 23:17:13 +02:00
cpfeiffer
804a85d31f Small refactoring of BtLE actions 2016-04-03 21:46:24 +02:00
cpfeiffer
bd0716ba58 Some more lint warnings fixed 2015-11-23 23:04:46 +01:00
cpfeiffer
52f3ca5253 Always name things positively. Negating things is bad for comprehension :-) 2015-10-19 23:36:10 +02:00
Daniele Gobbetti
deea721090 Add verbatim Official BLE Services, Descriptors and Characteristics.
Move the already defined constants to these new classes.
2015-09-28 12:51:01 +02:00
Daniele Gobbetti
720eaa111d Add generic service for immediate alert and prepare the code to support characteristics from different services 2015-09-25 17:45:06 +02:00
cpfeiffer
dbb92b55bc Make the Operations classes BLE-generic 2015-08-18 00:31:40 +02:00
cpfeiffer
33b598ce5c First part of extracting parts out of MiBandSupport
Extract Activity Data fetching into distinct 'operation' class.

Fix a few small things wrt transaction-local GattCallbacks along the way.
2015-08-18 00:11:53 +02:00
Daniele Gobbetti
fe11e6d306 Some BTLE cleanup:
- the BASE_UUID is shared between all BTLE devices, not miband specific. So are the UUID DESCRIPTORS. Hence these have been moved to AbstractBTLEDeviceSupport
- the gatt-characteristic-property-constants used previously in MiBandNotifyAction are also general, and exposed by the gatt subsystem, hence the specific action has been dropped moving the logic to the NotifyAction class
 - the logic for checking the gatt-characteristic-property-constants has been extended also to the ReadAction and WriteAction class, this way we won't try to read (or write)  a characteristic that isn't readable (or writeable)
2015-08-07 16:59:52 +02:00
cpfeiffer
7c597b325a Big refactoring: move classes and packages around to get a better structure
- model package contains mostly shared interfaces (UI+service), not named GB*
- impl package contains implementations of those interfaces, named GB*
  the impl classes should not be used by the service (not completely done)
- the service classes should mostly use classes inside the service and deviceevents
  packages (tbd)

Every device now has two packages:
- devices/[device name] for UI related functionality
- service[device name] for lowlevel communication
2015-08-03 23:09:49 +02:00