keton / noble_base

Typescript compatible Noble base class for manipulating BLE peripheral devices
MIT License
2 stars 0 forks source link

Getting 'Command Disallowed (0xc)' when scanning #3

Open RasmusKjeldgaard opened 5 years ago

RasmusKjeldgaard commented 5 years ago

Hi

Thanks for making noble TypeScript compatible!

I have recently been trying to implement this on a Raspberry Pi 3B+. When I run the simple scanner example, I get 'connectAndSetup error:Error: Command Disallowed (0xc)'.

As per the noble docs (https://github.com/noble/noble), this is because some BLE adapters cannot connect to a peripheral while they are scanning.

It should be fixed by stopping the scan, when trying to connect. Is it possible to look into this issue?

keton commented 5 years ago

I don't have hardware that is able to run Noble right now. But you sound like you know what's wrong and how to fix it. Pull request welcome :)

RasmusKjeldgaard commented 5 years ago

Cool, have forked your project but am still trying to figure out how this is best done. Will get back to you if I figure it out :)