-
Notifications
You must be signed in to change notification settings - Fork 205
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
Comments
@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
... but if the roles are reversed, nothing ... |
I tried lowering the supervision timeout from 0xc8 to 0x14 on the central side, this did not have any impact. |
Hello, any update on this issue? Still exists |
Hello, just received my nano 33 ble devices. Stumbled on the same issue. As always lost a few hours! Any update? |
Ive gone back to a nano iot 33 & wifi
… On 13 Nov 2019, at 21:48, Harry ***@***.***> wrote:
Hello, just received my nano 33 ble devices. Stumbled on the same issue. As always lost a few hours! Any update?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#33?email_source=notifications&email_token=AAEYL36QR5CD27CZOUHOTWLQTRY3DA5CNFSM4I4WOLT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED7ZAEY#issuecomment-553619475>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAEYL37B4TKDYOBO4AOP3S3QTRY3DANCNFSM4I4WOLTQ>.
|
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. |
Hi @sandeepmistry,
When "normal" disconnect procedure occurs the output is:
While
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:
AND
where the second part is the same as "normal" disconnect output. |
This issue persists as of 05/20/2020, library version 1.1.2. Edit: I haven't tried creating a disconnect by moving the two out of range, only sudden loss of power. This event never fires on my Nano 33 Sense: From this thread, almost a month ago: Klaus_K appears to have done everything but fix the code:
Thanks, Jon! Edit: I will check tonight whether my peripheral can detect when my central loses power. |
I have the same issue with the nano 33 BLE not recognizing when the peripheral disconnects from a lost of power. Any updates? |
I solved my problem , i used CONNECT METHOD for connect multiple devices . |
use CONNECT METHOD instead of Broadcast method . |
Hi @JGronholz , Here's the setup I used: Would you mind trying again your sketch using the core and library version I mentioned? Central code: #include <ArduinoBLE.h>
void blePeripheralConnectHandler(BLEDevice dev) {
Serial.println("Connected event, peripheral: ");
Serial.println(dev.address());
}
void blePeripheralDisconnectHandler(BLEDevice dev) {
Serial.println("Disconnected event, peripheral: ");
Serial.println(dev.address());
BLE.scanForName("Test");
}
void setup() {
Serial.begin(115200);
delay(500);
if (!BLE.begin()) {
Serial.println("starting BLE failed!");
while (1);
}
Serial.println("Central on");
BLE.setEventHandler(BLEConnected, blePeripheralConnectHandler);
BLE.setEventHandler(BLEDisconnected, blePeripheralDisconnectHandler);
BLE.scanForName("Test");
}
void loop() {
delay(1000);
BLEDevice peripheral = BLE.available();
if (peripheral) {
BLE.stopScan();
Serial.println("found peripheral");
if (peripheral.connect()) {
} else {
BLE.scan();
}
}
} Peripheral code: #include <ArduinoBLE.h>
void setup() {
Serial.begin(115200);
delay(500);
if (!BLE.begin()) {
Serial.println("starting BLE failed!");
while (1);
}
BLE.debug(Serial);
BLE.setLocalName("Test");
BLE.setEventHandler(BLEConnected, blePeripheralConnectHandler);
BLE.setEventHandler(BLEDisconnected, blePeripheralDisconnectHandler);
BLE.advertise();
Serial.println("Bluetooth device active, waiting for connections...");
}
void blePeripheralConnectHandler(BLEDevice central) {
Serial.println("Connected event, central: ");
Serial.println(central.address());
}
void blePeripheralDisconnectHandler(BLEDevice central) {
Serial.println("Disconnected event, central: ");
Serial.println(central.address());
}
void loop() {
static long prvTime = 0;
BLE.poll();
if (millis() - prvTime >= 1000) {
prvTime = millis();
if (BLE.connected()) {
Serial.println("---");
int rssiValue = BLE.rssi();
Serial.println(rssiValue);
Serial.println("Connected to central");
}
else {
Serial.println("Not connected to central");
}
}
} |
MKR1010 BLE communication :
Issue: |
Hi @sprasadkrish , |
Hi
Thank you , i will do as per your suggestions.
…On Fri, 21 Aug 2020 1:12 pm Paolo Calao, ***@***.***> wrote:
Hi @sprasadkrish <https://github.com/sprasadkrish> ,
can you please open a new issue for this?
Also can you please provide information about your setup (library version
and boards used) and a test sketch?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOFHQSWSUZYKAP5WNN2YS2LSBYQPVANCNFSM4I4WOLTQ>
.
|
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
The text was updated successfully, but these errors were encountered: