Moode Forum
Allowing internet access while in AP mode (on mobile) - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8)
+--- Thread: Allowing internet access while in AP mode (on mobile) (/showthread.php?tid=670)

Pages: 1 2 3


Allowing internet access while in AP mode (on mobile) - Viol8r - 11-10-2018

One small change request (though can easily be fixed manually for now). :-)

I'm using moOde as a streaming device for my USB Dac and iPhone when on the road (see here).

To get the best quality I would want to use Airplay, but that requires it to run in Access Point mode (when no other "known" wifi network is around). The disadvantage is that it disables internet access on the iPhone as the DCHP server sets a default gateway (and that gateway is not internet connected as it's on the raspberry).

Change would be to not set a defalt gateway on the response from the DHCP server. That will allow internet traffic to be routed to LTE/4G while still connected to the AP and allowing airplay/spotify etc.

You can easily fix it manually for now by editing the network settings on the phone by removing the gateway (setting them manually for the moOde SSID, but I can see no practical reason for setting the gateway anyway while it's in AP mode? - or it could just be a setting in the menu if you want a gateway or not)

Hope this makes sense?

An example of fixing it manually on the phone by removing the "router" which gives back internet access through LTE/4G network while still connected to the moOde player:


Default setting when connected:

[Image: attachment.php?aid=318]

[attachment=318]


Change to manual and remote gateway/router:

[Image: attachment.php?aid=320]

[attachment=320]

Final setting:

[Image: attachment.php?aid=319]
[attachment=319]


RE: Allowing internet access while in AP mode (on mobile) - Tim Curtis - 11-10-2018

You could try playing with this param in /etc/dnsmasq.conf

# Set default gateway
dhcp-option=3,0.0.0.0

I'm not sure though how to tell dnsmasq to not send the gw address to the client.


RE: Allowing internet access while in AP mode (on mobile) - Viol8r - 11-10-2018

(11-10-2018, 02:07 PM)Tim Curtis Wrote: You could try playing with this param in /etc/dnsmasq.conf

# Set default gateway
dhcp-option=3,0.0.0.0

I'm not sure though how to tell dnsmasq to not send the gw address to the client.


Yep. That did the trick - no ip after the option means no gateway set (0.0.0.0 is default gw)


Code:
#
# 2018-01-26 TC moOde 4.0
#

interface=wlan0      # Use interface wlan0
bind-interfaces      # Bind to the interface to make sure we aren't sending things elsewhere
server=127.0.0.1     # Forward DNS requests to self
domain-needed        # Don't forward short names
bogus-priv           # Never forward addresses in the non-routed address spaces.
dhcp-range=172.24.1.50,172.24.1.150,12h # IP address range and lease time
dhcp-option=3
dhcp-option=6

3 disables gateway, 6 disables dns (probably not needed).

This makes it the perfect mobile streamer/player (AP mode while still having internet access on mobile). :-)

Thanks.


RE: Allowing internet access while in AP mode (on mobile) - Tim Curtis - 11-10-2018

Interesting. I never would have thought of that usage scenario.

I'll give it a try on my end. What would a feature like this be named?


RE: Allowing internet access while in AP mode (on mobile) - Viol8r - 11-10-2018

(11-10-2018, 02:58 PM)Tim Curtis Wrote: Interesting. I never would have thought of that usage scenario.

I'll give it a try on my end. What would a feature like this be named?

Hehe... ok - it's a common problem for many of the streamer/wifi dac devices - and this is a perfect fix. :-) 
I discovered it a few years ago in another project where we where streaming image data from a wifi device to iPads (and having the need to be online at the same time).

Name of the feature? It's a little complex to put in a simple description. :-) 

Maybe just "No gateway in AP mode" - Enables internet access on mobile devices while running in AP mode for streaming over wifii.


RE: Allowing internet access while in AP mode (on mobile) - Tim Curtis - 11-10-2018

I agree this would be a super nice capability to provide.

Hopefully I'll get some time this weekend to test it out and look into how best to integrate it :-)


RE: Allowing internet access while in AP mode (on mobile) - TheOldPresbyope - 11-11-2018

Interesting discussion. 

Hadn't thought about this use case before either.

IIRC it gets stickier with Android devices to take advantage of this dual data-source mode but no time to test this weekend. Hope I'm wrong.

Regards,
Kent


RE: Allowing internet access while in AP mode (on mobile) - Viol8r - 11-11-2018

(11-11-2018, 04:14 PM)TheOldPresbyope Wrote: IIRC it gets stickier with Android devices to take advantage of this dual data-source mode but no time to test this weekend. Hope I'm wrong.

I just tried on a basic Android phone and here it's not enough to do the trick like on iOS. 
Now I'm not an advanced android user as I only use iOS, so there might be a way (there are some developer settings in Android about using wifi and lte/4g at the same time).


RE: Allowing internet access while in AP mode (on mobile) - Tim Curtis - 11-11-2018

Even if it only generally works on IOS it would still probably be with the effort to make a feature out of it :-)


RE: Allowing internet access while in AP mode (on mobile) - TheOldPresbyope - 11-11-2018

(11-11-2018, 05:02 PM)Tim Curtis Wrote: Even if it only generally works on IOS it would still probably be with the effort to make a feature out of it :-)

Agreed.

I just wanted to get ahead of the inevitable "it doesn't work" posts.