ArduinoBLE - trying to connect to XBox One controller and other BLE devices

Sorry if this has been asked before, but I am experimenting with the arduinoBLE library, to see how well it works to talk to devices that use BLE to communicate.

For example, the current XBox One controller firmware now uses BLE. Likewise, I have a Microsoft Mouse that uses BLE.

Background, I do most of my work (playing) using Teensy boards by PJRC, and have done a lot of work on the library USBHost_t36 which includes a Bluetooth object, which has support for several Bluetooth devices, including many keyboards, mice, game controllers, usb to serial devices... But currently it does not support BLE.

So I am investigating potential ways to add BLE support and found this library. For the fun of it, I forked it and created a new branch: KurtE/ArduinoBLE at Teensy_USBHost (github.com)
Which now runs most if not all of the examples.

However, If I try to modify the PeripheralExplorer sketch to find out details about
the XBox or the Microsoft Mouse it fails to retrieve the attributes.

Here is looking at the Surface Arc Mouse with debug turned off:

Bluetooth® Low Energy Central - Peripheral Explorer
Found 53:08:1a:39:04:73 '' 
Found 36:e4:ac:0c:51:a1 '' 
Found 6e:0f:d1:0f:00:d6 '' 
Found 52:33:7d:22:31:d9 '' 
Found 03:62:65:50:ad:d5 '' fd6f
Found 51:05:16:28:5e:ac '' 
Found c5:8a:6c:4f:c0:9c '' 
Found e1:59:47:79:f2:be 'Surface Arc Mouse' 1812
Connecting ...
Connected
Discovering attributes ...
Attribute discovery failed!

Here is a version looking for the XBox one with your debug turned on as well as my debug code in the Teensy transport layer

HCITeensyTransportClass::begin() called
HCITeensyTransportClass::claim(0x20004e00, 0, 0x20003ee9, 209) called
	class:ff this=20003080 vid:pid=a5c:21e8
HCITeensyTransportClass claim this=20003080 vid:pid=a5c:21e8
    09 04 00 00 03 ff 01 01 00 07 05 81 03 10 00 01 07 05 82 02 40 00 01 07 05 02 02 40 00 01 09 04 01 00 02 ff 01 01 00 07 05 83 01 00 00 01 07 05 03 01 00 00 01 09 04 01 01 02 ff 01 01 00 07 05 
    83 01 09 00 01 07 05 03 01 09 00 01 09 04 01 02 02 ff 01 01 00 07 05 83 01 11 00 01 07 05 03 01 11 00 01 09 04 01 03 02 ff 01 01 00 07 05 83 01 19 00 01 07 05 03 01 19 00 01 09 04 01 04 02 ff 
    01 01 00 07 05 83 01 21 00 01 07 05 03 01 21 00 01 09 04 01 05 02 ff 01 01 00 07 05 83 01 31 00 01 07 05 03 01 31 00 01 09 04 02 00 02 ff ff ff 00 07 05 84 02 20 00 01 07 05 04 02 20 00 01 09 
    04 03 00 00 fe 01 01 00 09 21 05 88 13 40 00 10 01 
      rxep=1(16) txep=2(64) rx2ep=2(64)
HCI COMMAND TX -> 01030C00
>>(CMD, 763):03 0C 00 
    Control callback (bluetooth): 0 : 03 0c 00 
<<(EVT, 4, H:0 T:0)0E 04 01 03 0C 00 
HCI EVENT RX <- 040E0401030C00
HCI COMMAND TX -> 01011000
>>(CMD, 0):01 10 00 
    Control callback (bluetooth): 0 : 01 10 00 
<<(EVT, 2, H:7 T:7)0E 0C 01 01 10 00 06 00 10 06 0F 00 0E 22 
HCI EVENT RX <- 040E0C01011000060010060F000E22
HCI COMMAND TX -> 01010C08FFFFFFFFFFFFFF3F
>>(CMD, 0):01 0C 08 FF FF FF FF FF FF FF 3F 
    Control callback (bluetooth): 0 : 01 0c 08 ff ff ff ff ff ff ff 3f 
<<(EVT, 2, H:22 T:22)0E 04 01 01 0C 00 
HCI EVENT RX <- 040E0401010C00
HCI COMMAND TX -> 01012008FF03000000000000
>>(CMD, 0):01 20 08 FF 03 00 00 00 00 00 00 
    Control callback (bluetooth): 0 : 01 20 08 ff 03 00 00 00 00 00 00 
<<(EVT, 2, H:29 T:29)0E 04 01 01 20 00 
HCI EVENT RX <- 040E0401012000
HCI COMMAND TX -> 01022000
>>(CMD, 0):02 20 00 
    Control callback (bluetooth): 0 : 02 20 00 
<<(EVT, 2, H:36 T:36)0E 07 01 02 20 00 1B 00 0F 
HCI EVENT RX <- 040E07010220001B000F
Bluetooth® Low Energy Central - Peripheral Explorer
HCI COMMAND TX -> 010C20020001
>>(CMD, 0):0C 20 02 00 01 
    Control callback (bluetooth): 0 : 0c 20 02 00 01 
<<(EVT, 2, H:46 T:46)0E 04 01 0C 20 0C 
HCI EVENT RX <- 040E04010C200C
HCI COMMAND TX -> 010B200701200020000000
>>(CMD, 0):0B 20 07 01 20 00 20 00 00 00 
    Control callback (bluetooth): 0 : 0b 20 07 01 20 00 20 00 00 00 
<<(EVT, 2, H:53 T:53)0E 04 01 0B 20 00 
HCI EVENT RX <- 040E04010B2000
HCI COMMAND TX -> 010C20020101
>>(CMD, 0):0C 20 02 01 01 
    Control callback (bluetooth): 0 : 0c 20 02 01 01 
<<(EVT, 2, H:60 T:60)0E 04 01 0C 20 00 
HCI EVENT RX <- 040E04010C2000
<<(EVT, 10, H:67 T:67)3E 1D 02 01 00 01 AC 5E 28 16 05 51 11 02 01 1A 
<<(EVT, 2, H:84 T:84)02 0A 03 0A FF 4C 00 10 05 01 18 7B 67 1D AA 
HCI EVENT RX <- 043E1D02010001AC5E281605511102011A020A030AFF4C00100501187B671DAA
<<(EVT, 2, H:99 T:99)3E 0C 02 01 04 01 AC 5E 28 16 05 51 00 AC 
HCI EVENT RX <- 043E0C02010401AC5E2816055100AC
Found 51:05:16:28:5e:ac '' 
<<(EVT, 18, H:114 T:114)3E 1F 02 01 00 00 16 AC B3 26 3F C8 13 02 01 06 
<<(EVT, 2, H:131 T:131)02 0A 14 03 19 C4 03 04 FF 06 00 00 03 03 12 18 
<<(EVT, 2, H:147 T:147)BC 
HCI EVENT RX <- 043E1F0201000016ACB3263FC813020106020A140319C40304FF06000003031218BC
<<(EVT, 2, H:148 T:148)3E 26 02 01 04 00 16 AC B3 26 3F C8 1A 19 09 58 
<<(EVT, 2, H:165 T:165)62 6F 78 20 57 69 72 65 6C 65 73 73 20 43 6F 6E 
<<(EVT, 2, H:181 T:181)74 72 6F 6C 6C 65 72 C5 
HCI EVENT RX <- 043E260201040016ACB3263FC81A190958626F7820576972656C65737320436F6E74726F6C6C6572C5
Found c8:3f:26:b3:ac:16 'Xbox Wireless Controller' 1812
HCI COMMAND TX -> 010C20020000
>>(CMD, 0):0C 20 02 00 00 
    Control callback (bluetooth): 0 : 0c 20 02 00 00 
<<(EVT, 4, H:189 T:189)0E 04 01 0C 20 00 
HCI EVENT RX <- 040E04010C2000
Connecting ...
HCI COMMAND TX -> 010D201960003000000016ACB3263FC80006000C000000C80004000600
>>(CMD, 0):0D 20 19 60 00 30 00 00 00 16 AC B3 26 3F C8 00 06 00 0C 00 00 00 C8 00 04 00 06 00 
    Control callback (bluetooth): 0 : 0d 20 19 60 00 30 00 00 00 16 ac b3 26 3f c8 00 06 00 0c 00 00 00 c8 00 04 00 06 00 
<<(EVT, 2, H:196 T:196)0F 04 00 01 0D 20 
HCI EVENT RX <- 040F0400010D20
<<(EVT, 22, H:203 T:203)3E 13 01 00 40 00 00 00 16 AC B3 26 3F C8 0C 00 
<<(EVT, 2, H:220 T:220)00 00 C8 00 05 
HCI EVENT RX <- 043E1301004000000016ACB3263FC80C000000C80005
Connected
Discovering attributes ...
HCI ACLDATA TX -> 024000070003000400021200
>>(ACLDATA, 0):40 00 07 00 03 00 04 00 02 12 00 
tx_data callback (bluetooth):40 00 07 00 03 00 04 00 02 12 00 
<<(ACLDATA, 880):40 20 07 00 03 00 04 00 03 12 00 
HCI ACLDATA RX <- 024020070003000400031200
HCI ACLDATA TX -> 0240000B0007000400100100FFFF0028
>>(ACLDATA, 27):40 00 0B 00 07 00 04 00 10 01 00 FF FF 00 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 10 01 00 FF FF 00 28 
<<(EVT, 16, H:237 T:237)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
<<(ACLDATA, 30):40 20 12 00 0E 00 04 00 11 06 01 00 07 00 00 18 08 00 08 00 01 18 
HCI ACLDATA RX <- 02402012000E0004001106010007000018080008000118
HCI ACLDATA TX -> 0240000B0007000400100900FFFF0028
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 10 09 00 FF FF 00 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 10 09 00 FF FF 00 28 
<<(ACLDATA, 30):40 20 12 00 0E 00 04 00 11 06 09 00 11 00 0A 18 12 00 15 00 0F 18 
HCI ACLDATA RX <- 02402012000E0004001106090011000A18120015000F18
HCI ACLDATA TX -> 0240000B0007000400101600FFFF0028
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 10 16 00 FF FF 00 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 10 16 00 FF FF 00 28 
<<(EVT, 16, H:35 T:35)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
<<(ACLDATA, 30):40 20 0C 00 08 00 04 00 11 06 16 00 23 00 12 18 
HCI ACLDATA RX <- 0240200C00080004001106160023001218
HCI ACLDATA TX -> 0240000B0007000400102400FFFF0028
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 10 24 00 FF FF 00 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 10 24 00 FF FF 00 28 
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 10 24 00 80 
HCI ACLDATA RX <- 0240200900050004000110240080
HCI ACLDATA TX -> 0240000B000700040008010007000328
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 01 00 07 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 01 00 07 00 03 28 
<<(EVT, 16, H:74 T:74)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
<<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 02 00 02 03 00 00 2A 04 00 02 05 00 01 2A 
HCI ACLDATA RX <- 02402014001000040009070200020300002A0400020500012A
HCI ACLDATA TX -> 0240000B000700040008060007000328
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 06 00 07 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 06 00 07 00 03 28 
<<(ACLDATA, 30):40 20 0D 00 09 00 04 00 09 07 06 00 02 07 00 04 2A 
HCI ACLDATA RX <- 0240200D000900040009070600020700042A
HCI ACLDATA TX -> 0240000B000700040008080007000328
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 08 00 07 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 08 00 07 00 03 28 
<<(EVT, 16, H:125 T:125)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 08 00 01 
HCI ACLDATA RX <- 0240200900050004000108080001
HCI ACLDATA TX -> 0240000B000700040008080008000328
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 08 00 08 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 08 00 08 00 03 28 
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 08 00 0A 
HCI ACLDATA RX <- 024020090005000400010808000A
HCI ACLDATA TX -> 0240000B000700040008090011000328
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 09 00 11 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 09 00 11 00 03 28 
<<(EVT, 16, H:161 T:161)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
<<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 0A 00 02 0B 00 29 2A 0C 00 02 0D 00 50 2A 
HCI ACLDATA RX <- 02402014001000040009070A00020B00292A0C00020D00502A
HCI ACLDATA TX -> 0240000B0007000400080E0011000328
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 0E 00 11 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 0E 00 11 00 03 28 
<<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 0E 00 02 0F 00 26 2A 10 00 02 11 00 25 2A 
HCI ACLDATA RX <- 02402014001000040009070E00020F00262A1000021100252A
HCI ACLDATA TX -> 0240000B000700040008120011000328
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 12 00 11 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 12 00 11 00 03 28 
<<(EVT, 16, H:219 T:219)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 12 00 01 
HCI ACLDATA RX <- 0240200900050004000108120001
HCI ACLDATA TX -> 0240000B000700040008120015000328
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 12 00 15 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 12 00 15 00 03 28 
<<(ACLDATA, 30):40 20 0D 00 09 00 04 00 09 07 13 00 12 14 00 19 2A 
HCI ACLDATA RX <- 0240200D000900040009071300121400192A
HCI ACLDATA TX -> 0240000B000700040008150015000328
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 15 00 15 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 15 00 15 00 03 28 
<<(EVT, 16, H:3 T:3)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 15 00 0A 
HCI ACLDATA RX <- 024020090005000400010815000A
HCI ACLDATA TX -> 0240000B000700040008160023000328
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 16 00 23 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 16 00 23 00 03 28 
<<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 17 00 02 18 00 4A 2A 19 00 04 1A 00 4C 2A 
HCI ACLDATA RX <- 024020140010000400090717000218004A2A1900041A004C2A
HCI ACLDATA TX -> 0240000B0007000400081B0023000328
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 1B 00 23 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 1B 00 23 00 03 28 
<<(EVT, 16, H:50 T:50)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
<<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 1B 00 02 1C 00 4B 2A 1D 00 12 1E 00 4D 2A 
HCI ACLDATA RX <- 02402014001000040009071B00021C004B2A1D00121E004D2A
HCI ACLDATA TX -> 0240000B0007000400081F0023000328
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 1F 00 23 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 1F 00 23 00 03 28 
<<(ACLDATA, 30):40 20 0D 00 09 00 04 00 09 07 21 00 0E 22 00 4D 2A 
HCI ACLDATA RX <- 0240200D0009000400090721000E22004D2A
HCI ACLDATA TX -> 0240000B000700040008230023000328
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 23 00 23 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 23 00 23 00 03 28 
<<(EVT, 16, H:101 T:101)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 23 00 0A 
HCI ACLDATA RX <- 024020090005000400010823000A
HCI ACLDATA TX -> 0240000900050004000404000500
>>(ACLDATA, 14):40 00 09 00 05 00 04 00 04 04 00 05 00 
tx_data callback (bluetooth):40 00 09 00 05 00 04 00 04 04 00 05 00 
<<(ACLDATA, 30):40 20 0A 00 06 00 04 00 05 01 04 00 03 28 
HCI ACLDATA RX <- 0240200A0006000400050104000328
HCI ACLDATA TX -> 0240000900050004000405000500
>>(ACLDATA, 30):40 00 09 00 05 00 04 00 04 05 00 05 00 
tx_data callback (bluetooth):40 00 09 00 05 00 04 00 04 05 00 05 00 
<<(EVT, 16, H:138 T:138)13 05 01 40 00 02 00 
HCI EVENT RX <- 0413050140000200
Attribute discovery failed!
HCI COMMAND TX -> 01060403400013
>>(CMD, 4984):06 04 03 40 00 13 
    Control callback (bluetooth): 0 : 06 04 03 40 00 13 
<<(EVT, 2, H:146 T:146)0F 04 00 01 06 04 
HCI EVENT RX <- 040F0400010604
<<(EVT, 1899, H:153 T:153)05 04 00 40 00 22 
HCI EVENT RX <- 04050400400022
HCI COMMAND TX -> 010A200101
>>(CMD, 0):0A 20 01 01 
    Control callback (bluetooth): 0 : 0a 20 01 01 
<<(EVT, 2, H:160 T:160)0E 04 01 0A 20 00 
HCI EVENT RX <- 040E04010A2000

Note: I tried using an app on my WIndows 11 computer and it is showing some information on the XBox One.

Still investigating!

Anyone else had some luck?

Quick update: With the Mouse I am now having a little more luck.
If I put the mouse into pairing mode, and then restart the sketch it is getting some information
:smiley:

Bluetooth® Low Energy Central - Peripheral Explorer
Found e1:59:47:7a:f2:be 'Surface Arc Mouse' 1812
Connecting ...
Connected
Discovering attributes ...
Attributes discovered

Device name: Surface Arc Mouse
Appearance: 0x0

Service 1800
	Characteristic 2a00, properties 0xA, value 0x5375726661636520417263204D6F757365
		Descriptor 2803, value 0x020500012A
		Descriptor 2a01, value 0xC203
	Characteristic 2a01, properties 0x2, value 0xC203
		Descriptor 2803, value 0x020700042A
		Descriptor 2a04, value 0x060006003C002C01
	Characteristic 2a04, properties 0x2, value 0x060006003C002C01
Service 1801
Service 180a
	Characteristic 2a29, properties 0x2
		Descriptor 2803, value 0x020D00502A
		Descriptor 2a50, value 0x
	Characteristic 2a50, properties 0x2
Service 180f
	Characteristic 2a19, properties 0x12
		Descriptor 2902, value 0x0000
Service 1812
	Characteristic 2a4e, properties 0x6
		Descriptor 2803, value 0x1A16004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x1A1A004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x1A1E004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x1A22004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x1A26004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x1A2A004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x1A2E004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x1A32004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x1A36004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x1A3A004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x0E3E004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0xE
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x0E41004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0xE
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x0A44004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0xA
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x0A47004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0xA
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x0A4A004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0xA
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x0A4D004D2A
		Descriptor 2a4d, value 0x
	Characteristic 2a4d, properties 0xA
		Descriptor 2908, value 0x
		Descriptor 2803, value 0x0250004B2A
		Descriptor 2a4b, value 0x
	Characteristic 2a4b, properties 0x2
		Descriptor 2803, value 0x1A5200332A
		Descriptor 2a33, value 0x
	Characteristic 2a33, properties 0x1A
		Descriptor 2902, value 0x0000
		Descriptor 2803, value 0x0255004A2A
		Descriptor 2a4a, value 0x
	Characteristic 2a4a, properties 0x2
		Descriptor 2803, value 0x
		Descriptor 2a4c, value 0x
	Characteristic 2a4c, properties 0x4

Disconnecting ...
Disconnected

Still no luck with the XBox one, but will keep experimenting.

Probably next up is to see how to do the pairing of the device using the library.

Forgot to mention I was seeing the same results using an Arduino Nano 33 IOT (also BLE)

Wondering to self (and others),

If this is the best place to discuss some of this, and/or Issues or mainly on the PJRC forum thread:
USBHost Bluetooth -> BLE -> ArduinoBLE? (pjrc.com)

With The XBox one controller, the PC BlueTooth LE Explorer was able to show there are 5 services
and the like, and it enumerated the services and the like:

And for example, for the first 4 Services it was able to show data:
Service Name: GenericAccess
Service Name: GenericAttribute
Service Name: DeviceInformation
Service Name: Battery

Only when it got to the 5th Service, it was not able to give you all of the information:

On those the value looks like an error: ...

And then looking at my traces after it connects, until it shows that it failed, it looks like lots of messages were transferred back and forth between the two:

Connected
Discovering attributes ...
Data tx ->  0x2 0x40 0x0 0x7 0x0 0x3 0x0 0x4 0x0 0x2 0x12 0x0.
>>(ACLDATA, 0):40 00 07 00 03 00 04 00 02 12 00 
tx_data callback (bluetooth):40 00 07 00 03 00 04 00 02 12 00 
<<(ACLDATA, 10033):40 20 07 00 03 00 04 00 03 12 00 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x10 0x1 0x0 0xFF 0xFF 0x0 0x28.
>>(ACLDATA, 26):40 00 0B 00 07 00 04 00 10 01 00 FF FF 00 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 10 01 00 FF FF 00 28 
<<(EVT, 16, H:77 T:77)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
<<(ACLDATA, 31):40 20 12 00 0E 00 04 00 11 06 01 00 07 00 00 18 08 00 08 00 01 18 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x10 0x9 0x0 0xFF 0xFF 0x0 0x28.
>>(ACLDATA, 15):40 00 0B 00 07 00 04 00 10 09 00 FF FF 00 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 10 09 00 FF FF 00 28 
<<(ACLDATA, 29):40 20 12 00 0E 00 04 00 11 06 09 00 11 00 0A 18 12 00 15 00 0F 18 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x10 0x16 0x0 0xFF 0xFF 0x0 0x28.
>>(ACLDATA, 29):40 00 0B 00 07 00 04 00 10 16 00 FF FF 00 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 10 16 00 FF FF 00 28 
<<(EVT, 16, H:131 T:131)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
<<(ACLDATA, 30):40 20 0C 00 08 00 04 00 11 06 16 00 23 00 12 18 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x10 0x24 0x0 0xFF 0xFF 0x0 0x28.
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 10 24 00 FF FF 00 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 10 24 00 FF FF 00 28 
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 10 24 00 80 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x1 0x0 0x7 0x0 0x3 0x28.
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 01 00 07 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 01 00 07 00 03 28 
<<(EVT, 16, H:170 T:170)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
<<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 02 00 02 03 00 00 2A 04 00 02 05 00 01 2A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x6 0x0 0x7 0x0 0x3 0x28.
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 06 00 07 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 06 00 07 00 03 28 
<<(ACLDATA, 30):40 20 0D 00 09 00 04 00 09 07 06 00 02 07 00 04 2A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x8 0x0 0x7 0x0 0x3 0x28.
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 08 00 07 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 08 00 07 00 03 28 
<<(EVT, 16, H:221 T:221)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 08 00 01 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x8 0x0 0x8 0x0 0x3 0x28.
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 08 00 08 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 08 00 08 00 03 28 
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 08 00 0A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x9 0x0 0x11 0x0 0x3 0x28.
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 09 00 11 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 09 00 11 00 03 28 
<<(EVT, 16, H:1 T:1)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
<<(ACLDATA, 45):40 20 14 00 10 00 04 00 09 07 0A 00 02 0B 00 29 2A 0C 00 02 0D 00 50 2A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0xE 0x0 0x11 0x0 0x3 0x28.
>>(ACLDATA, 29):40 00 0B 00 07 00 04 00 08 0E 00 11 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 0E 00 11 00 03 28 
<<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 0E 00 02 0F 00 26 2A 10 00 02 11 00 25 2A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x12 0x0 0x11 0x0 0x3 0x28.
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 12 00 11 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 12 00 11 00 03 28 
<<(EVT, 16, H:59 T:59)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 12 00 01 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x12 0x0 0x15 0x0 0x3 0x28.
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 12 00 15 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 12 00 15 00 03 28 
<<(ACLDATA, 30):40 20 0D 00 09 00 04 00 09 07 13 00 12 14 00 19 2A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x15 0x0 0x15 0x0 0x3 0x28.
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 15 00 15 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 15 00 15 00 03 28 
<<(EVT, 16, H:99 T:99)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
<<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 15 00 0A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x16 0x0 0x23 0x0 0x3 0x28.
>>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 16 00 23 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 16 00 23 00 03 28 
<<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 17 00 02 18 00 4A 2A 19 00 04 1A 00 4C 2A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x1B 0x0 0x23 0x0 0x3 0x28.
>>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 1B 00 23 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 1B 00 23 00 03 28 
<<(EVT, 16, H:146 T:146)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
<<(ACLDATA, 31):40 20 14 00 10 00 04 00 09 07 1B 00 02 1C 00 4B 2A 1D 00 12 1E 00 4D 2A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x1F 0x0 0x23 0x0 0x3 0x28.
>>(ACLDATA, 15):40 00 0B 00 07 00 04 00 08 1F 00 23 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 1F 00 23 00 03 28 
<<(ACLDATA, 29):40 20 0D 00 09 00 04 00 09 07 21 00 0E 22 00 4D 2A 
Data tx ->  0x2 0x40 0x0 0xB 0x0 0x7 0x0 0x4 0x0 0x8 0x23 0x0 0x23 0x0 0x3 0x28.
>>(ACLDATA, 29):40 00 0B 00 07 00 04 00 08 23 00 23 00 03 28 
tx_data callback (bluetooth):40 00 0B 00 07 00 04 00 08 23 00 23 00 03 28 
<<(EVT, 16, H:197 T:197)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
<<(ACLDATA, 45):40 20 09 00 05 00 04 00 01 08 23 00 0A 
Data tx ->  0x2 0x40 0x0 0x9 0x0 0x5 0x0 0x4 0x0 0x4 0x4 0x0 0x5 0x0.
>>(ACLDATA, 29):40 00 09 00 05 00 04 00 04 04 00 05 00 
tx_data callback (bluetooth):40 00 09 00 05 00 04 00 04 04 00 05 00 
<<(ACLDATA, 30):40 20 0A 00 06 00 04 00 05 01 04 00 03 28 
Data tx ->  0x2 0x40 0x0 0x9 0x0 0x5 0x0 0x4 0x0 0x4 0x5 0x0 0x5 0x0.
>>(ACLDATA, 30):40 00 09 00 05 00 04 00 04 05 00 05 00 
tx_data callback (bluetooth):40 00 09 00 05 00 04 00 04 05 00 05 00 
<<(EVT, 16, H:234 T:234)13 05 01 40 00 02 00 
HCI event: 13
Outstanding packets: 0
Data[0]: 0x64
Data[1]: 0x2
Attribute discovery failed!
Command tx ->  0x1 0x6 0x4 0x3 0x40 0x0 0x13

Next up, decoding the received messages and see if the current code is doing some form of all or nothing. That is if the code has properly identified all of the same data up to this, point but then fails to fully decode that last service, will it return the valid data that it has retrieved or will it error out the whole thing.

Edit: Not that it is related, but I pushed up some changes to my fork/branch to the PeriperalExplorer sketch, where when I see 16bit UUIDs, I try to print out the logical names
From the Bluetooth Assigned numbers list.

So my trace of the Mouse (debug turned off)

Device name: Surface Arc Mouse
Appearance: 0x0

Service 1800	//Generic Access service
	Characteristic 2a00, properties 0xA, value 0x5375726661636520417263204D6F757365	//Device Name
		Descriptor 2803, value 0x020500012A	//Characteristic
		Descriptor 2a01, value 0xC203	//Appearance
	Characteristic 2a01, properties 0x2, value 0xC203	//Appearance
		Descriptor 2803, value 0x020700042A	//Characteristic
		Descriptor 2a04, value 0x060006003C002C01	//Peripheral Preferred Connection Parameters
	Characteristic 2a04, properties 0x2, value 0x060006003C002C01	//Peripheral Preferred Connection Parameters
Service 1801	//Generic Attribute service
Service 180a	//Device Information service
	Characteristic 2a29, properties 0x2	//Manufacturer Name String
		Descriptor 2803, value 0x020D00502A	//Characteristic
		Descriptor 2a50, value 0x	//PnP ID
	Characteristic 2a50, properties 0x2	//PnP ID
Service 180f	//Battery service
	Characteristic 2a19, properties 0x12	//Battery Level
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
Service 1812	//Human Interface Device service
	Characteristic 2a4e, properties 0x6	//Protocol Mode
		Descriptor 2803, value 0x1A16004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x1A1A004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x1A1E004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x1A22004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x1A26004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x1A2A004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x1A2E004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x1A32004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x1A36004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x1A3A004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0x1A	//Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x0E3E004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0xE	//Report
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x0E41004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0xE	//Report
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x0A44004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0xA	//Report
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x0A47004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0xA	//Report
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x0A4A004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0xA	//Report
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x0A4D004D2A	//Characteristic
		Descriptor 2a4d, value 0x	//Report
	Characteristic 2a4d, properties 0xA	//Report
		Descriptor 2908, value 0x	//Report Reference
		Descriptor 2803, value 0x0250004B2A	//Characteristic
		Descriptor 2a4b, value 0x	//Report Map
	Characteristic 2a4b, properties 0x2	//Report Map
		Descriptor 2803, value 0x1A5200332A	//Characteristic
		Descriptor 2a33, value 0x	//Boot Mouse Input Report
	Characteristic 2a33, properties 0x1A	//Boot Mouse Input Report
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2803, value 0x0255004A2A	//Characteristic
		Descriptor 2a4a, value 0x	//HID Information
	Characteristic 2a4a, properties 0x2	//HID Information
		Descriptor 2803, value 0x0457004C2A	//Characteristic
		Descriptor 2a4c, value 0x	//HID Control Point
	Characteristic 2a4c, properties 0x4	//HID Control Point

Disconnecting ...
Disconnected

Quick update:

Yesterday was finally able to get the Teensy 4.1 (or others) to properly enumerate all of the services and attributes of the XBox One controller that was updated to the newer firmware that uses BLE...

Current output from my version of the Peripheral Explorer example:

HCIClass::readLeBufferSize called
Bluetooth® Low Energy Central - Peripheral Explorer
Found c8:3f:26:b3:ac:16 'Xbox Wireless Controller' 
Connecting ...
Connected
Discovering attributes ...
Attributes discovered

Device name: Xbox Wireless Controll
Appearance: 0x0

Service 1800	//Generic Access service
	Characteristic 2a00, properties 0x2, value 0x58626F7820576972656C65737320436F6E74726F6C6C	//Device Name
		Descriptor 2803, value 0x020300002A	//Characteristic
		Descriptor 00002a00-0000-0000-0000-000000000000, value 0x58626F7820576972656C65737320436F6E74726F6C6C
	Characteristic 2a01, properties 0x2, value 0xC403	//Appearance
		Descriptor 2803, value 0x020500012A	//Characteristic
		Descriptor 00002a01-0000-0000-0000-000000000000, value 0xC403
	Characteristic 2a04, properties 0x2, value 0x0600060000002C01	//Peripheral Preferred Connection Parameters
		Descriptor 2803, value 0x020700042A	//Characteristic
		Descriptor 00002a04-0000-0000-0000-000000000000, value 0x0600060000002C01
Service 1801	//Generic Attribute service
Service 180a	//Device Information service
	Characteristic 2a29, properties 0x2, value 0x4D6963726F736F6674	//Manufacturer Name String
		Descriptor 2803, value 0x020B00292A	//Characteristic
		Descriptor 00002a29-0000-0000-0000-000000000000, value 0x4D6963726F736F6674
	Characteristic 2a50, properties 0x2, value 0x025E04200B1505	//PnP ID
		Descriptor 2803, value 0x020D00502A	//Characteristic
		Descriptor 00002a50-0000-0000-0000-000000000000, value 0x025E04200B1505
	Characteristic 2a26, properties 0x2, value 0x352E31352E333136382E30	//Firmware Revision String
		Descriptor 2803, value 0x020F00262A	//Characteristic
		Descriptor 00002a26-0000-0000-0000-000000000000, value 0x352E31352E333136382E30
	Characteristic 2a25, properties 0x2, value 0x3033363030303332393035363234	//Serial Number String
		Descriptor 2803, value 0x021100252A	//Characteristic
		Descriptor 00002a25-0000-0000-0000-000000000000, value 0x3033363030303332393035363234
Service 180f	//Battery service
	Characteristic 2a19, properties 0x12, value 0x32	//Battery Level
		Descriptor 2803, value 0x121400192A	//Characteristic
		Descriptor 00002a19-0000-0000-0000-000000000000, value 0x32
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
Service 1812	//Human Interface Device service
	Characteristic 2a4a, properties 0x2	//HID Information
		Descriptor 2803, value 0x0218004A2A	//Characteristic
		Descriptor 00002a4a-0000-0000-0000-000000000000, value 0x
	Characteristic 2a4c, properties 0x4	//HID Control Point
		Descriptor 2803, value 0x041A004C2A	//Characteristic
		Descriptor 00002a4c-0000-0000-0000-000000000000, value 0x
	Characteristic 2a4b, properties 0x2	//Report Map
		Descriptor 2803, value 0x021C004B2A	//Characteristic
		Descriptor 00002a4b-0000-0000-0000-000000000000, value 0x
	Characteristic 2a4d, properties 0x12	//Report
		Descriptor 2803, value 0x121E004D2A	//Characteristic
		Descriptor 00002a4d-0000-0000-0000-000000000000, value 0x
		Descriptor 2902, value 0x0000	//Client Characteristic Configuration
		Descriptor 2908, value 0x0101	//Report Reference
	Characteristic 2a4d, properties 0xE	//Report
		Descriptor 2803, value 0x0E22004D2A	//Characteristic
		Descriptor 00002a4d-0000-0000-0000-000000000000, value 0x
		Descriptor 2908, value 0x0302	//Report Reference
Service 00000001-5f60-4c4f-9c83-a7953298d40d
	Characteristic 00000002-5f60-4c4f-9c83-a7953298d40d, properties 0x2
		Descriptor 2803, value 0x0226000DD4983295A7839C4F4C605F02000000	//Characteristic
		Descriptor 00000002-5f60-4c4f-9c83-a7953298d40d, value 0x
	Characteristic 00000003-5f60-4c4f-9c83-a7953298d40d, properties 0x2
		Descriptor 2803, value 0x0228000DD4983295A7839C4F4C605F03000000	//Characteristic
		Descriptor 00000003-5f60-4c4f-9c83-a7953298d40d, value 0x
	Characteristic 00000004-5f60-4c4f-9c83-a7953298d40d, properties 0x8
		Descriptor 2803, value 0x082A000DD4983295A7839C4F4C605F04000000	//Characteristic
		Descriptor 00000004-5f60-4c4f-9c83-a7953298d40d, value 0x

Disconnecting ...
Disconnected

Note there may still be some debug output that I will disable soon.
Although unclear if this will be integrated back into the library or not?

The main issue I ran into was with the function:

int HCIClass::readLeBufferSize(uint16_t& pktLen, uint8_t& maxPkt)
{
  int result = sendCommand(OGF_LE_CTL << 10 | OCF_LE_READ_BUFFER_SIZE);

  //Serial.println("HCIClass::readLeBufferSize called");
  if (result == 0) {
    struct __attribute__ ((packed)) HCILeBufferSize {
      uint16_t pktLen;
      uint8_t maxPkt;
    } *leBufferSize = (HCILeBufferSize*)_cmdResponse;

    pktLen = leBufferSize->pktLen;
    _maxPkt = maxPkt = leBufferSize->maxPkt;

#ifdef _BLE_TRACE_
  Serial.print("\tpktlen: ");
  Serial.print(pktLen, DEC);
  Serial.print(" maxPkt: ");
  Serial.println(maxPkt, DEC);
#endif

#if (defined(TEENSYDUINO) && (__IMXRT1062__) || (ARDUINO_TEENSY36)) || !defined(__AVR__)
    ATT.setMaxMtu(pktLen/* - 9*/); // max pkt len - ACL header size
#endif
  }

  return result;
}

The issue was with the call: ATT.setMaxMtu(pktLen - 9); // max pkt len - ACL header size

As with my USB BT4 dongles the call was returning 27 and as such the call was then setting it to 18, which caused lots of things to fail.

From the Bluetooth 5.3 manual on the OCF_LE_READ_BUFFER_SIZE command it says:

The ISO_Data_Packet_Length return parameter shall be used to determine the
maximum size of the SDU segments that are contained in isochronous data
packets, and which are transferred from the Host to the Controller. The

Total_Num_ISO_Data_Packets return parameter contains the total number of
isochronous data packets that can be stored in the data buffers of the
Controller. The Host determines how to divide the buffers between different
connection handle(s).

Note: The LE_ACL_Data_Packet_Length and ISO_Data_Packet_Length
return parameters do not include the length of the HCI ACL Data packet header
or the HCI ISO Data packet header respectively.

Removing that subtraction of 9 and everything was a lot happier.

1 Like

@ptillisch and all,

Couple of quick questions:

  1. Wondering if I should PR some of the non-teensy things here. Like: the peripheral explorer example, I wanted to know what each of the properties and like were, so I created table from the BT 5.3 pdf for those and they are displayed with the // marks, like:
Service 1800	//Generic Access service
	Characteristic 2a00, properties 0x2, value 0x58626F7820576972656C65737320436F6E74726F6C6C	//Device Name
		Descriptor 2803, value 0x020300002A	//Characteristic
		Descriptor 00002a00-0000-0000-0000-000000000000, value 0x58626F7820576972656C65737320436F6E74726F6C6C
	Characteristic 2a01, properties 0x2, value 0xC403	//Appearance
		Descriptor 2803, value 0x020500012A	//Characteristic
		Descriptor 00002a01-0000-0000-0000-000000000000, value 0xC403
	Characteristic 2a04, properties 0x2, value 0x0600060000002C01	//Peripheral Preferred Connection Parameters
		Descriptor 2803, value 0x020700042A	//Characteristic
		Descriptor 00002a04-0000-0000-0000-000000000000, value 0x0600060000002C01
Service 1801	//Generic Attribute service
Service 180a	//Device Information service
	Characteristic 2a29, properties 0x2, value 0x4D6963726F736F6674	//Manufacturer Name String
		Descriptor 2803, value 0x020B00292A	//Characteristic
		Descriptor 00002a29-0000-0000-0000-000000000000, value 0x4D6963726F736F6674
	Characteristic 2a50, properties 0x2, value 0x025E04200B1505	//PnP ID
		Descriptor 2803, value 0x020D00502A	//Characteristic
		Descriptor 00002a50-0000-0000-0000-000000000000, value 0x025E04200B1505
	Characteristic 2a26, properties 0x2, value 0x352E31352E333136382E30	//Firmware Revision String
		Descriptor 2803, value 0x020F00262A	//Characteristic
		Descriptor 00002a26-0000-0000-0000-000000000000, value 0x352E31352E333136382E30
	Characteristic 2a25, properties 0x2, value 0x3033363030303332393035363234	//Serial Number String
		Descriptor 2803, value 0x021100252A	//Characteristic
		Descriptor 00002a25-0000-0000-0000-000000000000, value 0x3033363030303332393035363234
Service 180f	//Battery service

I am sort of resisting the creation of PRs as to not have to deal with low memory AVR devices.

  1. Teensy specific stuff - not sure yet, maybe either add here or keep as own fork...

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

3) Are there any examples for this library, that are setup to logically pair with a BLE type device like this. That is the XBox One only shows up in the Peripheral Explorer if I press the pair button on it and put it into logical pairing mode.

I am assuming that it is doing something like a directed advertisement, if I simply click on the Xbox button. Are there examples and library code that for example if after I see the ArduinoBLE sketch sees the device in pairing mode, for it to do what is necessary to make the connection. (Setup the proper keys), and probably save them...

Next step after that, would be to add support for the HID stuff.

The closest thing I have seen is from @bitbank
bitbank2/Nano_33_Gamepad: A sketch to connect BLE HID gamepads to the Arduino Nano 33 BLE (github.com)

Still unclear to me, for the Teensy (3.6 and T4.x) how much of this I should try to use this library versus add the support directly into usbhost_t36 library. My port of arduinoBLE library is already using the usbhost library at the lower level and I already have a version of the HID parser running for bluetooth (not ble).

Hi @KurtE. I don't have any involvement in the ArduinoBLE library project other than my usual "janitorial"/triage maintainer duties. So I can't comment on whether or not your enhancements to the library are something Arduino is interested, nor about what the timeframe would be for a maintainer to find time to take a look at your PR. However, unique PRs are always welcome. Even if Arduino doesn't find time to merge it, or decides your proposal doesn't align with our vision of the project, a PR makes your work visible to other users, who might find it useful even if it isn't in the official version of the library.

The library is not intended to be compatible with boards of the classic AVR architecture:

https://github.com/arduino-libraries/ArduinoBLE/blob/b40f61816f54e91dbd8ab2ebbf90cc3b60ceefa9/library.properties#L9

architectures=samd,megaavr,mbed,apollo3,mbed_nano,mbed_portenta,mbed_nicla,esp32

It does state support for the megaavr architecture of the Uno WiFi Rev2 though, but at least the ATmega4809 has more resources to work with.

Thanks,

I saw the word UNO and assumed it was another Atmega328 board.

I may take a look at it to see if it at least builds for it.

As for my part 3) above,
I ordered an Adafruit board:

To try with their library:

As it looks like maybe they do pairing of BLE devices, will hopefully work and then see how to integrate with what I am playing with.

Something you might find useful is the ArduinoBLE GitHub repository has a continuous integration (CI) system that includes a workflow to automatically compile the example sketches for supported boards every time a commit is pushed or a PR opened. This can provide a quick "smoke test" to make sure the change didn't break the code.

You can run this CI in your own fork of the repository if you like. GitHub disables workflows in forks by default, but it only takes a few clicks to enable it:

  1. Open the homepage of your fork in the browser.
  2. Click the "Actions" tab.
  3. Click the I understand my workflows, go ahead and enable them button.

Now push a commit to your fork on GitHub. You will see the workflow run in progress on that "Actions" tab.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.