chore(deps): update nordic.ble to v2.0.0-alpha13 (#4534)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
renovate[bot] 2026-02-11 11:14:46 -06:00 committed by GitHub
parent f5eb3387bb
commit 55b17857be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 169 additions and 189 deletions

View file

@ -37,10 +37,8 @@ import no.nordicsemi.kotlin.ble.core.LegacyAdvertisingSetParameters
import no.nordicsemi.kotlin.ble.core.Permission
import org.junit.Ignore
import org.junit.Test
import java.util.UUID
import kotlin.time.Duration.Companion.milliseconds
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid
@OptIn(ExperimentalCoroutinesApi::class, ExperimentalUuidApi::class)
class NordicBleInterfaceDrainTest {
@ -48,8 +46,6 @@ class NordicBleInterfaceDrainTest {
private val testDispatcher = StandardTestDispatcher()
private val address = "00:11:22:33:44:55"
private fun UUID.toKotlinUuid(): Uuid = Uuid.parse(this.toString())
@Ignore("Flaky: relies on timing in the Nordic BLE mock library which causes intermittent CI failures")
@Test
fun `drainPacketQueueAndDispatch reads multiple packets until empty`() = runTest(testDispatcher) {
@ -95,9 +91,9 @@ class NordicBleInterfaceDrainTest {
isBonded = true,
eventHandler = eventHandler,
cachedServices = {
Service(uuid = BleConstants.BTM_SERVICE_UUID.toKotlinUuid()) {
Service(uuid = BleConstants.BTM_SERVICE_UUID) {
Characteristic(
uuid = BleConstants.BTM_TORADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_TORADIO_CHARACTER,
properties =
setOf(
CharacteristicProperty.WRITE,
@ -107,18 +103,18 @@ class NordicBleInterfaceDrainTest {
)
fromNumHandle =
Characteristic(
uuid = BleConstants.BTM_FROMNUM_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMNUM_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
fromRadioHandle =
Characteristic(
uuid = BleConstants.BTM_FROMRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.READ),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_LOGRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_LOGRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)

View file

@ -38,10 +38,8 @@ import no.nordicsemi.kotlin.ble.core.LegacyAdvertisingSetParameters
import no.nordicsemi.kotlin.ble.core.Permission
import org.junit.Before
import org.junit.Test
import java.util.UUID
import kotlin.time.Duration.Companion.milliseconds
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid
@OptIn(ExperimentalCoroutinesApi::class, ExperimentalUuidApi::class)
class NordicBleInterfaceRetryTest {
@ -49,8 +47,6 @@ class NordicBleInterfaceRetryTest {
private val testDispatcher = UnconfinedTestDispatcher()
private val address = "00:11:22:33:44:55"
private fun UUID.toKotlinUuid(): Uuid = Uuid.parse(this.toString())
@Before
fun setup() {
Logger.setLogWriters(
@ -106,10 +102,10 @@ class NordicBleInterfaceRetryTest {
isBonded = true,
eventHandler = eventHandler,
cachedServices = {
Service(uuid = BleConstants.BTM_SERVICE_UUID.toKotlinUuid()) {
Service(uuid = BleConstants.BTM_SERVICE_UUID) {
toRadioHandle =
Characteristic(
uuid = BleConstants.BTM_TORADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_TORADIO_CHARACTER,
properties =
setOf(
CharacteristicProperty.WRITE,
@ -118,17 +114,17 @@ class NordicBleInterfaceRetryTest {
permission = Permission.WRITE,
)
Characteristic(
uuid = BleConstants.BTM_FROMNUM_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMNUM_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_FROMRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.READ),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_LOGRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_LOGRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
@ -211,10 +207,10 @@ class NordicBleInterfaceRetryTest {
isBonded = true,
eventHandler = eventHandler,
cachedServices = {
Service(uuid = BleConstants.BTM_SERVICE_UUID.toKotlinUuid()) {
Service(uuid = BleConstants.BTM_SERVICE_UUID) {
toRadioHandle =
Characteristic(
uuid = BleConstants.BTM_TORADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_TORADIO_CHARACTER,
properties =
setOf(
CharacteristicProperty.WRITE,
@ -223,17 +219,17 @@ class NordicBleInterfaceRetryTest {
permission = Permission.WRITE,
)
Characteristic(
uuid = BleConstants.BTM_FROMNUM_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMNUM_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_FROMRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.READ),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_LOGRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_LOGRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)

View file

@ -39,10 +39,8 @@ import no.nordicsemi.kotlin.ble.core.Permission
import no.nordicsemi.kotlin.ble.core.and
import org.junit.Before
import org.junit.Test
import java.util.UUID
import kotlin.time.Duration.Companion.milliseconds
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid
@OptIn(ExperimentalCoroutinesApi::class, ExperimentalUuidApi::class)
class NordicBleInterfaceTest {
@ -50,8 +48,6 @@ class NordicBleInterfaceTest {
private val testDispatcher = UnconfinedTestDispatcher()
private val address = "00:11:22:33:44:55"
private fun UUID.toKotlinUuid(): Uuid = Uuid.parse(this.toString())
@Before
fun setup() {
Logger.setLogWriters(
@ -107,28 +103,28 @@ class NordicBleInterfaceTest {
isBonded = true,
eventHandler = eventHandler,
cachedServices = {
Service(uuid = BleConstants.BTM_SERVICE_UUID.toKotlinUuid()) {
Service(uuid = BleConstants.BTM_SERVICE_UUID) {
Characteristic(
uuid = BleConstants.BTM_TORADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_TORADIO_CHARACTER,
properties =
CharacteristicProperty.WRITE and CharacteristicProperty.WRITE_WITHOUT_RESPONSE,
permission = Permission.WRITE,
)
fromNumHandle =
Characteristic(
uuid = BleConstants.BTM_FROMNUM_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMNUM_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
fromRadioHandle =
Characteristic(
uuid = BleConstants.BTM_FROMRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.READ),
permission = Permission.READ,
)
logRadioHandle =
Characteristic(
uuid = BleConstants.BTM_LOGRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_LOGRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
@ -240,10 +236,10 @@ class NordicBleInterfaceTest {
isBonded = true,
eventHandler = eventHandler,
cachedServices = {
Service(uuid = BleConstants.BTM_SERVICE_UUID.toKotlinUuid()) {
Service(uuid = BleConstants.BTM_SERVICE_UUID) {
toRadioHandle =
Characteristic(
uuid = BleConstants.BTM_TORADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_TORADIO_CHARACTER,
properties =
setOf(
CharacteristicProperty.WRITE,
@ -257,17 +253,17 @@ class NordicBleInterfaceTest {
}
// Add other required chars to avoid discovery failure
Characteristic(
uuid = BleConstants.BTM_FROMNUM_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMNUM_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_FROMRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.READ),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_LOGRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_LOGRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
@ -338,9 +334,9 @@ class NordicBleInterfaceTest {
isBonded = true,
eventHandler = eventHandler,
cachedServices = {
Service(uuid = BleConstants.BTM_SERVICE_UUID.toKotlinUuid()) {
Service(uuid = BleConstants.BTM_SERVICE_UUID) {
Characteristic(
uuid = BleConstants.BTM_TORADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_TORADIO_CHARACTER,
properties =
setOf(
CharacteristicProperty.WRITE,
@ -349,17 +345,17 @@ class NordicBleInterfaceTest {
permission = Permission.WRITE,
)
Characteristic(
uuid = BleConstants.BTM_FROMNUM_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMNUM_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_FROMRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.READ),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_LOGRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_LOGRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
@ -429,27 +425,27 @@ class NordicBleInterfaceTest {
isBonded = true,
eventHandler = eventHandler,
cachedServices = {
Service(uuid = BleConstants.BTM_SERVICE_UUID.toKotlinUuid()) {
Service(uuid = BleConstants.BTM_SERVICE_UUID) {
// OMIT toRadio characteristic to force failure
/*
Characteristic(
uuid = BleConstants.BTM_TORADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_TORADIO_CHARACTER,
properties = setOf(CharacteristicProperty.WRITE, CharacteristicProperty.WRITE_WITHOUT_RESPONSE),
permission = Permission.WRITE
)
*/
Characteristic(
uuid = BleConstants.BTM_FROMNUM_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMNUM_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_FROMRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.READ),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_LOGRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_LOGRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
@ -513,9 +509,9 @@ class NordicBleInterfaceTest {
isBonded = true,
eventHandler = eventHandler,
cachedServices = {
Service(uuid = BleConstants.BTM_SERVICE_UUID.toKotlinUuid()) {
Service(uuid = BleConstants.BTM_SERVICE_UUID) {
Characteristic(
uuid = BleConstants.BTM_TORADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_TORADIO_CHARACTER,
properties =
setOf(
CharacteristicProperty.WRITE,
@ -524,17 +520,17 @@ class NordicBleInterfaceTest {
permission = Permission.WRITE,
)
Characteristic(
uuid = BleConstants.BTM_FROMNUM_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMNUM_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_FROMRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_FROMRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.READ),
permission = Permission.READ,
)
Characteristic(
uuid = BleConstants.BTM_LOGRADIO_CHARACTER.toKotlinUuid(),
uuid = BleConstants.BTM_LOGRADIO_CHARACTER,
properties = setOf(CharacteristicProperty.NOTIFY),
permission = Permission.READ,
)