Skip to content

Fails to connect and advertise together #20

@tautology0

Description

@tautology0

When running mac_adv it all seems to work, goes through initialising, but then falls in a great big heap with a "Command Disallowed" error when it gets to advertising. ws-slave appears to connect to the device and then immediately disconnects.

Gattacker is advertising (I can see it from my phone), but it loses its connection to the device.

Output from mac_adv:

[root@mictlan gattacker]# ./mac_adv -a devices/3ca308c1aaa3_BS01.adv.json
Advertise with cloned MAC address
Ws-slave address: 127.0.0.1
peripheralid: 3ca308c1aaa3
advertisement file: devices/3ca308c1aaa3_BS01.adv.json
EIR: 02010609ff01023ca308c1aaa30302e7fe
scanResponse: 050942533031051250002003020a00
on open
poweredOn
Noble MAC address : 3c:a3:08:c1:aa:a3
BLENO - on -> stateChange: poweredOn
initialized !
Static - start advertising
on -> advertisingStart: error Error: Command Disallowed
Adv error  Error: Command Disallowed
    at Gap.onHciLeAdvertiseEnableSet (/home/dave/node_modules/gattacker/lib/bleno/lib/hci-socket/gap.js:201:15)
    at emitOne (events.js:116:13)
    at Hci.emit (events.js:211:7)
    at Hci.processCmdCompleteEvent (/home/dave/node_modules/gattacker/lib/bleno/lib/hci-socket/hci.js:539:10)
    at Hci.onSocketData (/home/dave/node_modules/gattacker/lib/bleno/lib/hci-socket/hci.js:427:12)
    at emitOne (events.js:116:13)
    at BluetoothHciSocket.emit (events.js:211:7)

Output from ws-slave:

ws -> send: {"type":"stopScanning"}
ws -> send: {"type":"initialized","peripheralId":"3ca308c1aaa3"}
ws -> send: {"type":"connect","peripheralId":"3ca308c1aaa3"}
ws -> send: {"type":"disconnect","peripheralId":"3ca308c1aaa3"}
ws -> send: {"type":"initializeStatus","peripheralId":"3ca308c1aaa3","status":"waiting with reconnect to target device for client connection to bleno..."}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions