TrentSeed / BMW_E46_Android_RPi_IBUS_Controller

"Appify" your E46 BMW with a Raspberry Pi and your smartphone! Nexus 7 in dash, connected to Raspberry Pi (via Bluetooth), which is connected to IBUS (via USB Adapter). Supports Android Wear 4.4W w/ full voice commands!
85 stars 26 forks source link

No connection to RPi and Error while running #28

Open leschi opened 4 years ago

leschi commented 4 years ago

Hello, i tried running this Code on a Raspberry Pi Zero W. Sadly afte the start, i gat an error (See below). Do you have any Idea how i could fix it?

2019-07-18 15:48:54,657 [ERROR] [bt.py] [76] [ERROR] failed to advertise service Traceback (most recent call last): File "/home/pi/.local/lib/python3.5/site-packages/bluetooth/bluez.py", line 240, in advertise_service protocols) _bluetooth.error: (2, 'No such file or directory')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pi/controller/connected_car_controller/interfaces/bt.py", line 73, in listen_for_rfcomm_connection profiles=[SERIAL_PORT_PROFILE] File "/home/pi/.local/lib/python3.5/site-packages/bluetooth/bluez.py", line 242, in advertise_service raise BluetoothError (str (e)) bluetooth.btcommon.BluetoothError: (2, 'No such file or directory') 2019-07-18 15:48:56,684 [INFO] [ibus.py] [110] bus dump: hex: 'd007bf5cfeffff00ca' 2019-07-18 15:48:56,690 [ERROR] [ibus.py] [149] invalid packet : {'data': bytearray(b'\\xfe\xff\xff\x00'), 'timestamp': 1563457736, 'xor_checksum': bytearray(b'\xca'), 'source_id': 208, 'raw': bytearray(b'\xd0\x07\xbf\\xfe\xff\xff\x00\xca'), 'length': 7, 'destination_id': 191} 2019-07-18 15:48:56,700 [ERROR] [bt.py] [150] error: send() was called but state is not connected 2019-07-18 15:49:06,720 [INFO] [ibus.py] [110] bus dump: hex: '800cff24010031353a3438202064' 2019-07-18 15:49:06,725 [ERROR] [ibus.py] [149] invalid packet : {'data': bytearray(b'$\x01\x0015:48 '), 'timestamp': 1563457746, 'xor_checksum': bytearray(b'd'), 'source_id': 128, 'raw': bytearray(b'\x80\x0c\xff$\x01\x0015:48 d'), 'length': 12, 'destination_id': 255} 2019-07-18 15:49:06,735 [ERROR] [bt.py] [150] error: send() was called but state is not connected 2019-07-18 15:49:11,748 [INFO] [ibus.py] [110] bus dump: hex: 'd007bf5cfeffff00ca' 2019-07-18 15:49:11,753 [ERROR] [ibus.py] [149] invalid packet : {'data': bytearray(b'\\xfe\xff\xff\x00'), 'timestamp': 1563457751, 'xor_checksum': bytearray(b'\xca'), 'source_id': 208, 'raw': bytearray(b'\xd0\x07\xbf\\xfe\xff\xff\x00\xca'), 'length': 7, 'destination_id': 191} 2019-07-18 15:49:11,760 [ERROR] [bt.py] [150] error: send() was called but state is not connected 2019-07-18 15:49:23,785 [INFO] [ibus.py] [110] bus dump: hex: 'd008bf5b01000000003d' 2019-07-18 15:49:23,791 [ERROR] [ibus.py] [149] invalid packet : {'data': bytearray(b'[\x01\x00\x00\x00\x00'), 'timestamp': 1563457763, 'xor_checksum': bytearray(b'='), 'source_id': 208, 'raw': bytearray(b'\xd0\x08\xbf[\x01\x00\x00\x00\x00='), 'length': 8, 'destination_id': 191} 2019-07-18 15:49:23,801 [ERROR] [bt.py] [150] error: send() was called but state is not connected 2019-07-18 15:49:26,816 [INFO] [ibus.py] [110] bus dump: hex: 'd007bf5cfeffff00ca'

TrentSeed commented 4 years ago

Hi Leschi -- Thanks for reaching out about this issue. Looking at your logs, it appears the issue is related to the bluetooth SDP connectivity.

Please try running bluetoothd in compatibility mode and let me know if you're still seeing this issue. https://github.com/pybluez/pybluez/issues/161#issuecomment-335687644

leschi commented 4 years ago

Now it works perfekt, Thanks for your help !