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

BLE nano 33 does not report or disconnect from centra #33

Closed
Russell108 opened this issue Oct 2, 2019 · 7 comments · Fixed by #44
Closed

BLE nano 33 does not report or disconnect from centra #33

Russell108 opened this issue Oct 2, 2019 · 7 comments · Fixed by #44
Assignees
Labels
bug

Comments

@Russell108
Copy link

@Russell108 Russell108 commented Oct 2, 2019

When using for example the button peripheral and central examples in the arduinoBLE library
If for example the central is a MKR1010 powered by usb and the peripheral is a nanoBLE 33 then if I remove the power from the central the peripheral still reports it as connected.

If instead of a Nano BLE 33 I use a Nano IOT33 then when the central is de powered the peripheral reports it as being disconnected.

there are several issues regarding disconnection & this library when using the Nana BLe 33.

Arduino support said the following

================================================================

Hello Russell,

Thank you for reporting us this issue,

We request you to open an issue on Github here and our developers will provide you further guidance.

Have a nice day!

Best Regards,
Sravya Amirisetti

@sandeepmistry

This comment has been minimized.

Copy link
Contributor

@sandeepmistry sandeepmistry commented Oct 3, 2019

@Russell108 thanks for the issue report! I was able to reproduce here.

@facchinm it seems the Cordio stack is not generating the HCI disconnect event when power is cut to the central.

If I add BLE.debug(Serial); and using the MKR WiFi 1010 as the BLE peripheral + Nano 33 BLE as the central, on the peripheral side I get the following event:

HCI EVENT RX <- 04050400000008

... but if the roles are reversed, nothing ...

@sandeepmistry

This comment has been minimized.

Copy link
Contributor

@sandeepmistry sandeepmistry commented Oct 3, 2019

I tried lowering the supervision timeout from 0xc8 to 0x14 on the central side, this did not have any impact.

@ixj111

This comment has been minimized.

Copy link

@ixj111 ixj111 commented Oct 24, 2019

Hello, any update on this issue? Still exists

@harpop

This comment has been minimized.

Copy link

@harpop harpop commented Nov 13, 2019

Hello, just received my nano 33 ble devices. Stumbled on the same issue. As always lost a few hours! Any update?

@Russell108

This comment has been minimized.

Copy link
Author

@Russell108 Russell108 commented Nov 13, 2019

@sandeepmistry

This comment has been minimized.

Copy link
Contributor

@sandeepmistry sandeepmistry commented Nov 29, 2019

Hi @ixj111 @Russell108 @harpop @alexisicte,

Pull request #44 should fix this, if you have some time to try out the changes and provide your feedback that would be great.

@facchinm facchinm closed this in #44 Dec 2, 2019
@alexisicte

This comment has been minimized.

Copy link

@alexisicte alexisicte commented Dec 2, 2019

Hi @sandeepmistry,
Before your last changes when an "unnormal" disconnect issue occurs ble debugging returns nothing. After your changes we get on the serial monitor:

11:04:18.535 -> HCI EVENT RX <- 04050400000008
11:04:18.535 -> HCI COMMAND TX -> 010A200101
11:04:18.535 -> HCI EVENT RX <- 040E04010A2000

When "normal" disconnect procedure occurs the output is:

10:55:22.611 -> HCI EVENT RX <- 04050400000013
10:55:22.611 -> HCI COMMAND TX -> 010A200101
10:55:22.646 -> HCI EVENT RX <- 040E04010A2000

While BLE.adverise() is called the output is the following in an infinite loop:

10:54:18.858 -> HCI EVENT RX <- 040E040106200C
10:54:18.858 -> HCI COMMAND TX -> 0106200FA000A0000000000000000000000700
10:54:18.858 -> HCI EVENT RX <- 040E040106200C
10:54:18.858 -> HCI COMMAND TX -> 0106200FA000A0000000000000000000000700
10:54:18.891 -> HCI EVENT RX <- 040E040106200C
10:54:18.891 -> HCI COMMAND TX -> 0106200FA000A0000000000000000000000700
10:54:18.891 -> HCI EVENT RX <- 040E040106200C

but, after an "unnormal" disconnect issue occurs the above output is not displayed. Actually the serial monitor is idle. When i try to reconnect after an "unnormal" disconnect issue, i get:

11:05:29.198 -> HCI EVENT RX <- 043E13010000000101E397B78CE96128000000F40101
11:05:29.467 -> HCI ACLDATA RX <- 0200200B0007000400100100FFFF0028
11:05:29.834 -> HCI EVENT RX <- 043E0A0300000006000000F401
11:05:34.444 -> HCI ACLDATA RX <- 0200200B0007000400100100FFFF0028
11:05:39.459 -> HCI ACLDATA RX <- 0200200B0007000400100100FFFF0028

AND

11:05:44.468 -> HCI EVENT RX <- 04050400000013
11:05:44.468 -> HCI COMMAND TX -> 010A200101
11:05:44.468 -> HCI EVENT RX <- 040E04010A2000

where the second part is the same as "normal" disconnect output.
Then the serial monitor is idle as before.
According to BLE.debug it seems that the device is not advertising because i dont get the advertise debug output, but central devices can see the peripheral.

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

Successfully merging a pull request may close this issue.

6 participants
You can’t perform that action at this time.