virtualabs / btlejack

Bluetooth Low Energy Swiss-army knife
MIT License
1.88k stars 195 forks source link

Added __init__ before sniffing again after a connection loss. #37

Closed mh- closed 5 years ago

mh- commented 5 years ago

(Note: I tried to submit this pull request before, see https://github.com/virtualabs/btlejack/pull/33 - but then inadvertently reverted this change again in https://github.com/virtualabs/btlejack/pull/35 . So here I go again...)

I started to use btlejack on a Raspberry Pi 3 Model B+, which runs Raspbian Stretch Lite Version "November 2018", Release date 2018-11-13, Kernel version 4.14, with three micro:bit sniffers flashed to version 1.3.

Running btlejack -c xx:xx:xx:xx:xx:xx I found that it would always follow the first connection that I set up after the start, but after that connection was lost, most of the time, btlejack would not follow the next connection.

So I inserted a super().init call in on_connection_lost(), which solved this issue for me. btlejack now also follows all subsequent connections.

virtualabs commented 5 years ago

Solved by #43, in a much nicer way (root cause identified).