https://kotlinlang.org logo
#juul-libraries
Title
# juul-libraries
c

Cristian MG

10/06/2023, 12:41 PM
Hii, Any news about this topic? I created my own fork with the changes, because I need to deploy in production @travis
t

travis

10/06/2023, 5:14 PM
Can you link your fork? That would be very helpful, as I don't have a peripheral to test that feature against.
c

Cristian MG

10/09/2023, 5:25 AM
t

travis

10/09/2023, 6:07 PM
Thank you! Looked over your
feature/bonding_V2
branch, unfortunately it has become a bit outdated relative to the upstream
twyatt/bonding
branch. From what I could tell, the biggest thing I had missed was emitting the initial bond state from the
bondState
flow? (I’ve updated
twyatt/bonding
with this fix)
Would it be possible to either update your branch with the latest changes from
JuulLabs/twyatt/bonding
or outline changes you ended up making?
c

Cristian MG

10/11/2023, 2:11 PM
I think the main changes were 1) Emit the initial state of bonding as you said 2) The receiver must be exported because that receiver is not working if it is not exported = true 3) I added this override suspend fun awaitBond() { logger.warn { message = "Insufficient authentication, awaiting bond" } bondState.first { it == Bonded } } Because in some devices bonding is required since the first connection to device and with this function you can wait to the bonding.