Closed droogi closed 2 years ago
Please try to disable auto connect (in Squeezer select the three-dot-menu on the top right and select settings)
Hope this helps!
Thanks for the hint. Wireguard connection to Lms is now possible. It does not work on first try, sometimes I have to try ~10 times, but Lms is available via ip:9000 at the same time. Ok for me to close, but could be optimized ., Thanks Regards, droogi
Hi, I have the exactly same situation and problem. However, I never succeed in connecting to LMS, even after disabling auto-connect. I double-checked that my connection is ok, and that Squeezer succeeds in connecting when in Wifi. Attached is a record of my attempts to connect my LMS with Wireguard VPN. As you can see, there is no error message, but still the player does not show...
https://user-images.githubusercontent.com/8158806/137641120-eab13a66-32e5-4d07-ac91-0692c5f3b3a4.mp4
I am ok to help with this issue by providing more info, as long as you indicate me how to generate them (e.g. logs), as I am no Android developer (but I am still a developer on other technologies)!
Regards.
For the next version of Squeezer I have removed the Wi-Fi requirement. You can try this preview, to see if it works any better.
@droogi I'm not sure what "Lms is available via ip:9000" means. Could you elaborate?
@floot Thanks for the detailed description. Please try to connect the same address (audio.maison:9000) from a browser on the same device where you are running Squeezer. About logging it's by no means simple. If you feel like it, you can try Logcat command-line tool which requires that Android Debug Bridge (adb) is installed on your computer.
I installed the next version, it behavious similar to the one before. When wireguard connection is enabled, I can access Logitech Media server (Lms) with my browser on 192.168.178.170:9000, but connection with squeezer does not work reliable. I have to click connect 5to 10 times, sometimes it connects, sometimes not. I have no rooted Android, so I cannot use logcat,
Hi! I tried the preview version, and I can see no change in the behaviour: the app shows the same as in my previous video. Even after accessing from a browser on my device (which actually works in the browser).
Hmm ... I'm unable to figure out what's causing this. If the browser connect Squeezer should also be able to connect.
Regarding logcat root is not needed. In the adb link I provided there are instructions on how to enable adb debugging on your device.
If you are able to use tcpdump on the server, it may also be helpful.
Here it is! The logcat extract from a failed connection attempt from Squeezer preview (v2.2.7-beta-10). Hope this helps! logcat.log
@floot Thanks for the log. This shows that Squeezer actually connects to LMS "setConnectionState(2 => 4)" but that connection is quickly lost "setConnectionState(4 => 1)". That explains why there are no error messages in the video you sent (like there would have been if the entered address were wrong). It does not, however, explain why the connection is lost.
To investigate this please send the LMS logs of a connection attempt. In the LMS web-interface please select Settings/Advanced/Logging and raise the "(network.cometd) - Cometd protocol logging" log-level to Debug.
Hi!
Thanks @kaaholst for the guidance through the logs!
Here you will find the server.log
info extracted from one single failed Squeezer connection attempt.
server.log
Hi! Do you have enough content to continue your investigation, or do you think about other scenarios? I could for example test connecting Squeezer to my LMS with the mobile data communication but without WireGuard VPN (with a port temporarily open to the Internet), if you think it is relevant. Thanks!
@floot Yes please do, that will be good information. However to solve this issue I think I need to be able to reproduce the issue, currently I cannot do that. So I'm afraid I need to create setup a similar to what you have, and hope it will fail for me also. Can you provide assistance with that?
@kaaholst sorry for the delay, I just found some time to test the connection from Squeezer to my LMS with publicly exposed port on the Internet, so I did not use WireGuard this time. And this time, it succeeded at the first try! So it likely confirms that the WireGuard VPN connection causes trouble to Squeezer when connecting to LMS. Attached is the log I got for the direct connection, without WireGuard.
I can prepare details of my WireGuard config so that you can test it for yourself, I just have to get a bit more time to do this. server.log
@kaaholst And here are some info about my WireGuard setup. Actually I installed the WireGuard server on my router running OpenWRT, but the configuration could be adapted to other server OSes.
/etc/config/network
:
config wireguard_wg0
option public_key '[CLIENT_PUBLIC_KEY]'
option preshared_key '[PRESHARED_KEY]'
option route_allowed_ips '1'
list allowed_ips '[CLIENT_IP_IN_THE_VPN_NETWORK]/32'
option persistent_keepalive '25'
I use the official WireGuard app for Android (currently v1.0.20211029 on my phone)
Client configuration of WireGuard has 2 parts:
Name: [INTERFACE_NAME] Private key: [CLIENT_PRIVATE_KEY] Address: [CLIENT_IP_IN_THE_VPN_NETWORK]/32 DNS Server: [DNS_SERVER_IP] Listen Port: 51820
Public key: [SERVER_PUBLIC_KEY] Pre-shared Key: [PRESHARED_KEY] Allowed IP addresses: 0.0.0.0/0 Endpoint: [PUBLIC_IP_OF_THE_VPN_SERVER]:51820
Hope this helps, tell me if you miss something
I managed to get Wireguard working on my setup. I was then able to reproduce this issue when accessing Squeezer from the outside via mobile connection. This in turn enabled me to make a fix.
Please try this apk.
You may continue to use this apk, it will automatically be updated when an new version is released. You can also revert to the version on Google Play, if you prefer to use an official version.
I tried the march 13th version and It connects as expected on first try and it's stable.thanks for solving, sorry I could not help with logs. Regards droogi
@droogi Thanks for the feedback, and thanks for helping testing this.
Hi! Sorry for the delay... I tested the .apk sent on March 13., and unfortunately I have the very same result as with the mainstream version of the app :-( I tried with different parameters: squeezebox hostname, ip address, with or without specifying port 9000, but it always behaves the same. I can help again to debug if needed. Thanks.
I updated the linked apk and gave it a new version "2.2.10-beta-0" to rule out confusion about which version is running. This version also logs connection errors, so if the problem persists, please attach a new logcat extract.
Hi! Sorry again for the delay, I have a rather slow pace on home computer hacking activities since a few months! But I am happy to inform you that the version you linked in your latest message solves the problem with WireGuard connections. And in a stable way, as far as I experienced!
Do you have an idea of when the fix is available to a stable version?
Thanks for your the help you already provided until now!
@floot That's good news! thanks for the update.
I have no exact timeline for when this will be released, but it will be in the next version. It is safe for you to keep running 2.2.10-beta-0, it will be automatically updated when the next version is available on Google Play.
Closing this!
Squeezer can only operate when WLAN is available. I sometimes use a Wireguard and mobile connection to access my LAN. In this case the LMS should also be accessible and the recievers should be controlled. Is this possible? Regards, droogi
I appreciate Squeezer very much.