Bluetooth SCO set state Block - Error

124 views
Skip to first unread message

Cenk Ozeren

unread,
Feb 13, 2020, 12:07:57 AM2/13/20
to Automate
Hi
I was using the "Bluetooth SCO set state" block to connect with my car BT SCO. However, after installing Android 10, it started to give the following error.

java.lang.IllegalStateException: Failed establish Bluetooth SCO connection: error

I was reading text in my car as text to speech. However, he is currently giving an error.

What am I missing?


Cenk Ozeren

unread,
Feb 13, 2020, 12:18:48 AM2/13/20
to Automate

02-12 21:43:53.256 I 3027@1: Flow beginning
02-12 21:43:53.258 I 3027@2: Bluetooth SCO set state
02-12 21:43:53.348 F 3027@2: java.lang.IllegalStateException: Failed establish Bluetooth SCO connection: error
02-12 21:43:53.355 I 3027@2: Stopped by failure


13 Şubat 2020 Perşembe 08:07:57 UTC+3 tarihinde Cenk Ozeren yazdı:

Henrik "The Developer" Lindqvist

unread,
Feb 13, 2020, 12:55:42 AM2/13/20
to Automate
Maybe BT is disabled?

Cenk Ozeren

unread,
Feb 13, 2020, 1:57:55 AM2/13/20
to Automate
No. 
BT is always active on my phone.

13 Şubat 2020 Perşembe 08:55:42 UTC+3 tarihinde Henrik "The Developer" Lindqvist yazdı:

Cenk Ozeren

unread,
Feb 13, 2020, 6:22:11 AM2/13/20
to Automate
Hi

Add Debug logging


02-13 14:20:12.882 I 3122@1: Flow beginning
02-13 14:20:12.883 I 3122@7: Bluetooth device connected?
02-13 14:20:12.890 U 3122@8: Connecting device: Mi True Wireless EBs Basic_R - type: 1048
02-13 14:20:12.890 I 3122@2: Bluetooth SCO set state
02-13 14:20:12.894 D 3122@2: BluetoothScoSetState startBluetoothSco
02-13 14:20:12.927 D 3122@2: BluetoothScoSetState ACTION_SCO_AUDIO_STATE_UPDATED: connecting
02-13 14:20:12.930 D 3122@2: BluetoothScoSetState ACTION_SCO_AUDIO_STATE_UPDATED: error
02-13 14:20:12.931 F 3122@2: java.lang.IllegalStateException: Failed establish Bluetooth SCO connection: error
02-13 14:20:12.943 I 3122@2: Stopped by failure




13 Şubat 2020 Perşembe 08:55:42 UTC+3 tarihinde Henrik "The Developer" Lindqvist yazdı:
Maybe BT is disabled?

Henrik "The Developer" Lindqvist

unread,
Feb 13, 2020, 10:40:41 PM2/13/20
to Automate
As a test, please use the Broadcast receive block with action="android.media.ACTION_SCO_AUDIO_STATE_UPDATED" and Use sticky option disabled, log the Extras output variable of that block, try toggling the SCO. What's does it log?

Cenk Ozeren

unread,
Feb 14, 2020, 3:07:42 PM2/14/20
to Automate
Hi
Are these the logs you want?

02-14 23:04:30.643 I 3162@1: Flow beginning
02-14 23:04:30.645 I 3162@8: Broadcast receive
02-14 23:04:35.391 U 3162@9: Action: android.media.ACTION_SCO_AUDIO_STATE_UPDATED Uri: Mime: array: extras:android.media.extra.SCO_AUDIO_PREVIOUS_STATE as Int: 0, android.media.extra.SCO_AUDIO_STATE as Int: 2
02-14 23:04:35.391 I 3162@0: Stopped at end

Henrik "The Developer" Lindqvist

unread,
Feb 14, 2020, 8:09:26 PM2/14/20
to Automate
Great. Please keep this flow running in a loop, while trying the Bluetooth SCO set state block. The SCO_AUDIO_STATE=2 means it's was still "connecting".

Cenk Ozeren

unread,
Feb 15, 2020, 4:49:40 PM2/15/20
to Automate
Thanks
I think it will work. I will try and give information.
Reply all
Reply to author
Forward
0 new messages