KurtE
Senior Member+
I thought I would mention, that @mjs513 and myself, have been working on updating the Bluetooth support within the USBHost library.
Hopefully soon we will have setup to do a Pull request into the master branch. We will discuss these changes over in the main USBHost Bluetooth thread: https://forum.pjrc.com/threads/49358-T3-6-USB-Host-Bluetooth
But this includes things like we now have some of the XBox One controllers working as well as some of the Nintendo Switch controllers working and cleaned up a bunch of different things, added SDP support and the like.
We will post an update in the other thread about this soon.
But One thing I have been running into, is so far the USBHost Bluetooth library is we do not have any support in it for Bluetooth Low Energy (BLE). And we are running into devices that use BLE.
For example, I have a Microsoft Mouse that we do not see at all. And as I mentioned our current WIP Bluetooth code is working with Some XBOX one controllers. But the latest Firmware release for these controllers
has now converted the device to run BLE...
So I started investigating how to add BLE support into our USB Host support, which has been pretty interesting, as it relies on several more Bluetooth sub-systems. So, I started off with adding some real basic stuff, where I was able to enable the BLE scan and could see that some devices exist out there. But to go to the next step would require implementing things like GATT and ...
So I was curious and found that Arduino has a library arduinoBLE, which implements a lot of this. Which they have running on several boards like: Arduino Nano 33 IOT, Arduino Nano 33 BLE, plus RPI2040, ESP32... So was wondering how hard it would be to get it running on the Teensy 3.6, 4.x...
So I started hacking. Their code appears to be geared to work using the Uart Transport Layer (BT Core 5.3 spec - Vol 4, part A)... We are not using that transport layer, but most of our USB Dongles, are geared around the USB Transport layer (same volume but Part B)...
The ArduinoBLE code has some classes for different implementations of the Transport class. And I created one for USBHost. I actually have the code add one of our USB Host object, plus a HUB, plus a new class that I hacke up out of our BluetoothController class.
And it is now talking. I ran through several of the examples, but have had:
I started off with an Arduino Nano33 IOT running LedControl.ino talking to a Nano 33 BLE (Led) so you can change state of pin 2 of the IOT and it changes the state of the LED on the BLE.
Then through several steps have the LEDControl sketch running on a MicroMod talking to the BLE
And now have a Teensy 4.1 running LED
So I now have a version of this library up in the fork/branch: https://github.com/kurte/ArduinoBLE/tree/Teensy_USBHost
Will be fun to try out a few more things, like their battery monitor example, to see how well it talks to my iPhone or iPad.
Plus see how well this library talks to the Microsoft Mouse or an updated XBox controller.
Not sure, what I will do with this in the end. Options include: Punt, or see about creating a Pull Request back to Arduino. Or trying to integrate more of this functionality back into USBHost_t36.
But now back to playing
Hopefully soon we will have setup to do a Pull request into the master branch. We will discuss these changes over in the main USBHost Bluetooth thread: https://forum.pjrc.com/threads/49358-T3-6-USB-Host-Bluetooth
But this includes things like we now have some of the XBox One controllers working as well as some of the Nintendo Switch controllers working and cleaned up a bunch of different things, added SDP support and the like.
We will post an update in the other thread about this soon.
But One thing I have been running into, is so far the USBHost Bluetooth library is we do not have any support in it for Bluetooth Low Energy (BLE). And we are running into devices that use BLE.
For example, I have a Microsoft Mouse that we do not see at all. And as I mentioned our current WIP Bluetooth code is working with Some XBOX one controllers. But the latest Firmware release for these controllers
has now converted the device to run BLE...
So I started investigating how to add BLE support into our USB Host support, which has been pretty interesting, as it relies on several more Bluetooth sub-systems. So, I started off with adding some real basic stuff, where I was able to enable the BLE scan and could see that some devices exist out there. But to go to the next step would require implementing things like GATT and ...
So I was curious and found that Arduino has a library arduinoBLE, which implements a lot of this. Which they have running on several boards like: Arduino Nano 33 IOT, Arduino Nano 33 BLE, plus RPI2040, ESP32... So was wondering how hard it would be to get it running on the Teensy 3.6, 4.x...
So I started hacking. Their code appears to be geared to work using the Uart Transport Layer (BT Core 5.3 spec - Vol 4, part A)... We are not using that transport layer, but most of our USB Dongles, are geared around the USB Transport layer (same volume but Part B)...
The ArduinoBLE code has some classes for different implementations of the Transport class. And I created one for USBHost. I actually have the code add one of our USB Host object, plus a HUB, plus a new class that I hacke up out of our BluetoothController class.
And it is now talking. I ran through several of the examples, but have had:
I started off with an Arduino Nano33 IOT running LedControl.ino talking to a Nano 33 BLE (Led) so you can change state of pin 2 of the IOT and it changes the state of the LED on the BLE.
Then through several steps have the LEDControl sketch running on a MicroMod talking to the BLE
And now have a Teensy 4.1 running LED
So I now have a version of this library up in the fork/branch: https://github.com/kurte/ArduinoBLE/tree/Teensy_USBHost
Will be fun to try out a few more things, like their battery monitor example, to see how well it talks to my iPhone or iPad.
Plus see how well this library talks to the Microsoft Mouse or an updated XBox controller.
Not sure, what I will do with this in the end. Options include: Punt, or see about creating a Pull Request back to Arduino. Or trying to integrate more of this functionality back into USBHost_t36.
But now back to playing