dirtydischo
Posts: 26
Joined: Mon Feb 11, 2013 6:18 pm

MPD connection in car. Client won’t connect if phone data on

Tue Jan 05, 2016 1:49 pm

Hi,

I’ve set up a Pi Zero as an access point with MPD on it for use in my car. Idea is to connect to stereo and control through a direct wifi connection using MPDroid or MPD Control.

When I try to connect in car it’s a bit of a pain to connect to the server. It will only connect to the Pi’s IP address if I switch off the mobile data connection. I presume this is something to do with the priority of which IP address the MPD client connects to, i.e. if there’s a data IP connection it will try for that rather than the WLAN.

Any ideas on how to sort this so that I can leave on the data connection and still connect to the Pi?

Thanks.

matt@shagshaw.com
Posts: 38
Joined: Thu May 31, 2012 8:04 pm

Re: MPD connection in car. Client won’t connect if phone dat

Thu Jan 07, 2016 1:13 pm

Hiya

I am looking at doing this soon, but I have planned it in my head a different way.

I am going to turn on my phone tethering, and set a permanent address on the
Pi within the same range.

My phone assigns out dhcp as a hotspot in the 192.168.43.X range (from memory),
I tested this with my windows laptop and ipconfig at home.

So test yourself this way, turn on your hotspot/tethering option on the phone, power
up your laptop (set to dhcp) and see what IP you get assigned.

Then set your pi with static IP in the same range, configure mpdroid to point at the
permanent address on the pi, and you should be good to go

JedAil
Posts: 4
Joined: Wed Feb 06, 2013 10:11 am

Re: MPD connection in car. Client won’t connect if phone dat

Tue Jan 12, 2016 11:03 am

Hi,
I already did this with success.
Have a look to this post : https://volumio.org/forum/wifi-hotspot-t378.html

dirtydischo
Posts: 26
Joined: Mon Feb 11, 2013 6:18 pm

Re: MPD connection in car. Client won’t connect if phone dat

Tue Jan 12, 2016 1:30 pm

Thanks for responses.

The tethering solution works, but I’d rather not have to leave tethering on if possible.

I have the access point set up as wlan0 and the internet connection on wlan1, so that if there’s no internet connection I can still reach the pi.

Any other ideas on how I can set this up so that I can connect to the MPD server from my phone even with the data connection on (and not tethered)?

Paul82
Posts: 11
Joined: Mon Jan 11, 2016 2:21 pm
Location: UK

Re: MPD connection in car. Client won’t connect if phone dat

Tue Jan 12, 2016 1:36 pm

Check your WiFi settings don't have avoid poor WiFi hotspots.

Because the Pi isn't providing for phone with internet, your phone will disconnect from WiFi, if its enabled.

dirtydischo
Posts: 26
Joined: Mon Feb 11, 2013 6:18 pm

Re: MPD connection in car. Client won’t connect if phone dat

Tue Jan 12, 2016 1:39 pm

Cheers, but that's not a problem. The wifi connection is fine, regardless of whether it has internet.

It's that MPD Control (and other clients) won't connect to the local IP if the phone has a data connection. Works fine when there's no data connection.

Paul82
Posts: 11
Joined: Mon Jan 11, 2016 2:21 pm
Location: UK

Re: MPD connection in car. Client won’t connect if phone dat

Tue Jan 12, 2016 1:50 pm

Not sure what device you are using, but if its Android, most are set to disconnect from wifi if the access point doesnt provide an internet connection by default.

dirtydischo
Posts: 26
Joined: Mon Feb 11, 2013 6:18 pm

Re: MPD connection in car. Client won’t connect if phone dat

Tue Jan 12, 2016 2:17 pm

Using a OnePlus One. It seems to stay connected ok even if there's no internet connection.

Return to “Graphics, sound and multimedia”