btproxy icon indicating copy to clipboard operation
btproxy copied to clipboard

Support for BT-LE?

Open ghost opened this issue 10 years ago • 4 comments

Any chance of supporting Bluetooth Low Energy? This seems like the perfect tool for reverse engineering the new BB-8 toy.

ghost avatar Oct 12 '15 03:10 ghost

Yes, BLE could be supported. This has been on my TODO list for a while, just a matter of finding the timer.

Since BLE is essentially a completely different protocol, a few days or week of work would be required. A similar approach taken with btproxy currently with regular Bluetooth protocol can be applied to BLE, it's just a matter of writing functionality for:

  • connecting/reconnecting
  • scanning
  • listening for data / sending data on arbitrarily configured sockets

With the later being the more complicated part. To put simply, regular Bluetooth applications set up a RFCOMM or L2CAP socket and they can easily be cloned or relayed. BLE on the other hand, doesn't do RFCOMM/L2CAP sockets for applications and instead uses a more specialized protocol GATT.

See the two stacks:

Regular Bluetooth

BLE

AFAIK, layers below L2CAP can be ignored.

So I see two ways about going about it.

  1. Take the current btproxy approach and emulate GATT sockets and relay data sent by each device in a GATT supported manner. This would be easier to setup for different platforms.
  2. Just relay traffic on L2CAP layer. But L2CAP is typically handled in a kernel module. So that may be too invasive to get working. Also I'm not sure how functional this approach would be yet.

I was planning to try the first approach when I got some free time down the road. If anyone is interested in helping out, that would be great.

There are some nice looking BLE libraries out there.

https://github.com/IanHarvey/bluepy https://github.com/sandeepmistry/noble https://github.com/sandeepmistry/bleno

conorpp avatar Oct 13 '15 21:10 conorpp

@conorpp what time btproxy support BLE?

piaca avatar Nov 26 '16 04:11 piaca

@piaca It probably won't. Check out btlejuice.

conorpp avatar Nov 26 '16 21:11 conorpp

@conorpp the btlejuice project so good, thank you

piaca avatar Nov 27 '16 03:11 piaca