mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Merge pull request #332 from felis/belkin
Workaround issue with Belkin F8T065bf Bluetooth dongle
This commit is contained in:
commit
502c547ca2
2 changed files with 8 additions and 5 deletions
6
BTD.cpp
6
BTD.cpp
|
@ -225,11 +225,11 @@ uint8_t BTD::Init(uint8_t parent __attribute__((unused)), uint8_t port __attribu
|
|||
// First interface in the configuration must have Bluetooth assigned Class/Subclass/Protocol
|
||||
// And 3 endpoints - interrupt-IN, bulk-IN, bulk-OUT, not necessarily in this order
|
||||
for(uint8_t i = 0; i < num_of_conf; i++) {
|
||||
if(VID == IOGEAR_GBU521_VID && PID == IOGEAR_GBU521_PID) {
|
||||
ConfigDescParser<USB_CLASS_VENDOR_SPECIFIC, WI_SUBCLASS_RF, WI_PROTOCOL_BT, CP_MASK_COMPARE_ALL> confDescrParser(this); // Needed for the IOGEAR GBU521
|
||||
if((VID == IOGEAR_GBU521_VID && PID == IOGEAR_GBU521_PID) || (VID == BELKIN_F8T065BF_VID && PID == BELKIN_F8T065BF_PID)) {
|
||||
ConfigDescParser<USB_CLASS_VENDOR_SPECIFIC, WI_SUBCLASS_RF, WI_PROTOCOL_BT, CP_MASK_COMPARE_ALL> confDescrParser(this); // Workaround issue with some dongles
|
||||
rcode = pUsb->getConfDescr(bAddress, 0, i, &confDescrParser);
|
||||
} else {
|
||||
ConfigDescParser<USB_CLASS_WIRELESS_CTRL, WI_SUBCLASS_RF, WI_PROTOCOL_BT, CP_MASK_COMPARE_ALL> confDescrParser(this);
|
||||
ConfigDescParser<USB_CLASS_WIRELESS_CTRL, WI_SUBCLASS_RF, WI_PROTOCOL_BT, CP_MASK_COMPARE_ALL> confDescrParser(this); // Set class id according to the specification
|
||||
rcode = pUsb->getConfDescr(bAddress, 0, i, &confDescrParser);
|
||||
}
|
||||
if(rcode) // Check error code
|
||||
|
|
7
BTD.h
7
BTD.h
|
@ -27,8 +27,11 @@
|
|||
#define PS3NAVIGATION_PID 0x042F // Navigation controller
|
||||
#define PS3MOVE_PID 0x03D5 // Motion controller
|
||||
|
||||
#define IOGEAR_GBU521_VID 0x0A5C // The IOGEAR GBU521 dongle does not presents itself correctly, so we have to check for it manually
|
||||
// These dongles do not present themselves correctly, so we have to check for them manually
|
||||
#define IOGEAR_GBU521_VID 0x0A5C
|
||||
#define IOGEAR_GBU521_PID 0x21E8
|
||||
#define BELKIN_F8T065BF_VID 0x050D
|
||||
#define BELKIN_F8T065BF_PID 0x065A
|
||||
|
||||
/* Bluetooth dongle data taken from descriptors */
|
||||
#define BULK_MAXPKTSIZE 64 // Max size for ACL data
|
||||
|
@ -264,7 +267,7 @@ public:
|
|||
* @return Returns true if the device's VID and PID matches this driver.
|
||||
*/
|
||||
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
|
||||
if(vid == IOGEAR_GBU521_VID && pid == IOGEAR_GBU521_PID)
|
||||
if((vid == IOGEAR_GBU521_VID && pid == IOGEAR_GBU521_PID) || (vid == BELKIN_F8T065BF_VID && pid == BELKIN_F8T065BF_PID))
|
||||
return true;
|
||||
if(my_bdaddr[0] != 0x00 || my_bdaddr[1] != 0x00 || my_bdaddr[2] != 0x00 || my_bdaddr[3] != 0x00 || my_bdaddr[4] != 0x00 || my_bdaddr[5] != 0x00) { // Check if Bluetooth address is set
|
||||
if(vid == PS3_VID && (pid == PS3_PID || pid == PS3NAVIGATION_PID || pid == PS3MOVE_PID))
|
||||
|
|
Loading…
Reference in a new issue