PyPush icon indicating copy to clipboard operation
PyPush copied to clipboard

RemoteError: 0x023B: Unacceptable Connection Interval on RPi 3 w/ Bluegiga

Open Undo1 opened this issue 7 years ago • 0 comments

I'm able to get the web UI up, and it worked (though unstable) using PyBlueZ. I bought a Bluegiga adapter to attempt to get increased stability, but it's not pairing. Sequence of events:

  1. Clear everything from _tmp except bower_components

  2. Clear the existing pair on my Microbot from my phone (my phone pairs with it fine) using the power up / red light / hold button procedure.

  3. Run:

    ./bin/serve.sh --ble_driver bluegiga --ble_device /dev/serial/by-id/usb-Bluegiga_Low_Energy_Dongle_1-if00 web_ui
    

    Note the nonstandard ble_device path - it's the only place I could find my Bluegiga adapter.

  4. Observe promising output along these lines:

2017-07-24 15:02:25,463 main              line:74   INFO     ====== PyPush is starting =====
2017-07-24 15:02:25,480 main              line:78   INFO     ===== App created =====
2017-07-24 15:02:25,554 api               line:843  INFO     RSP-GAP Set Mode: [OK]
2017-07-24 15:02:25,555 api               line:756  INFO     RSP-Connection Disconnect - Connection:0 - [Not Connected]
2017-07-24 15:02:25,559 api               line:756  INFO     RSP-Connection Disconnect - Connection:1 - [Not Connected]
2017-07-24 15:02:25,563 api               line:756  INFO     RSP-Connection Disconnect - Connection:2 - [Not Connected]
2017-07-24 15:02:25,566 api               line:756  INFO     RSP-Connection Disconnect - Connection:3 - [Not Connected]
2017-07-24 15:02:25,570 api               line:756  INFO     RSP-Connection Disconnect - Connection:4 - [Not Connected]
2017-07-24 15:02:25,574 api               line:756  INFO     RSP-Connection Disconnect - Connection:5 - [Not Connected]
2017-07-24 15:02:25,578 api               line:756  INFO     RSP-Connection Disconnect - Connection:6 - [Not Connected]
2017-07-24 15:02:25,582 api               line:756  INFO     RSP-Connection Disconnect - Connection:7 - [Not Connected]
2017-07-24 15:02:25,587 api               line:852  INFO     RSP-GAP End Procedure: [Device in Wrong State]
2017-07-24 15:02:25,588 api               line:909  INFO     RSP-Hardware Set TX Power
2017-07-24 15:02:25,590 api               line:677  INFO     RSP-System Address Get - E1092E0F6B88
2017-07-24 15:02:25,608 api               line:846  INFO     RSP-GAP Discover: [OK]
2017-07-24 15:02:25,611 api               line:1026 INFO     EVT-GAP Scan Response - RSSI:-79 - Packet Type:2 - Sender:11:5b:96:c9:05:61 - Address Type:1 - Bond:255 - Data:1EFF06000109200094D860C1A830CA95F6F2C041C41A70A3706B8FE94DB777
2017-07-24 15:02:25,706 api               line:1026 INFO     EVT-GAP Scan Response - RSSI:-51 - Packet Type:0 - Sender:c2:09:05:ca:dd:d4 - Address Type:1 - Bond:255 - Data:0319000002010605030F180A1809096D69622D70757368
2017-07-24 15:02:25,720 api               line:1026 INFO     EVT-GAP Scan Response - RSSI:-85 - Packet Type:2 - Sender:11:5b:96:c9:05:61 - Address Type:1 - Bond:255 - Data:1EFF06000109200094D860C1A830CA95F6F2C041C41A70A3706B8FE94DB777
2017-07-24 15:02:25,727 _internal         line:87   INFO      * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
2017-07-24 15:02:25,800 api               line:1026 INFO     EVT-GAP Scan Response - RSSI:-49 - Packet Type:0 - Sender:c2:09:05:ca:dd:d4 - Address Type:1 - Bond:255 - Data:0319000002010605030F180A1809096D69622D70757368
2017-07-24 15:02:25,802 api               line:1026 INFO     EVT-GAP Scan Response - RSSI:-55 - Packet Type:0 - Sender:c2:09:05:ca:dd:d4 - Address Type:1 - Bond:255 - Data:0319000002010605030F180A1809096D69622D70757368
2017-07-24 15:02:25,811 api               line:1026 INFO     EVT-GAP Scan Response - RSSI:-87 - Packet Type:2 - Sender:11:5b:96:c9:05:61 - Address Type:1 - Bond:255 - Data:1EFF06000109200094D860C1A830CA95F6F2C041C41A70A3706B8FE94DB777
2017-07-24 15:02:26,013 api               line:1026 INFO     EVT-GAP Scan Response - RSSI:-52 - Packet Type:0 - Sender:c2:09:05:ca:dd:d4 - Address Type:1 - Bond:255 - Data:0319000002010605030F180A1809096D69622D70757368
  1. Click 'pair' in the web interface for my Microbot (which shows up).

  2. Solid blue light on Microbot, no color changes and no apparent reaction to pressing capacitive button.

  3. Many seconds later (30+), this error:

2017-07-24 15:03:17,084 api               line:792  INFO     RSP-Attribute Client Find Information: [Not Connected] (0)
2017-07-24 15:03:17,088 daemon            line:64   ERROR    Traceback (most recent call last):
  File "PyPush/core/ble/daemon.py", line 60, in step
    actionResult = self._callAction(uuid, cmd, args, kwargs)
  File "PyPush/core/ble/daemon.py", line 130, in _callAction
    for colour in mb.pair():
  File "PyPush/lib/microbot/microbot.py", line 152, in pair
    conn = self._bleApi.connect(self._bleMb)
  File "PyPush/lib/ble/bgapi/api.py", line 51, in connect
    conn._open() # pylint: disable=W0212
  File "PyPush/lib/ble/bgapi/connection.py", line 267, in _open
    self._bleConn = self._initBleConnection(conn)
  File "PyPush/lib/ble/bgapi/connection.py", line 295, in _initBleConnection
    conn.find_all_information(timeout=120)
  File "PyPush/lib/ble/bgapi/libLock.py", line 43, in _wrapper_
    return _realAttr(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/bgapi/module.py", line 316, in _wrapper_
    return fn(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/bgapi/module.py", line 439, in find_all_information
    self._api.ble_cmd_attclient_find_information(self.handle, 0x0001, 0xFFFF)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/usr/local/lib/python2.7/dist-packages/bgapi/module.py", line 285, in procedure_call
    raise RemoteError(handle.result)
RemoteError: 0x023B: Unacceptable Connection Interval

... which repeats itself on the retry cycle.

Any thoughts?

PyPush on master (6d5f46)

Undo1 avatar Jul 24 '17 15:07 Undo1