UnityCoreBluetooth icon indicating copy to clipboard operation
UnityCoreBluetooth copied to clipboard

Handle lost connections gracefully... writeWithoutResponse crashes

Open gingerjinjo opened this issue 3 years ago • 1 comments

Firstly, thanks for the work on this library. I can connect a device and stream messages back and forth really nicely, but if the connection to a peripheral device is lost (out of range) then the write (WithoutResponse) crashes both the plugin and Native Example. It looks like CoreBluetooth knows the write will fail, but the plugin doesn't check/handle it.

Have you tested yourself with peripheral devices either being powered-off or going out-of-range?

gingerjinjo avatar Nov 18 '22 13:11 gingerjinjo

I'm also looking for a way to get info on peripheral disconnection. Is there any way to get this info somewhere?

lehtiniemi avatar Jun 29 '24 14:06 lehtiniemi