crownstone / crownstone-homey

Integration with Homey
https://www.athom.com/
MIT License
3 stars 6 forks source link

Connection fails #2

Closed mrquincle closed 5 years ago

mrquincle commented 5 years ago

The connection with a peripheral - that the Homey scanned before itself - does fail

Connect to Crownstone
BleAdvertisement {
  domain: null,
  _events: { __log: [Function], __error: [Function] },
  _eventsCount: 2,
  _maxListeners: undefined,
  __peripheral: null,
  __client: { emit: [Function: emit] },
  id: 'faea6749a334',
  uuid: 'faea6749a334',
  address: 'fa:ea:67:49:a3:34',
  addressType: 'random',
  connectable: true,
  localName: undefined,
  manufacturerData: <Buffer 4c 00 02 15 2f 4b 5f 01 ee b9 47 ae 95 0b 55 b8 27 c1 a7 9d 6a 10 ce 1b c4>,
  serviceData: [],
  serviceUuids: [],
  rssi: -72 }
BleHandler: Call now peripheral.connect
2019-07-15 17:47:43 [log] [ManagerBLE] [BlePeripheral] [faea6749a334] Warning: This peripheral has been automatically disconnected because it hasn't been used in the last 60s.

It is at least stated as "connectable", so that is good. No clue yet why it doesn't go through.

mrquincle commented 5 years ago

This takes too much time now.

Error has been reported at the homey community. It might still be something w.r.t. the connectable/nonconnectable messages due to the fact that it's currently tested with a Crownstone Zero plug (first edition).

Strategy for now, wait till the smartphone app runs (this week).

mrquincle commented 5 years ago

Checked with the new Crownstone app and a dev. board as dummy Crownstone plug. It's possible to see all incoming requests. There are none from the Homey app. Hence, peripheral.connect as on https://apps.developer.athom.com/BlePeripheral.html#connect doesn't return.

Ah, the syntax did change. Now peripheral.connect does not take callback functions anymore, but it's defined using promises (or rather await/async syntax).