0

I'm not really advanced with linux but this seems like a beginner problem I can't solve.

I'm running this on a Raspberrypi Zero W running Raspbian OS.

I have a controller ( BLE controller running Zephyr hci_usb sample ) and it only works with a couple bluetooth services but not some others.

Here are the results I'm getting when I'm trying to find it and if I can scan with it:

hciconfig ( no BD address )

$ hciconfig
  hci0:   Type: Primary  Bus: USB
    BD Address: 00:00:00:00:00:00  ACL MTU: 27:7  SCO MTU: 0:0
    UP RUNNING
    RX bytes:1593 acl:0 sco:0 events:88 errors:0
    TX bytes:285 acl:0 sco:0 commands:51 errors:0

bluetoothctl ( has a BD address ) Scan does work

$ sudo bluetoothctl
  Agent registered
  [bluetooth]# list
  Controller EB:XX:XX:XX:XX:XX BlueZ 5.50 [default]

btmgmt ( finds the controller ) Scan does work

 $ sudo btmgmt --index 0
   [hci0]# auto-power
   Found controller with index 0
   [hci0]# find -l

hcitool ( Doesn't find the controller ) Scan doesn't work

$ hcitool scan
  Scanning ...
  Inquiry failed: Operation not supported

btmon

$ sudo btmon
  Bluetooth monitor ver 5.50
  = Note: Linux version 5.10.60+ (armv6l)                                     0.605127
  = Note: Bluetooth subsystem version 2.22                                    0.605143
  = New Index: 00:00:00:00:00:00 (Primary,USB,hci0)                    [hci0] 0.605152
  = Open Index: 00:00:00:00:00:00                                      [hci0] 0.605156
  = Index Info: 00:00:00:00:00:00 (not assigned)                       [hci0] 0.605163
  @ MGMT Open: bluetoothd (privileged) version 1.18                  {0x0001} 0.605171
  @ MGMT Open: btmon (privileged) version 1.18

bettercap ( can't even use it but is my most important need at the moment, please help )

>> ble.recon on
   panic: runtime error: slice bounds out of range [:1] with capacity 0

   goroutine 1 [running]:
   github.com/bettercap/gatt/linux/cmd.(*Cmd).SendAndCheckResp(0x1c637c0, 0xa0c760, 0x1c64fe8, 0x1c6501c, 0x1, 0x1, 0x0, 0x0)
    /home/pi/go/pkg/mod/github.com/bettercap/gatt@v0.0.0-20210514133428-df6e615f2f67/linux/cmd/cmd.go:98 +0x1b4
   github.com/bettercap/gatt/linux.(*HCI).resetDevice(0x18ac0a0, 0x93dc10, 0x18ac0a0)
    /home/pi/go/pkg/mod/github.com/bettercap/gatt@v0.0.0-20210514133428-df6e615f2f67/linux/hci.go:273 +0x2f0
   github.com/bettercap/gatt/linux.NewHCI(0xffffffff, 0x184fd01, 0xff, 0x2, 0x0, 0x0)
    /home/pi/go/pkg/mod/github.com/bettercap/gatt@v0.0.0-20210514133428-df6e615f2f67/linux/hci.go:90 +0x4c0
   github.com/bettercap/gatt.NewDevice(0x184fd1c, 0x2, 0x2, 0x3c, 0x184fd24, 0x1, 0x1)
    /home/pi/go/pkg/mod/github.com/bettercap/gatt@v0.0.0-20210514133428-df6e615f2f67/device_linux.go:57 +0x114
   github.com/bettercap/bettercap/modules/ble.(*BLERecon).Configure(0x18a2780, 0x0, 0x4)
    /home/pi/go/pkg/mod/github.com/bettercap/bettercap@v2.24.1+incompatible/modules/ble/ble_recon.go:165 +0x1cc
   github.com/bettercap/bettercap/modules/ble.(*BLERecon).Start(0x18a2780, 0x1, 0x1b2c001)
    /home/pi/go/pkg/mod/github.com/bettercap/bettercap@v2.24.1+incompatible/modules/ble/ble_recon.go:183 +0x1c
   github.com/bettercap/bettercap/modules/ble.NewBLERecon.func1(0x0, 0x0, 0x0, 0x84f358, 0xc)
    /home/pi/go/pkg/mod/github.com/bettercap/bettercap@v2.24.1+incompatible/modules/ble/ble_recon.go:56 +0x1c
   github.com/bettercap/bettercap/session.(*ModuleHandler).Exec(0x1b2c0c0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/pi/go/pkg/mod/github.com/bettercap/bettercap@v2.24.1+incompatible/session/module_handler.go:74 +0x80
   github.com/bettercap/bettercap/session.(*Session).Run(0x18fb2c0, 0x1c64e30, 0xc, 0x1, 0x1)
    /home/pi/go/pkg/mod/github.com/bettercap/bettercap@v2.24.1+incompatible/session/session.go:416 +0x284
   main.main()
    /home/pi/go/pkg/mod/github.com/bettercap/bettercap@v2.24.1+incompatible/main.go:94 +0x8c8

At that point I don't know what to do.

Thank you so much for your help.

0

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.