Bluetooth and wifi stopped working Yesterday suddenly the bluetooth and wifi stopped working, while iMac was on and on screen saver.
I have tried several restarts and tried to follow the bluetooth debug and reset options as well as SMC reset, but nothing worked. Also removed the bluetooth plist from Preferences.

Since I have magic keyboard and mouse with bluetooth I cannot use them and was making the restarts from anydesk using another laptop that I have.

Today after even more restarts and SMC resets the Wifi worked again, but bluetooth still nothing. I am on 10.13 osx and I cannot boot in safe mode or recovery without the keyboard and I have tried the vram boot options on terminal but I was getting that they were invalid.

Lately after the last SMC reset iMac boots on the option screen to reinstall High Sierra but I cannot make any selection even with a usb wired mouse!

any help on how to restart on normal mode or unblock the bluetooth will be highly appreciated.
Unfortunately, the AirPort adapter in your iMac has failed.

Your issue is is just like the issue in the question Mac Mini frequently loses connections (both Wi-Fi and Bluetooth) where the only difference is in that question, The problem was intermittent and yours appears to be permanent.

The AirPort adapter is just the mPCIe card that has a “combo” Bluetooth and WiFi chip (usually made by Broadcom).  Dell, HP, Asus and pretty much every manufacturer uses some variant of this chip/adapter.  That means this adapter is not very expensive.

However, since the iMac computers from 2012 on have the screen glued in place, the labor could be costly to change the part.  If this is the case, upgrade your hard disk to an SSD while it’s open.