Skip to content

Commit

Permalink
Add Intel BT support
Browse files Browse the repository at this point in the history
  • Loading branch information
benbaker76 committed Jul 20, 2020
1 parent f4a4b75 commit e4a8c4d
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Hackintool.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 0342;
CURRENT_PROJECT_VERSION = 0343;
DEVELOPMENT_TEAM = 5LGHPJM9ZR;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_STRICT_OBJC_MSGSEND = NO;
Expand All @@ -728,7 +728,7 @@
HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2";
INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks";
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -748,7 +748,7 @@
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 0342;
CURRENT_PROJECT_VERSION = 0343;
DEVELOPMENT_TEAM = 5LGHPJM9ZR;
ENABLE_HARDENED_RUNTIME = NO;
ENABLE_STRICT_OBJC_MSGSEND = NO;
Expand All @@ -762,7 +762,7 @@
HEADER_SEARCH_PATHS = "$(SDKROOT)/usr/include/libxml2";
INFOPLIST_FILE = "Hackintool/Hackintool-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "@loader_path/../Frameworks @executable_path/../Frameworks";
MARKETING_VERSION = 3.4.2;
MARKETING_VERSION = 3.4.3;
PRODUCT_BUNDLE_IDENTIFIER = com.Headsoft.Hackintool;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
Binary file not shown.
28 changes: 28 additions & 0 deletions Hackintool/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -1946,13 +1946,17 @@ - (void)updateBluetoothDevices

NSArray *brcmDeviceArray = nil;
NSArray *atherosDeviceArray = nil;
NSArray *intelDeviceArray = nil;

if ((filePath = [mainBundle pathForResource:@"BRCMDevice" ofType:@"plist" inDirectory:@"BT"]))
brcmDeviceArray = [NSArray arrayWithContentsOfFile:filePath];

if ((filePath = [mainBundle pathForResource:@"AtherosDevice" ofType:@"plist" inDirectory:@"BT"]))
atherosDeviceArray = [NSArray arrayWithContentsOfFile:filePath];

if ((filePath = [mainBundle pathForResource:@"IntelDevice" ofType:@"plist" inDirectory:@"BT"]))
intelDeviceArray = [NSArray arrayWithContentsOfFile:filePath];

NSMutableArray *usbPropertyDictionaryArray = nil;

if (!getIORegPropertyDictionaryArray(@"IOUSBDevice", &usbPropertyDictionaryArray))
Expand Down Expand Up @@ -2034,6 +2038,30 @@ - (void)updateBluetoothDevices
break;
}
}

for (NSDictionary *intelDeviceDictionary in intelDeviceArray)
{
NSString *name = [intelDeviceDictionary objectForKey:@"Name"];
NSNumber *productID = [intelDeviceDictionary objectForKey:@"ProductID"];
NSNumber *vendorID = [intelDeviceDictionary objectForKey:@"VendorID"];

if ([productID isEqualToNumber:idProduct] && [vendorID isEqualToNumber:idVendor])
{
NSMutableDictionary *bluetoothDeviceDictionary = [NSMutableDictionary dictionary];

[bluetoothDeviceDictionary setObject:idVendor forKey:@"VendorID"];
[bluetoothDeviceDictionary setObject:idProduct forKey:@"DeviceID"];
[bluetoothDeviceDictionary setObject:(vendorName != nil ? vendorName : @"???") forKey:@"VendorName"];
[bluetoothDeviceDictionary setObject:name forKey:@"DeviceName"];

if (fwLoaded)
[bluetoothDeviceDictionary setObject:fwLoaded forKey:@"FWLoaded"];

[_bluetoothDevicesArray addObject:bluetoothDeviceDictionary];

break;
}
}
}

[_bluetoothDevicesTableView reloadData];
Expand Down
96 changes: 96 additions & 0 deletions Resources/BT/IntelDevice.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>FirmwareName</key>
<string></string>
<key>Name</key>
<string>Bluetooth wireless interface</string>
<key>ProductID</key>
<integer>2602</integer>
<key>VendorID</key>
<integer>32903</integer>
</dict>
<dict>
<key>FirmwareName</key>
<string></string>
<key>Name</key>
<string>Bluetooth wireless interface</string>
<key>ProductID</key>
<integer>2012</integer>
<key>VendorID</key>
<integer>32903</integer>
</dict>
<dict>
<key>FirmwareName</key>
<string></string>
<key>Name</key>
<string>Wireless-AC 3168 Bluetooth</string>
<key>ProductID</key>
<integer>2727</integer>
<key>VendorID</key>
<integer>32903</integer>
</dict>
<dict>
<key>FirmwareName</key>
<string></string>
<key>Name</key>
<string>Wireless-AC 9260 Bluetooth Adapter</string>
<key>ProductID</key>
<integer>37</integer>
<key>VendorID</key>
<integer>32903</integer>
</dict>
<dict>
<key>FirmwareName</key>
<string></string>
<key>Name</key>
<string>Bluetooth 9460/9560 Jefferson Peak (JfP)</string>
<key>ProductID</key>
<integer>2730</integer>
<key>VendorID</key>
<integer>32903</integer>
</dict>
<dict>
<key>FirmwareName</key>
<string></string>
<key>Name</key>
<string>Bluetooth wireless interface</string>
<key>ProductID</key>
<integer>38</integer>
<key>VendorID</key>
<integer>32903</integer>
</dict>
<dict>
<key>FirmwareName</key>
<string></string>
<key>Name</key>
<string>AX200 Bluetooth</string>
<key>ProductID</key>
<integer>41</integer>
<key>VendorID</key>
<integer>32903</integer>
</dict>
<dict>
<key>FirmwareName</key>
<string></string>
<key>Name</key>
<string>Bluetooth wireless interface</string>
<key>ProductID</key>
<integer>2603</integer>
<key>VendorID</key>
<integer>32903</integer>
</dict>
<dict>
<key>FirmwareName</key>
<string></string>
<key>Name</key>
<string>Bluetooth wireless interface</string>
<key>ProductID</key>
<integer>50</integer>
<key>VendorID</key>
<integer>32903</integer>
</dict>
</array>
</plist>
14 changes: 13 additions & 1 deletion Resources/Kexts/kexts.plist
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
<key>Description</key>
<string>Try to load the Intel Bluetooth driver firmware.</string>
<key>ProjectUrl</key>
<string>https://github.com/zxystd/IntelBluetoothFirmware</string>
<string>https://github.com/OpenIntelWireless/IntelBluetoothFirmware</string>
<key>Type</key>
<string>Kext</string>
</dict>
Expand All @@ -543,6 +543,18 @@
<string>https://github.com/zxystd/AppleIntelWifiAdapter</string>
<key>Type</key>
<string>Kext</string>
<key>Superseder</key>
<string>itlwm</string>
</dict>
<dict>
<key>Name</key>
<string>itlwm</string>
<key>Description</key>
<string>OpenBSD based macOS Intel network card driver.</string>
<key>ProjectUrl</key>
<string>https://github.com/OpenIntelWireless/itlwmr</string>

This comment has been minimized.

Copy link
@williambj1

williambj1 Jul 20, 2020

Contributor

Extra r :p

<key>Type</key>
<string>Kext</string>
</dict>
</array>
</plist>

0 comments on commit e4a8c4d

Please sign in to comment.