ArduinoBLE icon indicating copy to clipboard operation
ArduinoBLE copied to clipboard

WiFi Rev2 stops communicating after time

Open Joniras opened this issue 5 years ago • 0 comments

I am working on an Arduino Uno WiFi Rev2 with the Nina-FW 1.4.1 loaded.

I am experiencing the following pattern every time i start the arduino and start the code (the example Peripheral -> ButtonLED with debug enabled):

  1. I start the Arduino (with Serial Monitor enabled)
  2. The connection with the central is established
  3. After some time (without furhter interaction) i only see HCI COMMAND TX -> XXXX and no more HCI EVENT RX <- XXXX
  4. The connected() method still delivers true, disconnect() does return false
  5. The Central gets disconnected and can no longer initiate a connection (Arduino is not visible anymore)

I did some digging and found out that the HCITransport appearently delivers a message that can not be understood (else block in HCI.ccp:153). There it prints some cryptic bytes to the console (every time the same), i attached it in the txt File. After that message the bluetooth no longer works (until i reset the arduino).

before disconnect (rssi()):

  • HCI COMMAND TX -> 010514020000
  • HCI EVENT RX <- 040E07050514000000BE

[byteCode]

after that (advertising):

  • HCI COMMAND TX -> 010A200100
  • HCI COMMAND TX -> 0106200FA000A0000000000000000000000700
  • (and no return message)

Can anyone give an explanation on how to restore the bluetooth connection or catch the error somehow?

Edit: I managed to "restore Bluetooth Connectivity" by calling the reset-function. But i would prefer a cleaner solution.

debugPrint_hexBytes.txt

Joniras avatar Nov 25 '20 21:11 Joniras