GithubHelp home page GithubHelp logo

ble-ancs's People

Contributors

robotastic avatar sander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ble-ancs's Issues

Unexpected disconnect

Seems like ble-ansc is still the only possible way to get ANCS on raspberry. Got the script working and I can connect to the BLE device but after a few moments it just disconnects or with LightBlue I get an connection Alert Timeout interrogating the peripheral.
consol log:
Bleno: Handle: 68 UUID: 7069df31ed53 address 70:69:... on -> accept: Recieved a Pairing Request Hande:68 uuid: 7069df31ed53 Got a disconnect Got a disconnect Got a disconnect Got a disconnect Able: unknown peripheral 70:69:df:.. disconnected!
Is this a problem with iOS 9 or a configuration problem? Is this project still working?

Bluetooth powers off after encryptChange

I’ve bought a Bluetooth USB dongle to try ble-ancs in a Linux virtual machine on my Mac. Directly after the encryptChange event the hci0 device powers off. Before starting, I made sure bluetoothd has run and quit, and hciconfig showed that hci0 was up. After the power-off, hciconfig shows hci0 as being down and hcidump automatically quits. Below are my logs, any idea what could be wrong?

My config:

  • König CSBLUEKEY200 (listed in Compatible devices)
  • Ubuntu 14.04.3, 64-bit
  • VirtualBox 5.0.8 with Extension Pack, USB 2.0 enabled
  • iOS 9.1
$ node examples/test
on -> stateChange: poweredOn
on -> advertisingStart: success
Bleno: Handle: 68 UUID: 64f95443f4f9 address 64:f9:54:43:f4:f9
on -> accept: 
Recieved a Pairing Request
able encryptChange!!!
on -> stateChange: poweredOff

Full hcidump before exiting:

HCI sniffer - Bluetooth packet analyzer ver 2.5
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff
> HCI Event: Command Complete (0x0e) plen 4
    Set Event Mask (0x03|0x0001) ncmd 1
    status 0x00
> HCI Event: Command Complete (0x0e) plen 4
    LE Set Event Mask (0x08|0x0001) ncmd 1
    status 0x00
> HCI Event: Command Complete (0x0e) plen 12
    Read Local Version Information (0x04|0x0001) ncmd 1
    status 0x00
    HCI Version: 4.0 (0x6) HCI Revision: 0x22bb
    LMP Version: 4.0 (0x6) LMP Subversion: 0x22bb
    Manufacturer: Cambridge Silicon Radio (10)
> HCI Event: Command Complete (0x0e) plen 10
    Read BD ADDR (0x04|0x0009) ncmd 1
    status 0x00 bdaddr 00:1A:7D:DA:71:04
> HCI Event: Command Complete (0x0e) plen 4
    LE Set Scan Enable (0x08|0x000c) ncmd 1
    status 0x0c
    Error: Command Disallowed
> HCI Event: Command Complete (0x0e) plen 4
    LE Set Scan Parameters (0x08|0x000b) ncmd 1
    status 0x00
> HCI Event: Command Complete (0x0e) plen 4
    LE Set Scan Response Data (0x08|0x0009) ncmd 1
    status 0x00
> HCI Event: Command Complete (0x0e) plen 4
    LE Set Advertising Data (0x08|0x0008) ncmd 1
    status 0x00
> HCI Event: Command Complete (0x0e) plen 4
    LE Set Advertise Enable (0x08|0x000a) ncmd 1
    status 0x00
> HCI Event: Command Complete (0x0e) plen 6
    LE Long Term Key Request Reply (0x08|0x001a) ncmd 1
> HCI Event: Encrypt Change (0x08) plen 4
    status 0x00 handle 68 encrypt 0x01
device: disconnected

My dmesg logs after several attempts, probably including the automatic power-offs and me running sudo start bluetooth, waiting, and running sudo stop bluetooth:

[  225.874987] usb 2-2: USB disconnect, device number 3
[  229.706650] usb 2-2: new full-speed USB device number 4 using ohci-pci
[  229.986997] usb 2-2: New USB device found, idVendor=0a12, idProduct=0001
[  229.987002] usb 2-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[  229.987004] usb 2-2: Product: CSR8510 A10
[  260.126888] hrtimer: interrupt took 1147412 ns
[  792.258649] usb 2-2: USB disconnect, device number 4
[  796.072173] usb 2-2: new full-speed USB device number 5 using ohci-pci
[  796.352900] usb 2-2: New USB device found, idVendor=0a12, idProduct=0001
[  796.352904] usb 2-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[  796.352906] usb 2-2: Product: CSR8510 A10
[  944.772931] usb 2-2: USB disconnect, device number 5
[  948.267545] sched: RT throttling activated
[  948.604987] usb 2-2: new full-speed USB device number 6 using ohci-pci
[  948.885637] usb 2-2: New USB device found, idVendor=0a12, idProduct=0001
[  948.885641] usb 2-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[  948.885643] usb 2-2: Product: CSR8510 A10
[ 1099.810795] usb 2-2: USB disconnect, device number 6
[ 1099.811419] Bluetooth: hci0 sending frame failed (-19)
[ 1099.812081] Bluetooth: hci0 sending frame failed (-19)
[ 1103.637618] usb 2-2: new full-speed USB device number 7 using ohci-pci
[ 1103.914310] usb 2-2: New USB device found, idVendor=0a12, idProduct=0001
[ 1103.914314] usb 2-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 1103.914316] usb 2-2: Product: CSR8510 A10

Phone asks pairing code at connecting

Hi,

Really like the project, want to integrate the function in my CarPC ( raspberry).

When I run a test service, and connect my phone to the ANBR!Tusk Bluetooth device, the phone asks a code. When I try something, or just null, the service reply's disconnected.

Can anyone push me in the right direction to get it woking?

on -> stateChange: poweredOn
on -> advertisingStart: success
Bleno: Handle: 64 UUID: 77ca0d4ba34b address 77:ca:0d:4b:00:00
on -> accept:
Recieved a Pairing Request
Hande:64 uuid: 77ca0d4b0000
Got a disconnect
Got a disconnect
Got a disconnect
Able: unknown peripheral 77:ca:0d:4b:00:00 disconnected!

Thanks!

Getting Started

I am having trouble getting the any of the examples working. I have tried off and on for the last few days and have had little success.

when a run node test.js I receive the following:
on -> stateChanged: poweredOn
on -> advertisingStart: success

I am running Ubuntu 16.04 LTS in a Virtual Box on top of OSX. I have been taking control of the Bluetooth adapter in the Virtual Box and have tried stopping the Bluetooth service at various states with no success.

I am excited at the possibilities of using this library and would love to contribute a "Getting Started" guide back if someone would be willing to help me get setup. Thank you in advanced.

Unable to Connect

Hello,

Im trying to connect with the Raspberry Pi 2 with bluetooth dongle. I'm shutting down bluetooth with sudo service bluetooth stop
And starting the example test.js app with node. If i'm trying to connect with my smartphone, i'm getting a timeout error and my raspi only showing up logs to this point:

on -> stateChange: poweredOn
on -> advertisingStart: success
Bleno: Handle: 69 UUID: 63814bf461cf address 63:81:4b:f4:61:cf
on -> accept:
Recieved a Pairing Request

Do you have any suggestions? Thanks a lot....

Simultaneous connection with ANCS and other peripherals

I’m trying to use ble-ancs to connect to my iPhone for ANCS, to my heart rate sensor, and to an UART device (Bluefruit Micro) from one Node script. Both the sensor and the UART device are BLE peripherals. Before I spend hours trying to make it work, should this be possible in ble-ancs / able already?

[edit: removed irrelevant example, will update if I have a clearer example]

OS X support

One advantage of sandeepmistry/node-ancs is that the same code works on OS X and on Linux. This allows for developing on an OS X system while testing / deploying on an embedded Linux system. What would it take to add OS X compatibility (possibly through a different BLE library) to ble-ancs?

Encrypt change called before Accept

Here's what it looks like in console:

~/Documents/Coding/ble-ancs master 
❯ sudo node examples/test.js 
on -> stateChange: poweredOn
on -> advertisingStart: success
able encryptChange!!!
/home/paul/Documents/Coding/ble-ancs/index.js:45
  this._peripheral.findServiceAndCharacteristics(SERVICE_UUID, [], function(error, services, characteristics) {
                  ^

TypeError: Cannot read property 'findServiceAndCharacteristics' of undefined
    at BleAncs.discoverServicesAndCharacteristics (/home/paul/Documents/Coding/ble-ancs/index.js:45:19)
    at BleAncs.onEncryptChange (/home/paul/Documents/Coding/ble-ancs/index.js:233:12)
    at emitNone (events.js:86:13)
    at Able.emit (events.js:185:7)
    at Able.onEncryptChange (/home/paul/Documents/Coding/ble-ancs/lib/able.js:90:10)
    at emitNone (events.js:86:13)
    at AbleBindings.emit (events.js:185:7)
    at AbleBindings.onEncryptChange (/home/paul/Documents/Coding/ble-ancs/lib/hci-socket/bindings.js:370:10)
    at emitTwo (events.js:106:13)
    at Hci.emit (events.js:191:7)

this._peripheral isn't set because the accept event hasn't been called yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.