1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-10 23:44:05 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
cpfeiffer
109146c8c1 Attempt at fixing a (re-) connection issue
Sometimes reconnection lead only to "Connected" state, but not "Initialized".
This probably happened when the device got disconnected earlier and then was
automatically reconnected. The reconnection closed the previous connection,
which caused the dispatch-thread to wake up and think the connection is
actually establish. Then, when the first action is invoked, it would fail
with an NPE because mBluetoothGatt passed to the action is actually null.
2016-02-18 23:44:01 +01:00
cpfeiffer
c86365ee2e Some more Mi Band pairing improvements #180
- listen to notifications early -- the band then actually tells us that
  authentication is required
- check for this after sending user info
- add authentication states to GBDevice
- workaround for event problems in pairing activity (delivered although
  already unregistered)
- BtLEQueue now deals with gatt events coming *before* connectGatt()
  actually returned (namely the connection event)
2016-02-13 00:15:16 +01:00
cpfeiffer
bd0716ba58 Some more lint warnings fixed 2015-11-23 23:04:46 +01:00
cpfeiffer
81c2f657bd Some lint fixes 2015-11-23 22:46:12 +01:00
cpfeiffer
f349846f4a Another small change to BTLE device connection #156 2015-11-13 23:53:48 +01:00
cpfeiffer
58cfd0fef9 For a start, connect with "false" #156
My connection problems went away with this. Let's see how it works out.
2015-11-03 20:23:48 +01:00
cpfeiffer
c27459b6cc It's recommended to cancel discovery before connecting 2015-11-01 23:32:25 +01:00
cpfeiffer
ac120dc7d6 Small improvement to connect() 2015-10-22 00:32:16 +02:00
cpfeiffer
5a3990b9d2 Guard logging with LOG.isDebugEnabled() 2015-10-19 20:56:56 +02:00
Daniele Gobbetti
6460b391d9 Be dump the content of the notification to the debug log 2015-10-19 15:16:21 +02:00
cpfeiffer
dcd776e09a Attempt to fix never finishing activity data fetching #142
(by disabling unrelated notifications)
2015-10-18 22:27:52 +02:00
Sergey Trofimov
7591d4a8af Fix typo 2015-10-18 18:29:41 +03:00
cpfeiffer
9db7d13a94 Log any exceptions during ble callbacks, if any #91 2015-10-04 00:00:53 +02:00
cpfeiffer
5b8bf468f5 Remove some superfluous checks 2015-10-03 23:52:33 +02:00
cpfeiffer
d6f9eac711 Revert to previous BLE connection method:
- first, connectGatt(true) to support automatic (re-) connection
- second, bluetoothGatt.connect() to connect immediately
2015-10-03 00:21:31 +02:00
Andreas Shimokawa
1d41f2f8e4 Refactoring
The notfification APIs now use NotificationSpec as their only parameter, which
contains all information (required and optional ones).
We no longer have separate methods and actions for SMS/EMAIL/GENERIC anymore.
The type of notification is important now, not how we received them technically.
2015-09-24 14:45:21 +02:00
cpfeiffer
80d15573af Avoid tiny window where a gatt callback of an operation could be unset 2015-09-10 00:00:52 +02:00
cpfeiffer
c23905070c Some more logging improvelets 2015-09-09 23:39:57 +02:00
cpfeiffer
22a9ff1819 Log when no listener is registered for a characteristic change 2015-09-09 23:23:38 +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
cpfeiffer
eec7fae288 Attempting to fix some connection problems after getting disconnected 2015-08-14 00:23:01 +02:00
cpfeiffer
b7223c7e86 Initial support for transaction-local GattCallbacks (not used yet)
So that we won't have to mix everything in MiBandSupport
2015-08-05 23:26:09 +02:00
cpfeiffer
bdc9e70e6e Attempt to fix reconnection problems after being away from the Mi Band
*untested*
2015-08-04 22:03:10 +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