I'm am seeing periodic crashes when device reconnects. If I turn BT off on my phone, and back on, everything works fine. However, if I walk far enough away that BT disconnects and then come back into BT coverage, sometimes it works, but other times I get this crash stack or similar:
bt_speaker.py[326]: ERROR:dbus.connection:Exception in handler for D-Bus signal:
bt_speaker.py[326]: Traceback (most recent call last):
bt_speaker.py[326]: File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 230, in maybe_handle_message
bt_speaker.py[326]: self._handler(*args, kwargs)
bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/interface.py", line 33, in signal_handler
bt_speaker.py[326]: self.user_callback(self.signal, self.user_arg, args)
bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/audio.py", line 511, in _property_change_event_handler
bt_speaker.py[326]: self._state_changed(new_properties[k], transport)
bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/audio.py", line 517, in _state_changed
bt_speaker.py[326]: self._acquire_media_transport(transport, 'r')
bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/audio.py", line 291, in _acquire_media_transport
bt_speaker.py[326]: (fd, read_mtu, write_mtu) = transport.acquire(access_type)
bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/media.py", line 166, in acquire
bt_speaker.py[326]: return self._interface.Acquire(access_type)
bt_speaker.py[326]: File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in call
bt_speaker.py[326]: return self._proxy_method(args, keywords)
bt_speaker.py[326]: File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in call
bt_speaker.py[326]: **keywords)
bt_speaker.py[326]: File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
bt_speaker.py[326]: message, timeout)
bt_speaker.py[326]: DBusException: org.bluez.Error.NotAuthorized: Operation Not Authorized
Sometimes I get the NotAuthorized error, but others times I get Input/Output Error. Either way, at this point my phone is connected to BT, and music is playing, but no sound to speakers. Only a re-boot will resolve this. I'm currently working around this by setting
ReconnectAttempts = 0
in /etc/bluetooth/main.conf
... but not an ideal solution, IMHO.
I'm am seeing periodic crashes when device reconnects. If I turn BT off on my phone, and back on, everything works fine. However, if I walk far enough away that BT disconnects and then come back into BT coverage, sometimes it works, but other times I get this crash stack or similar:
bt_speaker.py[326]: ERROR:dbus.connection:Exception in handler for D-Bus signal: bt_speaker.py[326]: Traceback (most recent call last): bt_speaker.py[326]: File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 230, in maybe_handle_message bt_speaker.py[326]: self._handler(*args, kwargs) bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/interface.py", line 33, in signal_handler bt_speaker.py[326]: self.user_callback(self.signal, self.user_arg, args) bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/audio.py", line 511, in _property_change_event_handler bt_speaker.py[326]: self._state_changed(new_properties[k], transport) bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/audio.py", line 517, in _state_changed bt_speaker.py[326]: self._acquire_media_transport(transport, 'r') bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/audio.py", line 291, in _acquire_media_transport bt_speaker.py[326]: (fd, read_mtu, write_mtu) = transport.acquire(access_type) bt_speaker.py[326]: File "/opt/bt-speaker/bt_manager/media.py", line 166, in acquire bt_speaker.py[326]: return self._interface.Acquire(access_type) bt_speaker.py[326]: File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in call bt_speaker.py[326]: return self._proxy_method(args, keywords) bt_speaker.py[326]: File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in call bt_speaker.py[326]: **keywords) bt_speaker.py[326]: File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking bt_speaker.py[326]: message, timeout) bt_speaker.py[326]: DBusException: org.bluez.Error.NotAuthorized: Operation Not Authorized
Sometimes I get the NotAuthorized error, but others times I get Input/Output Error. Either way, at this point my phone is connected to BT, and music is playing, but no sound to speakers. Only a re-boot will resolve this. I'm currently working around this by setting ReconnectAttempts = 0 in /etc/bluetooth/main.conf ... but not an ideal solution, IMHO.