Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling bleno.disconnect() disconnects device but blocks new connection for another 20secs #333

Open
mkatter opened this issue Aug 18, 2017 · 3 comments

Comments

@mkatter
Copy link

mkatter commented Aug 18, 2017

Hi,
I want to diconnect an inactive device, therefore I am calling bleno.disconnect().
The device gets disconnected - this is the expected behaviour but the device is not able to reconnect for another 20secs.

I am running bleno on a Nano Pi Neo Air, Ubuntu 16.04.2 LTS 4.11.2

hcidump -t -x outputs after bleno.disconnect():

2017-08-18 23:23:05.764200 < HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 64 reason 0x13
    Reason: Remote User Terminated Connection
2017-08-18 23:23:05.767576 > HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
2017-08-18 23:23:25.708081 > HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 64 reason 0x22
    Reason: LMP Response Timeout
2017-08-18 23:23:25.796586 < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
  01
2017-08-18 23:23:25.800573 > HCI Event: Command Complete (0x0e) plen 4
    LE Set Advertise Enable (0x08|0x000a) ncmd 1
    status 0x00

hcidump -t -x outputs this using nRF Connect:

2017-08-18 23:27:54.794896 > HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 64 reason 0x13
    Reason: Remote User Terminated Connection
2017-08-18 23:27:54.866602 < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
  01
2017-08-18 23:27:54.869356 > HCI Event: Command Complete (0x0e) plen 4
    LE Set Advertise Enable (0x08|0x000a) ncmd 1
    status 0x00

Thanks for your feedback!

@sandeepmistry
Copy link
Collaborator

@mkatter what Bluetooth adapter are you using? It seems to be the culprit, as it takes 20 seconds to perform the command:

2017-08-18 23:23:05.764200 < HCI Command: Disconnect (0x01|0x0006) plen 3
    handle 64 reason 0x13
    Reason: Remote User Terminated Connection
2017-08-18 23:23:05.767576 > HCI Event: Command Status (0x0f) plen 4
    Disconnect (0x01|0x0006) status 0x00 ncmd 1
2017-08-18 23:23:25.708081 > HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 64 reason 0x22
    Reason: LMP Response Timeout

@mkatter
Copy link
Author

mkatter commented Sep 21, 2017

@sandeepmistry I am using Nano Pi's built-in bluetooth! So, no external (USB) adapter.
I am wondering about the Reason: LMP Response Timeout

@rzr
Copy link

rzr commented Feb 20, 2021

Please confirm this issue with @abandonware version

Relate-to: abandonware#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants