Commit Graph

29 Commits (4b4e95bfe0a0b18bd98bc5d31f1c0f23f68757be)

Author SHA1 Message Date
Andreas Shimokawa 05a4486277 Pebble 2/LE: try to improve pairing results by setting another unknown flag
This might help with "bad pairing" where a pebble wont connect anymore after toggling bluetooth on the watch
A workaround was to scan bluetooth before connecting after toggling bluetooth on the watch
2017-05-28 23:43:37 +02:00
License Bot e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
Andreas Shimokawa 1d1edd41d7 Pebble 2/LE: remove a sleep which might be no longer necessary
Will speedup data transfer
2017-02-12 23:13:24 +01:00
Daniele Gobbetti 1fda1ba1b2 Pebble: try to get rid of the sleep and rely on countdownlatch instead.
Could help with #494
2017-01-08 16:48:50 +01:00
Andreas Shimokawa bd5dc6bfbc Pebble 2/LE: Add setting to limit the MTU (for debugging broken BLE stacks) 2016-12-19 23:28:06 +01:00
Andreas Shimokawa 17b581022b optimize imports 2016-12-09 20:14:17 +01:00
Andreas Shimokawa 3db009e77d Pebble: do not dump all LE traffic, minor code cleanups 2016-12-02 23:38:54 +01:00
Andreas Shimokawa ae2c107ed1 Pebble 2/LE: only notify once when first PP packets are incoming 2016-12-02 08:50:02 +01:00
Andreas Shimokawa bc9041a4c9 Pebble 2/LE: on connect wait 30s max and stop waiting immediately if a real PP connection got establish (ie write request on the gatt server) 2016-12-02 08:07:44 +01:00
Andreas Shimokawa 3eda2d4b81 Pebble 2/LE: honor reconnect tries 2016-12-02 00:38:53 +01:00
Uwe Hermann 0746aaa579 app: Random typo and consistency fixes. 2016-12-01 20:22:12 +01:00
Andreas Shimokawa f0789cc147 Pebble 2/LE: fix another bug when reconnecting 2016-12-01 00:28:23 +01:00
Andreas Shimokawa 2993bb6b5c Pebble 2/LE: fix potential NPE 2016-12-01 00:20:21 +01:00
Andreas Shimokawa 74c20f3a82 Pebble 2/LE: More fun with reconnect 2016-11-30 23:56:58 +01:00
Andreas Shimokawa b878fa5eda Pebble LE/Pebble 2: Fix reconnect not working when first attempt fails 2016-11-30 22:28:34 +01:00
Andreas Shimokawa 95ec1fb44c Pebble LE/Pebble 2: Improve reconnect 2016-11-30 19:54:21 +01:00
Andreas Shimokawa 34ad088b88 Pebble: Experimental support for BLE on all models via dev option in Pebble Settings
HOWTO:
1) Pair you normal Pebble (not necessary if already done), make sure it was connected once
2) Unpair your LE pebble if already paired
3) Switch on "Always prefer BLE" in Pebble Settings
4) Tap on the + in Control Center to add a new device
5) Pair your Pebble-LE XXXX or Pebble Time LE XXXX inside Gadgetbridge's Device Discovery actibity

Now Gadgetbridge will connect to your LE Pebble when tapping on Pebble XXXX if "Always Prefer BLE" option is enabled.
You can easily switch back to classic LE by turning that option off again
2016-11-27 09:49:28 +01:00
Andreas Shimokawa a5263141d7 Pebble 2: Ignore all GATT communication with all other that the current device
Fixes a bad bug where disconnecting from another BLE device caused the Pebble2 to disconnect
2016-11-25 14:28:04 +01:00
Andreas Shimokawa 381323011e Pebble 2: work around FW installation problems
Wait a 0.5s after each complete Pebble packet and do not longer wait at all after a completed GATT package chunk (was 0.1s)
Big outgoing messages will be now much faster such as firmware installations but smaller take more time than before.

(This is not the proper fix but I could update the firmware this way, failed 10 times before after a few percent)
2016-11-24 18:52:58 +01:00
Andreas Shimokawa eb052cead3 Pebble 2: Also honor the mtu when client gets a change reported
Should help older LE Pebbles
2016-11-21 17:29:16 +01:00
Andreas Shimokawa 647b67cfca Pebble 2: call both requestMTU and use the characteristic write 2016-11-21 15:17:03 +01:00
Andreas Shimokawa fce86482b9 Pebble 2: try an alternative way of setting the MTU (might revert) 2016-11-21 14:54:01 +01:00
Andreas Shimokawa e8da301da3 Pebble 2: fix a few crashes with disconnect/ reconnect 2016-11-20 22:04:49 +01:00
Andreas Shimokawa 4f3c46f704 Pebble 2: only add second service if first one was added sucessfully 2016-11-20 00:12:41 +01:00
Andreas Shimokawa 3b250a4568 Pebble 2: initial hacky reconnect support
Works sometimes, at least less crashes
(#432)
2016-11-19 23:53:07 +01:00
Andreas Shimokawa ddfab1cdae Pebble 2: use requestMTU() on Android 5+ instead of characteristics write.
This actually fixes MTU problems with older Pebbles (Time, OG)
2016-11-18 23:47:48 +01:00
Andreas Shimokawa 4dc085de57 Pebble 2: React to MTU notifications, fixes LE for older pebbles also
It seems that setting the MTU on older pebbles does not work, so just use what we can use.
Maybe old pebbles need setMTU() which only works on Android 5+, we could use that conditionally...
2016-11-18 23:47:48 +01:00
Andreas Shimokawa 66e3de9168 Pebble 2: improve connection problems (at least for me) 2016-11-18 22:38:39 +01:00
Andreas Shimokawa 00a71f53b3 Pebble 2: add not yet working code (at least not without weird workarounds)
This is is a pain because of tons of weird pairing issues
2016-11-13 21:29:58 +01:00