95 Commits

Author SHA1 Message Date
Rohit Sangwan b978b81cb1 Add default timeout in Connect, Pair and IsPaired apis 2024-09-19 12:50:31 +05:30
Foti Dim 694262d9a9 Allow pairing on all platforms
Mark Web/Linux as not supporting in-app pairing
2024-09-18 06:49:11 +02:00
Rohit Sangwan 7dc22c58a5 Improve scan filter api (#78)
* Improve scan filter api

* Implement Windows filters

* Add manufacturerDataList and deprecate manufacturerData

* Fix Windows

* Update Readme and changelog

* Remove import

* Fix Linux

* Update readme and changelog

* Cleanup Todo

* Improve ManufacturerData

* Rename webConfig and Manufacturer.data

* Return false for receivesAdvertisements on Linux/Web

* Add delay in discoverServices on Linux

* Remove import

* Update changelog

---------

Co-authored-by: fotidim <foti@navideck.com>
2024-09-16 23:43:51 +02:00
Foti Dim c37036135d Auto convert all services passed to getSystemDevices 2024-08-16 14:45:47 +02:00
Rohit Sangwan f7c05b2490 Remove error from onPairingStateChange (#75)
* Remove error from onPairingStateChange

* Update ChangeLog and Readme

* Update Changelog
2024-08-13 16:19:21 +02:00
Foti Dim 40819d5796 Return pair result 2024-08-12 21:15:56 +02:00
Foti Dim 7606e8fd29 Implement pairing on Apple (#59) 2024-08-09 22:42:40 +02:00
Rohit Sangwan 5ce6c3d362 Improve web support (#66)
* Improve web support

* Rename to _hasSelectedCharacteristicProperty

* Update comment

* Make _bleService private

---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
2024-07-31 09:28:50 +02:00
Rohit Sangwan 28b0bc6b7c Add platform specific options in start scan (#65)
* Add platform specific options in start scan

* Add code level doc and ChangeLog

* Minor improvements
2024-07-21 17:05:29 +02:00
Rohit Sangwan 0d6b612497 Receive advertisement events on web (#63)
* Fix web manufacturer discovery

* Minor Fixes

* Cleanups

* Add canWatchAdvertisements api

* Improve Cleanups

* Improve code level documentation

* Improve documentation

---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
2024-07-19 10:39:49 +02:00
Foti Dim c0c678c735 Trim spaces in UUIDs 2024-07-15 11:53:00 +02:00
Foti Dim efaa72acbd Improve BleUuid API and tests (#62)
* Improve tests

* Fix tests

* More improvements and ToDos

* Final API changes
Add tests

* Update readme

---------

Co-authored-by: Rohit Sangwan <rohitsangwan647@gmail.com>
2024-07-15 05:59:30 +02:00
Rohit Sangwan dffbbd4ba6 Allow modification of ScanFilter properties 2024-07-12 16:23:17 +05:30
Rohit Sangwan 9cade4a6ee Fix UUID parsing on Web 2024-07-12 11:44:39 +05:30
Rohit Sangwan 9bb209f8b5 Unify UUID formatting (#55)
* Unify UUID formatting

* Update Readme

* Update Readme

* Apply suggestions from code review

Co-authored-by: Foti Dim <foti@navideck.com>

* Resolve Comments

* Add test and support 32bit uuid parsing

* Add a toString() method to the BleDevice class for easier debugging and logging

* Rename Uuid to BleUuid

* Rename uuid file to ble_uuid

* Update Readme

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2024-07-05 17:53:55 +02:00
Rohit Sangwan 8d0cfe98d9 Add connecting and disconnecting states to BleConnectionState (#54)
* Add connecting and disconnecting state

* Replace BleConnectionState with boolean in onConnectionChanged callback

* Improve Docs and Changelog

* Implement GetConnectionState in Windows

* Update CHANGELOG.md

Co-authored-by: Foti Dim <foti@navideck.com>

* Add  code level doc of connectionState getter

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2024-06-20 20:47:02 +02:00
Foti Dim 796bb14ccc Do not initialize global queue if not needed (#53) 2024-06-17 10:39:17 +02:00
Foti Dim 15453eb28f Rename onConnectionChanged and onValueChanged
Update changelog
Format files
2024-06-15 09:13:01 +02:00
Foti Dim 58677246b3 Improve queue naming 2024-06-13 22:40:06 +02:00
Foti Dim 6361574b77 Add connection properties in BleDevice (#50)
* Rename to BleDevice

* Add isConnected property

* Make isConnected true

* Add isConnected api

* Implement Windows

* Merge add-isConnected-api

* Rename getConnectedDevices to getSystemDevices

* Add code level Doc for isConnected

* Add isPaired

* Revert isPaired

* Add isSystemDevice property in BleDevice

* Return enum instead of bool

---------

Co-authored-by: Rohit Sangwan <rohitsangwan647@gmail.com>
2024-06-13 16:14:54 +02:00
Rohit Sangwan b74191bb97 Implement pairing with dialog on windows (#46)
* Implement pairing with dialog on windows

* Minor fix

* Add pin pairing request for windows 10

* Implement native windows dialog for asking pin pairing

* Cleanups

* Improve pairing dialog ui

* Use PairAsync for Windows 11

* Fix OK button text

* Improve pin entry layout

Co-authored-by: Rohit Sangwan <rohitsangwan647@gmail.com>

* Dialog adjustments

* Make dialog non resizable

* Make window topmost

* Final adjustments

* Update changelog

* Release dialog resources properly

* Release dialog resources properly

* Remove duplicate import

* Minor Fix

---------

Co-authored-by: fotidim <foti@navideck.com>
2024-06-11 12:28:25 +02:00
Rohit Sangwan 2fe21962d2 Add queue per device (#48)
* Add queue per device

* Improve API and documentation

* Update lib/src/universal_ble.dart

* Update lib/src/ble_command_queue.dart

---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
Co-authored-by: Foti Dim <foti@navideck.com>
2024-06-07 20:55:46 +05:30
Rohit Sangwan 5847bbffc5 Add name prefix filtering (#45)
* Add name filter

* Change name filter to "prefix"

* Implement namePrefix filtering

* Update lib/src/universal_ble_platform_interface.dart

* Update lib/src/universal_ble_platform_interface.dart

---------

Co-authored-by: fotidim <foti@navideck.com>
2024-05-17 15:49:30 +02:00
Foti Dim 77b8658f72 Remove dependency on collection (#43)
* Remove dependency on collection

* Update changelog
2024-05-10 14:25:59 +02:00
Rohit Sangwan 05697b7d30 Improve setNotifiation completion (#42)
* Improve setNotifiation completion

* Implement Windows

* Minor android fixes

* Few more fixes

* Update changelog

---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
2024-05-10 12:59:10 +02:00
fotidim a49b260b67 Improve service discovery on linux 2024-05-09 14:14:33 +02:00
Foti Dim e252cfeec0 Format project 2024-04-10 22:57:26 +02:00
Foti Dim 57cf39f581 Make variables final and fix formatting in Linux 2024-04-10 22:56:56 +02:00
Morten Boye Mortensen ef83aad181 Fix characteristic keying on linux (#35) 2024-04-10 22:53:08 +02:00
Rohit Sangwan 870defea86 Update readme and improve logs (#28)
* Update readme and improve logs

* Apply suggestions from code review

Co-authored-by: Foti Dim <foti@navideck.com>

* Add changelog

* Update Readme

* Update lib/src/universal_ble_web/universal_ble_web.dart

* Improve readme

* Update README.md

* Keep web section

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2024-03-19 09:22:54 +01:00
Rohit Sangwan 1a0e48ba1a Add manufacturer data filtering (#23)
* Add manufacturer data filtering

* Implement manufacturer data filter in windows

* Fix manufacturerData filtering on windows

* Fix linux

* Clean comments

---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
2024-03-18 18:44:44 +01:00
Foti Dim 580fca6e4a Fix wrong manufacturer data in release mode (#24)
* Fix wrong manufacturer data in release mode

* Improve code

* fix manufacturer data for little endian

* Minor fix

---------

Co-authored-by: Rohit Sangwan <rohitsangwan647@gmail.com>
2024-03-18 18:16:16 +01:00
Rohit Sangwan fe0a654f36 Implement requestMtu in Linux (#22)
* Implement requestMtu in Linux

* Minor fixes

* Improve requestMtu
2024-03-17 11:48:33 +01:00
Foti Dim d5b111288c Release 0.9.4 2024-03-13 21:05:06 +01:00
Rohit Sangwan 1f7ba287ef Implement ScanFilter (#17)
* Implement ScanFilter

* Add windows implementation

* Fix Linux and cleanups

* Update Readme, Changelog and Version

* Minor fixes from AI comments

* Fix windows crash and update pigeon

* Fix UUID parsing

* Apply suggestions from code review

Co-authored-by: Foti Dim <foti@navideck.com>

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2024-03-05 22:37:14 +05:30
Foti Dim 300295b947 Remove space in comment 2024-03-01 09:50:56 +01:00
Rohit Sangwan 663bc76dfe Improve Windows and Linux error handling (#12)
* Improve windows and linux error handeling

* Send proper error code from windows for write command

* Fix Linux

* Fix getConnectedDevices on windows

---------

Co-authored-by: fotidim <fdimanidis@gmail.com>
Co-authored-by: fotidim <foti@navideck.com>
2024-02-16 19:36:36 +01:00
Rohit Sangwan 35d4737f3a Implement queue (#11)
* Implement queue

* Enable queue by default, remove queue from web and update readme

* Rename useQueue to queuesRequests

* Rename queuesRequests and improve readme

* Rename _executeMethod and improve readme

* Rename to _isQueueEnabled

---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
2024-02-15 07:57:11 +01:00
Rohit Sangwan edd5ec20a5 Improve logging (#9)
* Improve logging

* Update changelog

---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
2024-02-12 12:00:57 +01:00
Rohit Sangwan f2426e8557 Improve Linux implementation (#8)
---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
2024-02-12 11:24:37 +01:00
Rohit Sangwan ed3852a5c9 Improve windows device name discovery (#4)
* Improve windows device name discovery

* Imrove classes and folders structuring

* rename generated files

* Improve windows threads and other fixes

* More optimizations

* Cleanups

* Update .vscode/settings.json

Co-authored-by: Foti Dim <foti@navideck.com>

* Resolve comments

* Performance improvements

---------

Co-authored-by: Foti Dim <foti@navideck.com>
Co-authored-by: Foti Dim <fdimanidis@gmail.com>
2024-02-02 12:10:53 +01:00
Rohit Sangwan 2326e598cf Improve web (#3)
* Improve web example app

* Improve readme

* Minor improvements

* add github workflow for example app

* Fix flutter version in github action

* Fix flutter version in github action

* Fix flutter version in github action

* Fix flutter version in github action

* Minor fix

* Minor fixes

* Update readme and version

* Update Changelog

* Improve wording

* Update CHANGELOG.md

Co-authored-by: Foti Dim <foti@navideck.com>

---------

Co-authored-by: Foti Dim <fdimanidis@gmail.com>
Co-authored-by: Foti Dim <foti@navideck.com>
2024-01-26 14:05:48 +01:00
Rohit Sangwan 531b6139c4 Improve example app (#2)
* Improve example app

* Accept list of hex values in write value field

* Minor fix

---------

Co-authored-by: Foti Dim <foti@navideck.com>
2024-01-25 18:55:49 +01:00
Foti Dim 9521c2552a Rename pairState and improve readme (#1)
* Improve readme

* rename OnPairStateChange api

---------

Co-authored-by: Rohit Sangwan <rohitsangwan647@gmail.com>
2024-01-25 17:56:31 +01:00
Foti Dim 1c21373478 Initial commit 2024-01-24 14:23:49 +01:00