I have been attempting to establish a BLE connection between my Particle Monitor and another NRF52840 device. However, the following logs have occurred multiple times (sometimes after hours) before the connection could be successfully made:
[app] INFO: Into Scan Result
[app] INFO: MAC: 12:34:56:78:90:12 , deviceName: Test-1
[app] INFO: Connect State
[wiring.ble] TRACE: New peripheral is connected.
[wiring.ble] TRACE: Start discovering services.
[app] INFO: Client disconnected
[wiring.ble] TRACE: Disconnected
How can I enable debug mode on the edge device so I can access more detailed logs regarding the error? I attempted to edit ble_hal.cpp as follows, but it did not yield any success:
The HAL functions are part of Device OS, so enabling debugging is difficult, because by default it will not be flashed to the device when you build your firmware, and pre-built binaries (without your change) will be used by default.
The easiest way to force a modified version to be used is to follow the instructions to use a custom device OS build. Use Particle: Configure Project for Device and select deviceOS@source. Then Particle: flash application for debug (local) to flash your firmware and the modified version of Device OS.
Thanks. I'm on 5.7.0.... Let's me try the new 5.8.0 firmware.
When I use my phone to clone the nrf52840 device, my phone has the same characteristics, and the particle device connects fine. However, the issue only occurs when the nrf advertises itself, so I'm curious why that happens
I tried the flash application for debug(local) but the log isn't giving me much info regarding why it dropped ble connection when trying to discover characteristic.
I began with version 5.7.0 and have not experimented with any versions older than 5.7.0. However, I recently tried version 5.8.0 but same issue happen.
The Monitor One uses the Tracker SoM BLE chip antenna on the board and does not include a separate BLE antenna, but one could be added using the BLE U.FL connector.
Seem like it's working better with using external antenna but sometimes still running same issue. Any thoughts would be appreciated!