Merged bluetooth code. Compile only.