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

Just some resources. #1

Open
kfatehi opened this issue Jul 29, 2021 · 10 comments
Open

Just some resources. #1

kfatehi opened this issue Jul 29, 2021 · 10 comments

Comments

@kfatehi
Copy link
Owner Author

kfatehi commented Jul 30, 2021

Jumping off https://github.com/pschatzmann/ESP32-A2DP

We see a link to classic BT section https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/bluedroid/classic_bt

In which we see two very relevant examples:

Hands-Free Audio Gateway -- the Audio Gateway makes your device act as a phone, i.e. connectable to a headset.

Hands-Free Unit -- the Unit means headset.

So if we merge these two examples we should be able to prototype this

@kfatehi
Copy link
Owner Author

kfatehi commented Jul 30, 2021

First let's get the HF Unit code installed and see if we can pair to it with the phone as though it's a headset!

@kfatehi
Copy link
Owner Author

kfatehi commented Jul 30, 2021

image

Looks like we will need to dedicate an ESP32 for each role.

@kfatehi
Copy link
Owner Author

kfatehi commented Aug 4, 2021

https://www.youtube.com/watch?v=At8PDQ3g7FQ - audio output instructions

https://www.youtube.com/watch?v=0jR-QNTfydA - bluetooth hfp microphone easier to understrand hopefully than idf

and his code:

https://github.com/atomic14/esp32-hsp-hf

@kfatehi
Copy link
Owner Author

kfatehi commented Aug 4, 2021

@kfatehi
Copy link
Owner Author

kfatehi commented Aug 4, 2021

closest we got is with a raspberry pi!
actually managed to pair my galaxy buds and my iphone using two radios.
the problem lies in:

  • can pulseaudio use the mic of my galaxy buds ?
  • can i get the audio from the iphone to pipe to my galaxy buds?
  • can i get the audio of the mic of the galaxy buds to pipe to the iphone?
    I think this all just comes down to configuring pulseaudio correctly.

https://unix.stackexchange.com/questions/175930/change-default-port-for-pulseaudio-line-out-not-headphones
https://stackoverflow.com/questions/52791992/connect-and-use-multiple-bluetooth-dongles-on-linux (select)

ofono is also related. this code doesn't seem that hard to read frankly
https://git.kernel.org/pub/scm/network/ofono/ofono.git/tree/btio/btio.c

https://www.toolbox.com/tech/how-to/blogs/howto-capture-specific-pulse-audio-streams-021017/
https://wiki.archlinux.org/title/Bluetooth_headset#Configuration_via_CLI

@kfatehi
Copy link
Owner Author

kfatehi commented Aug 4, 2021

Device DC:52:85:E1:60:48 DFH Phone
Device D8:55:75:B9:5C:72 Galaxy Buds (5C72)

@kfatehi
Copy link
Owner Author

kfatehi commented Aug 7, 2021

Linux audio bluetooth is pretty shit. Nice recap of how I am feeling now here given my galaxy buds are piping audio fine from calls (after the BCM2070 patch file was added) yet do not provide any mic to linux. https://www.reddit.com/r/galaxybuds/comments/g4so4t/using_the_microphone_on_ubuntu_1804/fpk5ego/

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

1 participant