Bettercap: ble.enum only works one time per execution

Created on 9 Mar 2018  Â·  1Comment  Â·  Source: bettercap/bettercap

Prerequisites

:+1:

Description

When I update the package to the latest dev version (go get -u github.com/bettercap/bettercap) I can perform ble.enum without a problem... _once_.

When I go to run a second (and 3rd, 4th, 5th, etc.) enumeration, it has _never_ worked. I always get [sys.log] [inf] Device disconnected, restoring BLE discovery. However, when I go get -u github.com/bettercap/bettercap then I can:

$ bettercap
>> net.recon off
>> ble.recon on
>> ble.show # get an address
>> ble.enum MAC
DISPLAY ENUM RESULTS (victory dance)
>> ble.show # get a new address
>> ble.enum 2nd time, 3rd time, 4th time...
>> [sys.log] [inf] Device disconnected, restoring BLE discovery.

Likewise, _if_ I run bettercap with -debug, then _once_ per launch I can perform ble.enum.

Environment

  • Bettercap dev version (as of commit 68167b3f7cfe4208f42fa52481e538774a15b392)
  • Antergos x86_64
  • go version go1.10 linux/amd64
  • ble.recon; ble.enum
  • No debug output, only [sys.log] [inf] Device disconnected, restoring BLE discovery.

Steps to Reproduce

$ bettercap
>> net.recon off; ble.recon on
>> ble.show # get address
>> ble.enum MAC
>> ble.enum OTHER_MAC # doesn't work
>> q
$ go get -u github.com/bettercap/bettercap 
# perform all steps above... it works!
$ bettercap -debug # perform all steps above, and it works... once!
>> q
$ bettercap -debug # perform all steps above, and it works... once!

Expected behavior: What you expected to happen
ble.enum each launch, at every invocation

Actual behavior: What actually happened
ble.enum works once per installation with bettercap or once per launch via bettercap -debug

--

♥ ANY INCOMPLETE REPORT WILL BE CLOSED RIGHT AWAY ♥

bug help wanted

Most helpful comment

Yeah this is an issue with the bettercap/gatt library I already was aware of, for some reason once you start the enumeration the process can't start another one ... will try to fix it somehow :)

>All comments

Yeah this is an issue with the bettercap/gatt library I already was aware of, for some reason once you start the enumeration the process can't start another one ... will try to fix it somehow :)

Was this page helpful?
0 / 5 - 0 ratings