BleAddress Issues (and general, reproducible, Bluetooth connectivity issues)

I’ve started experimenting with 1.3.0-rc1 and have run into a few important issues around bluetooth that I was wondering if people know how to address:

  1. BleAddresses are backwards. When I scan devices with nRF Connect and get addresses like 00:11:22:33:44:44, but when I scan with my Argon, I get 55:44:33:22:11:00.

  2. I can’t find an easy way to construct BleAddresses. There is a specific address I want to connect to; I might as well specify it as a constant in my file. What’s the right way to do this?

  3. Connectivity has been an issue. When my device and the device I want to connect to first boot up, I get a peer connection without a problem. If I call BLE.disconnect, I can then reconnect them. This is great.

However, if I reboot the Argon without calling disconnect first, they will no longer reconnect, unless I reboot the target device as well. I don’t have this issue when I connect to it from my phone or computer. The problem seems specific to the Argon. For example:

  1. Turn device and Argon on.
  2. Connect them - success.
  3. Unplug Argon.
  4. Turn Argon back on, try to connect - failure.
  5. [repeat as desired - failure]
  6. Connect phone to device - success
  7. Disconnect phone.
  8. [repeat as desired - success]
  9. Turn Argon on, try to connect - failure.
  10. Reboot target device.
  11. Turn Argon on, try to connect - success.
1 Like

I think the best guys for the BLE issues at this point are @rickkas7 & @bsatrom

I’ve turned on trace logging and see the following on the serial output (including some of my own logging):

0000042493 [app] INFO: scanned
0000042495 [app] I0000042495 [app] INFO: trying to connect to
0000042497 [app] INFO: 65:44:2C:1E:E1:F4
0000042643 [wiring.ble] TRACE: New peripheral connected.
0000042645 [wiring.ble] TRACE: Start discovering services.
0000042825 [wiring.ble] TRACE: Start discovering characteristics.
0000044264 [wiring.ble] TRACE: Start discovering characteristics.
0000044940 [wiring.ble] TRACE: Start discovering characteristics.
0000045209 [wiring.ble] TRACE: Start discovering characteristics.
0000045540 [app] INFO: successfully connect!
0000045542 [hal.ble] ERROR: characteristic failed: -170
0000045544 [hal.ble] ERROR: characteristic failed: -170

At that point, nothing works from the Argon until I reboot the peripheral.

Hey @mankyd, thanks for posting this issue. I pinged the firmware team for assistance here and will update you once I hear back.

1 Like

Hi @mankyd,

I'm glad to get back to you.

The device address is stored in little endian, so we should print the device address from address[5] - address[0]. We will update the BLE examples to make it print correctly.

With regards of 1.3.0-rc.1, there is no wiring API to set device address, so constructnig a BleAddress is not considered as necessary. Thank you for suggestion and we will implement some of convenient methods to construct a BleAddress object and expose an API to set BLE device address.

I'm not quite follow this issue. Since I don't know what is so-called failure. Could you give more symptoms? According to the log you posted, that is a fake error once connected, we will hanlde it appropriately.

Best regards,
Guohui

2 Likes