8
Macbook Pro top replacement issue – or how I fixed my Macbook and sorted out the function keys.
I’ve been buying broken Macbook’s in SA when I’ve been home, for repair in China.
My latest purchase is a pre unibody Mac Book Pro that had been dropped – the top case was dented,and the screen shattered.
The LCD was fairly painless to replace – I’ve done quite a few already on various models, and I have a bazillion suppliers for raw panels.
The top case was a little more problematic – I ordered 2 consecutive replacements off of Taobao, but unfortunately the delivery company (ShenTong) destroyed both in shipping. Took about a month to sort that out and find a yet another replacement with explicit instructions please not to send via ShenTong (aka destroyer of parts).
The third case arrived in pristine condition, and I installed the keyboard from the previous case, only to find that the function keys didn’t work, and the caps lock didn’t work.
It wasn’t a hardware issue with the keyboard, as it worked fine in another laptop. I even ordered another one just to make sure.
A bit of googling revealed that the keyboard kext gets the layout from the USB hardware ID present in the top case.
As my top case didn’t quite match up hardware id wise, I was seeing that as an issue.
Fixing this is a bit tricky, but doable.
First up was to find out what the hardware id is for the USB case.
In my case this was as below (snarfed from System Information / USB)
Apple Internal Keyboard / Trackpad: Product ID: 0x0231 Vendor ID: 0x05ac (Apple Inc.) Version: 0,70 Speed: Up to 12 Mb/sec Manufacturer: Apple, Inc. Location ID: 0x5d200000 / 3 Current Available (mA): 500 Current Required (mA): 40
Product ID is the useful bit – 0×0231 = 561 in decimal.
So, we need to lookup 561 in the kext (driver) for the keyboard.
In Lion / Snow Leopard, this is in the AppleUSBTopCase.kext over in System / Library / Extensions.
If you open up that kext, it has the plist for the keyboard layouts over here -
AppleUSBTopCase.kext » Contents » PlugIns » AppleUSBTCKeyEventDriver.kext » Contents » Info.plist
Open up the Info.plist, and look for the Product ID that matches your Product ID – in my case 560.
The key FnFunctionUsageMap contains the mapping for the keyboard. In my case I had to change it to this:
<key>FnFunctionUsageMap</key> <string>0x0007003a,0x00ff0005,0x0007003b,0x00ff0004,0x0007003c,0x000c00e2,0x0007003d,0x000c00ea,0x0007003e,0x000c00e9,0x0007003f,0x00070083,0x00070040,0x00ff0006,0x00070041,0x00ff0007,0x00070042,0x00ff0009,0x00070043,0x00ff0008</string>
Each value is a pair – first the key number, then the value to set it to.
0x0007003a = F1
0x0007003b = F2
…
My above settings are for
F1 = brightness down
F2 = brightness up
F3 = mute
F4 = volume down
F5 = volume up
F6 = num lock
F7 = Expose
F8 = Keyboard Light off
F9 = Keyboard Light down
F10 = Keyboard Light Up
F11 = n/a
F12 = n/a
I got these values from here –
// usage IDs from the hid
#define FF_BRIGHTNESS_DOWN_ID_LAPTOP @”0x00ff0005″ // for laptops
#define FF_BRIGHTNESS_UP_ID_LAPTOP @”0x00ff0004″ // for laptops
#define FF_BRIGHTNESS_DOWN_ID_EXTERNAL @”0xff010021″ // for external keyboards
#define FF_BRIGHTNESS_UP_ID_EXTERNAL @”0xff010020″ // for external keyboards
#define FF_EXPOSE_ID @”0xff010010″
#define FF_DASHBOARD_ID @”0xff010002″
#define FF_ILLUMINATION_TOGGLE_ID @”0x00ff0007″
#define FF_ILLUMINATION_DOWN_ID @”0x00ff0009″
#define FF_ILLUMINATION_UP_ID @”0x00ff0008″
#define FF_VIDEO_MIRROR_ID @”0x00ff0006″
#define FF_REWIND_ID @”0x000C00B4″
#define FF_PLAYPAUSE_ID @”0x000C00CD”
#define FF_FASTFORWARD_ID @”0x000C00B3″
#define FF_MUTE_ID @”0x000C00E2″
#define FF_VOLUME_DOWN_ID @”0x000C00EA”
#define FF_VOLUME_UP_ID @”0x000C00E9″
Once I’d done that, I also needed to rebuild (or in my case build), the Kext cache so that the OS would use it on next reboot.
Heres how to do that in Lion
sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions
…oh, and lastly, reboot of course!
Post reboot my function keys were working normally.
The caps lock key is still non-functional, but I’m ok with that, as its means a bit more work for little effort.
I may look into setting up a special plist to override the usb_id its getting from the hardware via the method here -http://www.projectosx.com/forum/index.php?showtopic=798
..but again, time vs effort…
Still, my Macbook is working now more or less, so its good enough for me
Of course, subsequently to doing this the hard way, I found a program to do it all for me!
http://pqrs.org/macosx/keyremap4macbook/
Suggest unless you are a masochist, use that!
Although I was supposed to be on a plane today heading home, I did something silly and got the dates wrong.
So, after a nice scenic trip yesterday evening to the airport and back, I get to do it all over again tonight.
Although that was a total pain, I did get to spend another day in Shanghai, and luckily enough, it coincided with the new Apple Store opening in the IFC center over in Pudong.
Overall impression – this is good!
I spoke with a number of the staff, and talked about the usual issues here (service, service, service…), and they were all quite understanding, and Apple’s genuinely trying to improve on things – hence their own store, and support in Shanghai (finally).
Shanghai has the biggest Genius bar in the world now. Unfortunately the store is a bit lacking compared to others in Shanghai – no iPad, no iPhone (other than the official one), but they do carry software and iMac’s / Laptops in lots of configurations.
I know where my next iMac is coming from
Downsides of the store – the moat outside is going to claim lots of victims. Its so subtle that you miss is – who’s idea was that?
We already saw unhappy victims with wet feet while we were leaving. I expect that to be changed in the near future, or the store will have to provide a shoe drying facility!
I also had the only iPad in the store (and possibly China at that point) that could play flash. Ok, there were only 2 iPad’s in the store, but still..
Photo’s of the store on flickr, which I would upload, but China is being finicky again. Grrr
Should be on the sidebar though.
8
Time Capsule repair
I’ve been seeing a bunch of failed Apple Time Capsules recently.
The issue is that the PSU’s are dying, as opposed to the HDD’s.
I took one apart to take a look, and the issue is the oh too familiar someone bought cheap capacitors that use the wrong formula. Tsk tsk Apple!
Here are some photos of a faulty power supply from a Time Capsule I’ve taken apart to demonstrate -
Although most of my friends are using 3G/s now, I do get the odd 2G phone to play with.
Today I had another crack at enabling MMS on a 2G. For some reason not much documentation, and too much misinformation out there on the net.
Guaranteed working instructions for China Mobile users below:
Note #1 – this is for 2G iPhones only. 3G and newer phones, skip to the MMS settings at the bottom of the post, and put those in Settings / General / Network / Cellular Data Network…
Note #2 – 2G users – if you used BlackRa1n to jailbreak, this will not work either, and will b0rk wireless. Use PwnageTool, and create a 3.1.3 jailbroken / boot neutered (carrier unlock) firmware, install that first, then continue.
iPhone 2G users –
Install 3.1.3
Jailbreak with usual steps.
Add cydia.ifoneguide.nl in Cydia / Sources
Wait a bazillion years for cydia to timeout with the various blocked in China repositories.
Click Search
Download Activate 2G MMS
Reboot
Normally we’d be done, however the MMS settings won’t let us save a diffferent MMS and GPRS name, so we need to install a specific IPCC (iPhone Carrier Setting file) for China Telecom.
As China Telecom is (at time of writing) not an official iPhone supplier, they don’t have an IPCC file, so we need to roll our own.
Here’s one I found earlier – ChinaMobileCarrierSettingsWithMMS.zip
Download that, unzip, and throw on the desktop.
We’ll need to tell iTunes that its ok to use the IPCC file first, so close iTunes.
Now head off to terminal (or a DOS window for those on Windows), then paste this in.
Mac users:
defaults write com.apple.iTunes carrier-testing -bool TRUE
Windows users:
(32 bit)
“C:\Program Files\iTunes\iTunes.exe” /setPrefInt carrier-testing 1
(64 bit)
“C:\Program Files (x86)\iTunes\iTunes.exe” /setPrefInt carrier-testing 1
Done?
Ok, now open iTunes again, connect the phone if its not connected, and..
Mac Users:
Press + hold down Alt(option), and Click “Update”
Windows Users:
Press + hold down shift, then Click “Update”
iTunes will prompt you for a file.
Choose the IPCC file you downloaded.
Sync the phone.
Finally… shut the phone off again.
Once you power up again, you should be able to send/ receive MMS!
If its not working for you, check that the settings are in there –
Settings / General / Network / Cellular Data Network
(anything not listed below should be empty)
Cellular Data
APN -> cmnet
MMS
APN -> cmwap
MMSC -> http://mmsc.monternet.com
MMS Proxy -> 10.0.0.172
MMS Max Message Size -> 300172
Tested, and working on lots of 2g iPhones.
Had a client over today with some Mac issues.
Was getting disk full messages, despite having 130Gig free.
Did the usual stuff – disk repair, disk verify (caught some small things).
That fixed the disk full messages.
Then the client told me – oh, by the way, Safari doesn’t open.
Tailing the system log in console still revealed issues.
14/04/09 09:07:43 com.apple.launchctl.System[2] could not fetch history: Cannot allocate memory
14/04/09 09:07:43 com.apple.launchctl.System[2] BootCacheControl: could not stop cache/fetch history: Cannot allocate memory
A quick google of that error showed it was caused by…. Wacom drivers.
While Wacom have updated drivers for other tablets, the client uses a Bamboo, which hasn’t had driver updates since 2007.
Checking the logs while opening Safari revealed that it was trying to open a non-existent file called com.pentablet.defaults.xml
On the off chance that this would work, I created a blank file in terminal.
Terminal
sudo su
[enter in your password]
cd /Library/Preferences
ls -al com.pentablet.defaults.xml
If (and ONLY if) no file is found, do this:
echo > com.pentablet.defaults.xml
exit
exit
Safari will open again.
Hopefully Wacom will release newer less buggy drivers sometime soon.
One of my clients called asking why all his image attachments were suddenly postage stamp sized.
We both use Mac’s, and to be honest I had no idea, until I tried to send an image attachment myself.
Turns out that in Apple Mail, the simple stuff eludes us “smart” IT types by being obscure.
After attaching an image in Mail, Apple sneaks a new menu at the bottom of the page where you can choose the image size.
See below for an example:
Once we had that changed back to a more reasonable default (Medium in this case), all was well in the land, and we both learned something new!
Notes for Apple (just in case someone’s listening):
I like the idea, but I think the implementation leaves something to be desired. The UI for this is very non-intuitive, some kind of hinting wouldn’t go amiss here, or dare I say it, a total relocation of this to the top of the window with the other icons and menu options.
Archives
- December 2011
- November 2011
- October 2011
- September 2011
- July 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
Categories
- Apple
- Badges
- BMW
- China Related
- Cool Hunting
- Exploits
- Firmware
- Food
- General Talk
- government
- IP Cam
- iPhone
- Lasers
- legislation
- MODx
- MySQL
- requirements
- Service Issues
- Tao Bao
- Technical Mumbo Jumbo
- Things that will get me censored
- Travel
- Uncategorized
- Useful Info
Most Popular Posts
- Samsung N310 (Samsung Go) Hackintosh Installation on Snow Leopard (9998)
- BMW Keys and Transponders E36 E38 E46 etc (EWS2) (7418)
- eFrontWPI - Wordpress integration Plugin for eFront (7308)
- IPCam Hacking - pt#2 (6758)
- IP Cam Hacking – pt#5 (4684)
Tags
Recent Comments
-
tryphon: It helped me to fix mine. I used a pair of pliers like you did and it worked fine. I drink a coffee typing...
-
mark: I have a ms10105 v4.1 moshisoft board and here is the pinout: 1 y stepper a (yellow) 2 y stepper a (white) 3...
-
Lawrence Sheed: Haven’t taken a deep look yet, probably next month can check it out. There are people who are...
-
mark: Yes…that moshi software is crap. I used the corel draw plugin for awhile but it only works about 20% of...
-
Kunlun: I tried to get my motorbike lesson after my car driving lesson, they answered me that I needed to wait 1...
Recent Trackbacks
- SISTEMAS O.R.P: Recuperar una cámara Zaapa CIP-RW después de un fallo de actualización
- Blog - DO Bots: Brookstone Rover AC13
- How can I stop Pop3 Brute Force attacks: need to create a regex, and add it to fail2ban Here is a guide....
- shanghailoz is our latest member! -:
- Probleem bij installatie op Samsung N310:



ICP Permit
Webmail
Newsletters
Support

