bleak icon indicating copy to clipboard operation
bleak copied to clipboard

Disconnected Reason 19

Open neil-brik opened this issue 11 months ago • 5 comments

Hello,

I've got a Nordic nrf52dk running peripheral_uart and I'm using the uart_service.py example to try and connect to it. However this doesn't connect and the RTT Viewer gives the error below repeated:

00> [21:24:23.761,810] <inf> brikwiz_base: Connected D4:D8:53:4C:5D:23 (public) 00> [21:24:24.115,875] <inf> brikwiz_base: Disconnected: D4:D8:53:4C:5D:23 (public) (reason 19)

Interestingly this also happens when you try to connect with the windows bluetooth console. Is there a way to understand what is happening here as it'll be much easier if I can communicate to the device with a windows machine.

Thanks.

Cheers,

Neil

neil-brik avatar Jan 17 '25 12:01 neil-brik

The best way to see what is going on at a lower level is to log Bluetooth packets with Wireshark as described in the troubleshooting page of the docs.

dlech avatar Jan 17 '25 15:01 dlech

Hello,

Thanks, I'll give that a go on Monday morning.

Cheers,

Neil

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: David Lechner @.> Sent: Friday, January 17, 2025 3:56:21 PM To: hbldh/bleak @.> Cc: Neil Benn @.>; Author @.> Subject: Re: [hbldh/bleak] Disconnected Reason 19 (Issue #1712)

The best way to see what is going on at a lower level is to log Bluetooth packets with Wireshark as described in the troubleshooting page of the docs.

— Reply to this email directly, view it on GitHubhttps://github.com/hbldh/bleak/issues/1712#issuecomment-2598666316, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAYUI73RDE3SCUPXOK5LT5L2LER2LAVCNFSM6AAAAABVLY5TJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJYGY3DMMZRGY. You are receiving this because you authored the thread.Message ID: @.***>

neil-brik avatar Jan 17 '25 16:01 neil-brik

Hello,

That's done; looking at the packet exchange we seem to be receiving the following:

1027 15.146039 controller host HCI_EVT 7 Rcvd Command Complete (LE Set Extended Scan Enable) 1028 15.379031 controller host HCI_EVT 7 Rcvd Encryption Change 1029 15.379126 host controller HCI_CMD 7 Sent Disconnect

For some reason when we get encryption change this cause the windows computer to disconnect; I can't attach the full trace but it is available here. Do you have any ideas as to the reason it is disconnecting and can I avoid it?

Has anyone else managed to get this example working in windows?

Cheers,

Neil

neil-brik avatar Jan 20 '25 14:01 neil-brik

Sounds just like this discussion: https://github.com/hbldh/bleak/discussions/1708

dlech avatar Jan 20 '25 15:01 dlech

Hello,

Interestingly they have the error after the encryption log message exactly the same as on this case. I suspect that they are using the same hardware - however there is no solution on the referenced case.

As this is an included example for bleak it'd be good to get to the bottom of things so that in the future bleak users can execute the example code on windows.

I will present this to Nordic as so far they are just saying - not our problem, talk to Microsoft.

Cheers,

Neil

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: David Lechner @.> Sent: Monday, January 20, 2025 3:41:03 PM To: hbldh/bleak @.> Cc: Neil Benn @.>; Author @.> Subject: Re: [hbldh/bleak] Disconnected Reason 19 (Issue #1712)

Sounds just like this discussion: #1708https://github.com/hbldh/bleak/discussions/1708

— Reply to this email directly, view it on GitHubhttps://github.com/hbldh/bleak/issues/1712#issuecomment-2602737348, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAYUI7ZIJM4KLIRDQFENDB32LUKI7AVCNFSM6AAAAABVLY5TJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBSG4ZTOMZUHA. You are receiving this because you authored the thread.Message ID: @.***>

neil-brik avatar Jan 20 '25 16:01 neil-brik