modified bluetooth modules to fix bugs in code generation. Fixed tests