Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asking for help not an issue #51

Closed
StuartIanNaylor opened this issue Mar 1, 2020 · 2 comments
Closed

Asking for help not an issue #51

StuartIanNaylor opened this issue Mar 1, 2020 · 2 comments

Comments

@StuartIanNaylor
Copy link

Viktor I am trying to use a pi with a low cost bluetooth speaker / mic

Even after installing ofono and doing the usual with a bluetooth dongle I am still struggling to force hsf/hsp mode.

I can get a phone to connect to the Pi via Hsf/hsp but getting the pi to connect to headset is driving me nuts!!! :)

If you have any guides or tips please share.

PS as an afterthought have a look at https://mycroft.ai/ as it might be a great combo for your HUD

@viktorgino
Copy link
Owner

That's an interesting one.. I've never actuallt tried this yet, but here are my thoughts:
I'm not sure if you can connect two devices to the same bluetooth adapter, but if you're using the dongle to connect the phone, then you can use the Pi's built in bluetooth adapter to connect to the speaker.

If you enter the bluetooth tool bluetoothctl and give it the list command it should give you a list of all available adpaters, then select the adapter with the select MAC-ADDRESS-OF-ADAPTER. After that you can try pairing the speaker as normal:

(from the arch wiki) https://wiki.archlinux.org/index.php/Bluetooth#Pairing

bluetoothctl

[NEW] Controller 00:10:20:30:40:50 pi [default]
[bluetooth]# agent KeyboardOnly

Agent registered

[bluetooth]# default-agent

Default agent request successful
[bluetooth]# power on

Changing power on succeeded
[CHG] Controller 00:10:20:30:40:50 Powered: yes
[bluetooth]# scan on

Discovery started
[CHG] Controller 00:10:20:30:40:50 Discovering: yes
[NEW] Device 00:12:34:56:78:90 myLino
[CHG] Device 00:12:34:56:78:90 LegacyPairing: yes
[bluetooth]# pair 00:12:34:56:78:90

Attempting to pair with 00:12:34:56:78:90
[CHG] Device 00:12:34:56:78:90 Connected: yes
[CHG] Device 00:12:34:56:78:90 Connected: no
[CHG] Device 00:12:34:56:78:90 Connected: yes
Request PIN code
[agent] Enter PIN code: 1234
[CHG] Device 00:12:34:56:78:90 Paired: yes
Pairing successful
[CHG] Device 00:12:34:56:78:90 Connected: no
[bluetooth]# connect 00:12:34:56:78:90

Attempting to connect to 00:12:34:56:78:90
[CHG] Device 00:12:34:56:78:90 Connected: yes
Connection successful

Let me know if some of this is not working. Might have a bluthoot speaker somewhere, but not tried this yet.

@StuartIanNaylor
Copy link
Author

Basically a headset Victor that is all they are https://www.ebay.co.uk/itm/Luminous-Lights-Rechargeable-Wireless-Bluetooth-Speaker-Portable-Mini-Super-Bass/402115969460?

Works on windows / android and pairing is no problem.

index: 1
    name: <bluez_card.9B_FD_D5_6E_01_CA>
    driver: <module-bluez5-device.c>
    owner module: 23
    properties:
            device.description = "A10"
            device.string = "9B:FD:D5:6E:01:CA"
            device.api = "bluez"
            device.class = "sound"
            device.bus = "bluetooth"
            device.form_factor = "headset"
            bluez.path = "/org/bluez/hci0/dev_9B_FD_D5_6E_01_CA"
            bluez.class = "0x240404"
            bluez.alias = "A10"
            device.icon_name = "audio-headset-bluetooth"
            device.intended_roles = "phone"
    profiles:
            a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 40, available: unknown)
            headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: no)
            off: Off (priority 0, available: yes)
    active profile: <a2dp_sink>
    sinks:
            bluez_sink.9B_FD_D5_6E_01_CA.a2dp_sink/#1: A10
    sources:
            bluez_sink.9B_FD_D5_6E_01_CA.a2dp_sink.monitor/#1: Monitor of A10
    ports:
            headset-output: Headset (priority 0, latency offset 0 usec, available: unknown)
                    properties:

            headset-input: Headset (priority 0, latency offset 0 usec, available: no)
                    properties:

With PA 12 they changed the priority and because many would stick in HSP/HFP profile,
They have swapped it round and now I can not seem to get it out of A2DP profile.

Thanks for the reply it was just on the off chance as thought you might know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants