1

I'm developing an Android app that captures Bluetooth LE signals and I'm a big fan of test driven and behaviour driven development. So, I want to develop my app by using TDD and BDD. When it comes to TDD it is no problem to test the bluetooth part with Robolectric. But, when I want to write my behaviour driven tests, I can not test bluetooth because the android emulator does not support bluetooth in any way.

So, I thought it must be possible to simulate a Bluetooth LE device in software which forwards simulated Bluetooth broadcast packages to an Android X86 running in a virtual machine.

Do you have any pointers to implement that? I'm thinking about a small user space program which receives simulated Bluetooth signals from my BDD framework over TCP and then forwards those signals to the simulated device. Then the device forwards them to the Android X86 VM and the Android app catches and processes the signals.

This post seemed promising but did not work. Qemu can emulate Bluetooth hardware but it supports only Bluetooth keyboard.

I don't want to use any hardware because our CI system runs in a docker container on a server. I do not have any access to the server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.