Contribute
Register

Not Shy's Guide - Potentially Fix Bluetooth Sleep/Wake

Status
Not open for further replies.
Joined
Aug 12, 2010
Messages
1,575
Motherboard
X58A-UD3R v2
CPU
i7-930
Graphics
5770
Mac
  1. MacBook
  2. MacBook Pro
Mobile Phone
  1. Android
So, I bought a Trust 2400p (model no 15542-02) after reading some very nice reviews of it working out of the box (OOB) with OSX.

So off I went and plugged it in, booted and it picked up my magic mouse and off I went in happy "apple branded product bliss".

[side point]
Then I started having sleep issues and started to worry it was my bluetooth - but tracked it down to some Win 7 drives being plugged in to my Marvel SATA ports and I fixed it by moving them to the Gigabyte SATA ports on my X58A-UD3R.
[/side point]

So back I came to my bluetooth and found that I could put my machine to sleep however I could only wake it using my USB keyboard or the power button - but I got very different results by waking either way:

Sleep > wake via Mouse click - doesn't do anything
Sleep > wake via Power Button - mouse works
Sleep > wake via USB keyboard - mouse show's as paired but doesn't respond so turn off and turn on mouse again (or disconnect and reconnect via Bluetooth menu) and mouse works again

So I looked in System Preferences > Bluetooth > Advanced and the option "Allow bluetooth devices to wake this computer" was greyed out !!!!

So I did some digging around and found this solution:
http://www.insanelymac.com/forum/index. ... 272&st=112

I first went into /S/L/E and copied my IOBluetoothFamily.kext to a temporary folder in my main Documents folder. I then tried using the kext from that link by trashing my kext in /S/L/E and then installing the one in that link via KextBeast but it didn't work - my bluetooth showed that my mouse was connected but it wouldn't respond - even after turning it off and back on and unplugging and re-plugging in the bluetooth dongle.

So - take two - I decided to edit the original vanilla kext that I had and to add the Vendor ID and Product ID of my bluetooth adaptor into my original IOBluetoothFamily.kext

I used an online Hex to Decimal converter to convert my IDs.
Go to System Profiler > Bluetooth
Then look at my product and vendor ID (note they are in hex)

Code:
  Apple Bluetooth Software Version:	2.3.8f7
  Hardware Settings:
  Address:	00-02-72-ad-1f-2e
  Manufacturer:	Broadcom
  Name:	Not Shy’s Mac Pro
  Firmware Version:	14 (21298)
  Bluetooth Power:	On
  Discoverable:	Yes
           Vendor ID:	       0xa5c
           Product ID:	       0x2148
  HCI Version:	4 (0x4)
  HCI Revision:	21298 (0x5332)
  LMP Version:	4 (0x4)
  LMP Subversion:	16910 (0x420e)
  Device Type (Major):	Computer
  Device Type (Complete):	Macintosh Desktop
  Composite Class Of Device:	3670276 (0x380104)
  Device Class (Major):	1 (0x1)
  Device Class (Minor):	1 (0x1)
  Service Class:	448 (0x1c0)
  Requires Authentication:	No

I then copied my original IOBluetoothFamily.kext to my desktop then open package contents (right click or ctrl + left click - "Show Package Contents") to find:
IOBluetoothFamily.kext/Contents/PlugIns/BroadcomUSBBluetoothHCIControl/Contents/info.plist

I then duplicated one of the Broadcom2046 keys in IOKitPersonalities but added my Product ID and Vendor ID in decimal:
Product ID = 0x2148 >>> 8520
Vendor ID = 0x0a5c >>> 2652

Code:
		<key>Broadcom2046FamilyUSBBluetoothHCIController_NOTSHY</key>
		<dict>
			<key>CFBundleIdentifier</key>
			<string>com.apple.driver.BroadcomUSBBluetoothHCIController</string>
			<key>IOClass</key>
			<string>Broadcom2045FamilyUSBBluetoothHCIController</string>
			<key>IOProviderClass</key>
			<string>IOUSBDevice</string>
			<key>IOProviderMergeProperties</key>
			<dict>
				<key>ClassicMustNotSeize</key>
				<true/>
			</dict>
			<key>LMPLoggingEnabled</key>
			<false/>
			<key>idProduct</key>
			<integer>8520</integer>
			<key>idVendor</key>
			<integer>2652</integer>
		</dict>

Then save the .plist and exit out of the kext.

Then trashed the IOBluetoothFamily.kext in S/L/E and used KextBeast to install my new edited kext from my desktop.

Reboot - and hey presto!!!

Go into System Preferences > Bluetooth > Advanced and .....

I now have the option "Allow bluetooth devices to wake this computer" and I can now wake my hack from sleep using my magic mouse !!!!

So I would recommend this guide to anyone who has a bluetooth device that works out of the box but they can't wake their hack from sleep using it.

I only own the Trust bluetooth dongle which uses the Broadcom chipset but I believe that it would be straightforward enough to adapt this guide for other chipsets by editing different HCIController.kext in the Plugs part of the IOBluetoothFamily.kext

I hope this guide makes some sense and helps any of you out buying a bluetooth dongle to use a apple keyboard / magic mouse / mighty mouse / magic pad
 
Re: Not Shy's Guide - Fixing Bluetooth Sleep/Wake

I LOVE THIS !!!
Gotta try it at home (obviously, adapting it to my "Cambridge Silicon Radio") ;)

Kudos !!!
 
Re: Not Shy's Guide - Fixing Bluetooth Sleep/Wake

I don't actually use bloutooth but GREAT WORK! Nice to see someone actually tinkering and trying things out. Seems like there hasn't been much fresh interesting content on here lately. Keep it up!
 
Re: Not Shy's Guide - Fixing Bluetooth Sleep/Wake

Ok- I tested this a while back- if you page back in the insanelymac thread, you'll see I replied early on- but the topic was about Magic Mouse working with what dongle. Then it turned to general wake from sleep issues.

I've tested it on my Jabra dongle again, and here are my results. This could be because of my dongle, and nothing more. I can get it to show up and wake from sleep- but then I have no bluetooth- and have to unplug and reinsert, kind of killing the whole point :p This is my current USB Bluetooth adapter- which works perfectly, besides wake from sleep.

Jabra A320s Bluetooth 2.0 EDR - USB Adapter
http://www.amazon.com/gp/product/B0018MFJMI?ie=UTF8

Vendor ID: 0xa5c > 2652
Product ID: 0x2101 > 8449

Here's a screenshot of the Wake box being active in Advanced Bluetooth Preferences. I have a feeling that Vendor IDs with 1452 will work, as that seems like the most common- and is probably a supported Broadcom device.

At this point, it's either the dongle, or something else that's causing the usb issue when waking- it could be I was testing on an H55 vs. your X58 rig- the USB implementation is different .

Tip: If you're wondering how to convert Hex to Decimal, open Applications/Calculator and go to View in the menu bar. Choose Programmer. Then hit the 16 in the upper right corner. Type your Hex (ie, 0x2101) and then hit 10 and it will show you the Decimal value. There are also online converters. ;)

Sidenote: I'm waiting on delivery of a real Mac bluetooth dongle- a D-Link that's supposed to work oob with wake from sleep, and I'll report back.

D-Link DBT-120 Wireless Bluetooth 2.0 USB Adapter
http://www.amazon.com/gp/product/B00006B7DB?ie=UTF8

:D
 

Attachments

  • Screen shot 2010-11-15 at 11.24.26 PM.png
    Screen shot 2010-11-15 at 11.24.26 PM.png
    64 KB · Views: 8,776
Re: Not Shy's Guide - Fixing Bluetooth Sleep/Wake

Hey Tony, yeah I meant to add that I saw you in that thread from a while back and I wasn't sure if you'd already put it up here or not. I spent a while searching and saw lots of people asking about what Bluetooth dongle to get and wake from sleep on different chip sets.

In the end I thought is share it and see if I could help anyone else with their existing dongle issues. Plus when I went shopping for my dongle the Dlink one was out of stock so I'm pleased that someone found a way to get other dongles working with all features enabled.


tonymacx86 said:
Ok- I tested this a while back- if you page back in the insanelymac thread, you'll see I replied early on- but the topic was about Magic Mouse working with what dongle. Then it turned to general wake from sleep issues.

I've tested it on my Jabra dongle again, and here are my results. This could be because of my dongle, and nothing more. I can get it to show up and wake from sleep- but then I have no bluetooth- and have to unplug and reinsert, kind of killing the whole point :p This is my current USB Bluetooth adapter- which works perfectly, besides wake from sleep.

Jabra A320s Bluetooth 2.0 EDR - USB Adapter
http://www.amazon.com/gp/product/B0018MFJMI?ie=UTF8

Vendor ID: 0xa5c > 2652
Product ID: 0x2101 > 8449

Here's a screenshot of the Wake box being active in Advanced Bluetooth Preferences. I have a feeling that Vendor IDs with 1452 will work, as that seems like the most common- and is probably a supported Broadcom device.

At this point, it's either the dongle, or something else that's causing the usb issue when waking- it could be I was testing on an H55 vs. your X58 rig- the USB implementation is different .

Tip: If you're wondering how to convert Hex to Decimal, open Applications/Calculator and go to View in the menu bar. Choose Programmer. Then hit the 16 in the upper right corner. Type your Hex (ie, 0x2101) and then hit 10 and it will show you the Decimal value. There are also online converters. ;)

Sidenote: I'm waiting on delivery of a real Mac bluetooth dongle- a D-Link that's supposed to work oob with wake from sleep, and I'll report back.

D-Link DBT-120 Wireless Bluetooth 2.0 USB Adapter
http://www.amazon.com/gp/product/B00006B7DB?ie=UTF8

:D
 
Re: Not Shy's Guide - Fixing Bluetooth Sleep/Wake

Sidenote: I'm waiting on delivery of a real Mac bluetooth dongle- a D-Link that's supposed to work oob with wake from sleep, and I'll report back.

D-Link DBT-120 Wireless Bluetooth 2.0 USB Adapter
http://www.amazon.com/gp/product/B00006B7DB?ie=UTF8

You maybe disappointed Tony, am using the DBT-120 Rev B4, works ootb alright but wake from sleep option is greyed out.
Funny thing is, looking at the specs in system profiler, my vendor and product id is "0" :think:
 
Re: Not Shy's Guide - Fixing Bluetooth Sleep/Wake

Sudds said:
Sidenote: I'm waiting on delivery of a real Mac bluetooth dongle- a D-Link that's supposed to work oob with wake from sleep, and I'll report back.

D-Link DBT-120 Wireless Bluetooth 2.0 USB Adapter
http://www.amazon.com/gp/product/B00006B7DB?ie=UTF8

You maybe disappointed Tony, am using the DBT-120 Rev B4, works ootb alright but wake from sleep option is greyed out.
Funny thing is, looking at the specs in system profiler, my vendor and product id is "0" :think:

Try looking under Hardware - USB Devices

Then look for a section that looks like the bluetooth device - there may be something that looks like the bluetooth chip and then two other entries for "composite device".

Have a look at the entry for the bluetooth chip.

Can you post a pic of the USB section of your System Profiler? I'm not sure if it will be different to the Bluetooth section as it may just say the same info - but worth a try.
 
Re: Not Shy's Guide - Fixing Bluetooth Sleep/Wake

Yes mate, it shows Product and vendor id in USB section alright.
But "0" under bluetooth in system profiler.

Product id: 0x0001
Vendor id: 0x0a12

This type of bt is Cambridge Silicon Radio, so maybe an edit of CSRUSBBluetoothHCIController?
 
Status
Not open for further replies.
Back
Top