Hypfer / Cybele

BLE to MQTT Gateway for Smarthome and IoT Devices
Apache License 2.0
112 stars 16 forks source link

Failed to connect to Mi Kettle - Software caused connection abort #19

Open carbolymer opened 3 years ago

carbolymer commented 3 years ago

I've cloned the repo, done npm install, added dbus config, configured cybele as follows, using token obtained via https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor:

% cat config.json 
{
  "mqtt": {
    "url": "mqtt://localhost"
  },
  "dongles": [
    {
      "hciDevice": "hci0",
      "mode": "le",
      "services": [],
      "devices": [
        {
          "type": "MiKettleDevice",
          "friendlyName": "Mi Kettle",
          "mac": "kettle mac",
          "productId": 1116,
          "token": [255,255 ... - token ]
        }
      ]
    }
  ]
}

And I'm getting the following errors:

% node app.js
Connected to MQTT Broker
Startup complete
Mi Kettle {
  message: 'Failed to connect to Mi Kettle',
  error: 'Software caused connection abort'
} while connecting
Disconnected from Mi Kettle
Mi Kettle {
  message: 'Failed to connect to Mi Kettle',
  error: 'Software caused connection abort'
} while connecting
Disconnected from Mi Kettle
Mi Kettle {
  message: 'Failed to connect to Mi Kettle',
  error: 'Software caused connection abort'
} while connecting
Disconnected from Mi Kettle

from bluetoothd:

bluetoothd[416]: src/device.c:load_gatt_db() No cache for kettle:mac
bluetoothd[416]: src/device.c:load_gatt_db() No cache for kettle:mac

btmgmt says:

hci0 kettle:mac type LE Public connected eir_len 21
hci0 kettle:mac type LE Public disconnected with reason 0

Any ideas what's wrong?

Hypfer commented 3 years ago

Try reducing the distance to the kettle

RestOp commented 3 years ago

The same problem. It is 30 cm near the NUC