Have you tried:
Also try resetting the SMC and NVRAM
Do you have a USB KB and pointing device to help troubleshooting?
I was having similar problems with my wireless keyboard connected to my Mac Air. The problems started when I replaced the batteries for the KB. It would find the keyboard but fail in pairing repeatedly. Even as I typed the pairing code on the keyboard, it would say that the pairing failed..
I looked on this forum and could not find a solution. Finally, I removed the batteries on the keyboard and shutdown and restarted the Mac, and then added back the batteries on the keyboard and finally the Mac discovered and paired the keyboard successfully!!