Can't connect android microphone on pc with USB tethering on Linux Manjaro. Help

Description

(this is my first post)

I try to connect my android microphone on PC, by connecting via USB. It is very hard to even find the usb because somewhat i need to enable wifi, because it doesnt show otherwise. So it appears the 192.168……. and so, and i click to connect, it starts showing that is connecting… but it suddently stop trying to connect, the same occurs if i do on android but on android shows an error.

I even tried to insert manually the ip address, the 192.168… one. But nothing.

  • Usb thetering is enabled

  • I have adb-tools

  • The developer mode and debugging is even enabled

Steps to reproduce

There two ways.

The first way, both will be with the internet disabled. (well, if it is usb, it should work without internet access)

I just plug in and enable the usb thetering, nothing appears on the screen.

The second way is:

Enable wifi only on pc and not on android (because again, it is usb, so, it should work)

Finally there will be something, i stream my android microphone and there it is (My phone name and ip appears on computer), i click to connect, and then: trying to connect and then stops trying……

Other details:

  • It works perfectly fine if i just use wifi normally. But i don’t want that, i want usb because the quality is way better and consume less energy.

  • I tried to see if it is firewall, i just searched for firewall in my system and found an firewall app, but it is disabled, i just double checked and enabled and disabled again, why not, but the error continues.

Devices

Device A:

Manjaro 23.1.3

AudioRelay 0.27.5

Device B:

Redmi 13C

Android 13 TP1A.220624.014

AudioRelay 0.26.1

Doing the “second way” i mentioned, but in terminal, with the logs, is this:

[tempo@tempo-os ~]$ audiorelay
2024-03-14 12:27:12:961 [INFO] Version: 0.27.5, os: Linux, osVersion: 6.6.19-1-MANJARO
2024-03-14 12:27:17:457 [INFO] Initializing locale to pt-BR
2024-03-14 12:27:19:022 [INFO] Network addresses: NetworkInfo(broadcastAddresses=[10.0.0.255, 192.168.174.255], localAddresses=[10.0.0.192, 192.168.174.14])
2024-03-14 12:27:19:339 [INFO] Starting the server...
2024-03-14 12:27:19:670 [INFO] Waiting for devices from RtAudio…
2024-03-14 12:27:21:046 [INFO] Checking for update...
2024-03-14 12:27:25:907 [INFO] Found no update
2024-03-14 12:27:29:387 [INFO] Showing main window...
2024-03-14 12:27:29:871 [INFO] Rendering api: OPENGL
2024-03-14 12:29:12:705 [INFO] Remotely connecting to 192.168.174.109...
2024-03-14 12:29:12:995 [INFO] Sentry initialized
2024-03-14 12:29:23:720 [ERROR] Error on config exchange: java.net.SocketTimeoutException: Read timed out
2024-03-14 12:29:23:857 [ERROR] Stopping the player: lb0: java.net.SocketTimeoutException: Read timed out
	at kb0.a(SourceFile:6)
	at me.a(SourceFile:216)
	at sf.a(SourceFile:209)
	at sf.a(SourceFile:63)
	at jf.a(SourceFile:2)
	at OZ0.b(SourceFile:5)
	at MZ0.a(SourceFile:1)
	at VZ0.a(SourceFile:11)
	at fi0.b(SourceFile:9)
	at Bj0.b(SourceFile:1)
	at Ki0.b(SourceFile:18)
	at Ki0.b(SourceFile:18)
	at Mi0.run(SourceFile:68)
	at kG0.invoke(SourceFile:1)
	at uS.invokeSuspend(SourceFile:6)
	at uS.invoke(SourceFile:1)
	at Eh1.a(SourceFile:136)
	at xz.a(SourceFile:41)
	at mG0.a(SourceFile:139)
	at lG0.invoke(SourceFile:2)
	at Zt.invokeSuspend(SourceFile:12)
	at SA$.resumeWith(SourceFile:5)
	at Wt.run(SourceFile:163)
	at l40.run(SourceFile:4)
	at V91.run(SourceFile:1)
	at lj.run(SourceFile:19)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:278)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:304)
	at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346)
	at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:796)
	at java.base/java.net.Socket$SocketInputStream.read(Socket.java:1099)
	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:119)
	at RI6u.read(SourceFile:11)
	at l5.j(SourceFile:41)
	at l5.h(SourceFile:2)
	at l5.v(SourceFile:2)
	at l5.z(SourceFile:1)
	at l5.l(SourceFile:36)
	at l5.r(SourceFile:1)
	at bz0.c(SourceFile:12)
	at az0.a(SourceFile:2)
	at mbw.a(SourceFile:34)
	at wH.a(SourceFile:8)
	at me.a(SourceFile:8)
	... 24 more
2024-03-14 12:29:23:883 [INFO] Stopping the player, reason: error

I am at the moment on Windows as my Ubuntu stopped working a few days ago. So, I can’t share any screenshots or guide you with the issue, but I can tell you what I did to resolve it.

I had a similar issue to yours. What I had to do in the firewall settings was to first try disabling IN and OUT of the firewall completely and check if the application worked fine. When you say you disable the firewall, do you disable both sides?
It was then working fine for me on USB tethering.

If it works out, you can try to add the firewall rules as mentioned in some other posts in the community and enable the firewall.

On a sidenote, are you on a laptop or a Desktop? Do you face the white noise or echo sound once connected to the Android device? I have been bugged with a white noise issue on my linux laptop and can’t seem to find a solution to it anywhere. My Bug Report

Hi joseph, thanks for your help. I can wait for the screenshots once you get your Ubuntu working again. :slightly_smiling_face:

Well, i don’t know exactly. I think the only firewall in manjaro that comes by default is by using the firewall app. When i mean that “i have disabled”, is that i just clicked on the button that appears on that app interface.

But when you say about the in and out, i didn’t notice that there was this options before, but there are some. I can enable the firewall and put “allow” on those two, or just “deny” or “reject”, i have tried and didn’t change my results with the USB, but i can’t change nothing if the firewall is disabled on the button i mentioned.

Sadly, it doesn’t work.

I am using a laptop. Well, when i was connected by the wifi, i didn’t have any problem. It was the exactly same experience i had when using Wo mic. The only problem with wifi is that there is a lot of stuttering and glitches in my voice (both in wo mic and audiorelay), that’s why i want to use USB, because it’s very clean and nice.

Maybe you are trying to use the wrong virtual mic on your pc, or you are connecting the wrong option in the phone. What i do (connecting with wifi) is just open the microphone section (which is on “Server” tab) on android and click on it to start, then on pc i find my android phone and connect into it (the ip is something like 10.0.0.2). Then on audiorelay on pc i make sure that my audio device that i’m going to stream is the “AudioRelay Mic&Sinc”, and when you are going to record your voice or anything else, the microphone used for this purpose needs to be the same. Also consider what is your system sound engine (i don’t know if this is the correct name), i am using Pipewire (by manjaro-pipewire package), and it is good. I had tried using Pulseaudio but i had a lot of bugs and didn’t even managed to get it working right, but pipewire makes audiorelay configure everything for me.

If it persists, try to make a normal voice recording on your tablet with any app and check if the problem isn’t the tablet microphone itself.

Well, at least i’ve tried, hope you get your error solved.

Have a good day,

viperbr123.

Unfortunately I have my exams in this and the next month. I wont be able to install Linux till then. I’ll get back to it in May.

Sorry that the connection is still not working out for you.

Thanks for your detailed suggestion. My case is that I don’t want to use my android device as a mic. I want the laptop to transfer the audio output to the android device. Someone recently posted a solution for it. But I am not sure if it will work out. I will test it later. Maybe you can check out the reply which I got for my issue to aid you in any way. No system sound but white noise in Linux to Android - #4 by IverCoder