You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Pi that's polling another device already on Bluetooth. When that process runs, it kills the vevor-ble-bridge instance. Is there a way to choose a specific bluetooth adpater? I've added an external adapter and assigned the other job to use that one, but this still fails when that process kicks off. I'm hoping I can pin each adapter to each process and they'll play nice.
There is a way, but it would require code modification. bluepy classes accept interface as an argument, in this case, as a third argument to Peripheral constructor, as per http://ianharvey.github.io/bluepy-doc/peripheral.html
So you'd need to modify this line:
and make it like: self.peripheral = Peripheral(mac_address, "public", 1) to use secondary adapter. I don't have multiple BT adapters, so I can't test it - it's on you :)
I have a Pi that's polling another device already on Bluetooth. When that process runs, it kills the vevor-ble-bridge instance. Is there a way to choose a specific bluetooth adpater? I've added an external adapter and assigned the other job to use that one, but this still fails when that process kicks off. I'm hoping I can pin each adapter to each process and they'll play nice.
vevor-ble-bridge_1 | 2024-11-15 03:55:02 +0000 [DEBUG] {'running_state': 0, 'error': 0, 'error_msg': 'No fault', 'running_step': 0, 'running_step_msg': 'Standby', 'altitude': 0, 'running_mode': 0, 'set_level': 1, 'set_temperature': None, 'supply_voltage': 0.0, 'case_temperature': 0, 'cab_temperature': 26, 'md': 3}
vevor-ble-bridge_1 | Traceback (most recent call last):
vevor-ble-bridge_1 | File "//./main.py", line 334, in
vevor-ble-bridge_1 | result = vdh.get_status()
vevor-ble-bridge_1 | ^^^^^^^^^^^^^^^^
vevor-ble-bridge_1 | File "/vevor.py", line 170, in get_status
vevor-ble-bridge_1 | return self._send_command(1, 0, 85)
vevor-ble-bridge_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vevor-ble-bridge_1 | File "/vevor.py", line 161, in _send_command
vevor-ble-bridge_1 | response = self.characteristic.write(
vevor-ble-bridge_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
vevor-ble-bridge_1 | File "/usr/local/lib/python3.11/site-packages/bluepy/btle.py", line 200, in write
vevor-ble-bridge_1 | return self.peripheral.writeCharacteristic(self.valHandle, val, withResponse)
vevor-ble-bridge_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vevor-ble-bridge_1 | File "/usr/local/lib/python3.11/site-packages/bluepy/btle.py", line 543, in writeCharacteristic
vevor-ble-bridge_1 | return self._getResp('wr')
vevor-ble-bridge_1 | ^^^^^^^^^^^^^^^^^^^
vevor-ble-bridge_1 | File "/usr/local/lib/python3.11/site-packages/bluepy/btle.py", line 407, in _getResp
vevor-ble-bridge_1 | resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
vevor-ble-bridge_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
vevor-ble-bridge_1 | File "/usr/local/lib/python3.11/site-packages/bluepy/btle.py", line 362, in _waitResp
vevor-ble-bridge_1 | raise BTLEDisconnectError("Device disconnected", resp)
vevor-ble-bridge_1 | bluepy.btle.BTLEDisconnectError: Device disconnected
The text was updated successfully, but these errors were encountered: