Skip to content

Commit

Permalink
L2CAP Support for ISO 18013-5 Holders
Browse files Browse the repository at this point in the history
NOTE: Currently not working!  See below.

This provides L2CAP support for the holder for 18013-5.  This is
disabled at present; the code is in place, but calling connect() on
the L2CAP socket throws a "resources not available" exception for
reasons I have not yet tracked down.

The code should otherwise be ready, however; the request read and
the response write are both in place.  The presence of an L2CAP
characteristic on the peripheral no longer breaks the old flow for
the code, so we now properly do non-L2CAP connections to L2CAP
peripherals.

For convenience, this also includes a makefile to orchestrate
building and running; `make` or `make install` will build the
example app and attempt to install it on all connected android
devices.  `make run` will launch the example app on one device
and attempt to attach `logcat`. `make help` lists the available
commands.
  • Loading branch information
Todd Showalter committed Sep 16, 2024
1 parent 3e5df43 commit 46fed1d
Show file tree
Hide file tree
Showing 6 changed files with 414 additions and 174 deletions.
4 changes: 2 additions & 2 deletions MobileSdk/src/main/java/com/spruceid/mobile/sdk/BleCentral.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class BleCentral(
/**
* Starts to scan for devices/peripherals to connect to - looks for a specific service UUID.
*
* Scanning is limited with a timeout to preserve batter life of a device.
* Scanning is limited with a timeout to preserve battery life of a device.
*/
fun scan() {
val filter: ScanFilter = ScanFilter.Builder()
Expand Down Expand Up @@ -153,4 +153,4 @@ fun isBluetoothEnabled(context: Context): Boolean {

fun getBluetoothManager(context: Context): BluetoothManager? {
return context.getSystemService(BLUETOOTH_SERVICE) as? BluetoothManager
}
}
Loading

0 comments on commit 46fed1d

Please sign in to comment.