11

Reading this question I sarted to wonder, whether it would be possible to not only let a program emulate a bluetooth device, but also let the (executing) computer think, that it is actually an external bluetooth device he'd be communicating with.

I looked into bluez and documentation concerning bluez, but couldn't find anything allowing me to feed bluetooth data to the device/computer or let the computer "discover" services running on himself.

Is this even possible using Linux/bluez?

Community
  • 1
  • 1
Sim
  • 4,199
  • 4
  • 39
  • 77

1 Answers1

1

If you build a local version of BlueZ and use the switch --enable-testing it builds an emulator for testing.

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/README#n218

This would create 2 extra BLE adapters than can communicate with each other without going over the air:

sudo ./emulator/btvirt -l2

Same for br/edr:

sudo emulator/btvirt -B -l2

ukBaz
  • 6,985
  • 2
  • 8
  • 31