6

I have made a Xamarin app for Android and WP, which is basically a music player, with the ability to sync music between devices, similar to Spotify, but it's used to sync music that you have downloaded as an mp3/flac or whatever in any way. Probably Google Music can do the same, but that's not matter.

I'm running a PHP api on my Raspberry Pi 3 Model B (with Raspbian), to which these clients are making requests, e.g. to get the list of songs a user have uploaded, upload one, remove one etc..

Currently, the Raspberry serves as the main server of this whole system, so it stores the music files themselves. I'd like to make it somewhat "portable". Is it possible for the Raspberry to host a WiFi connection, without internet? Like the Raspberry creates a WiFi access point, mobiles can connect to it, and through Raspberry's IP address, be able to access that PHP API, and upload/download files to/from it?

I'm not good at networking, so the main problem could be that I don't really know how this is called. VPN maybe?

1
  • 1
    This isn't a virtual private network — it is an actual private network.
    – mattdm
    Commented Dec 25, 2016 at 16:43

1 Answer 1

7

In terms of networking, this is certainly possible. Any WIFI access point can provide WIFI access to other devices. A WIFI accesspoint typically also acts as a DHCP server giving out IP addresses and DNS configuration, and also as a gateway, routing traffic to other networks, notably the internet. A WIFI accesspoint with no connection to internet will not be able to route traffic to internet, but can route traffic between the devices connected to it, and resolve their names to each other.

If you don't mind tinkering a bit with network setup, then you don't need any other hardware than a Pi with Wifi to do this. You could configure it as an access point using hostapd, setup a DHCP server with dhcpd.

If you are not very comfortable with setting up a network, an easy way to achieve what you want could be to get a wireless router, and connect the Raspberry to it via an ethernet cable. Configure the hostname of the Raspberry in the router so that other devices can access it by name. And that should be pretty much it, the wireless router doing all the heavy lifting. However, as you would have to pack the router with you, this approach reduces the portability of the solution.

(Thanks for @goldilocks, whose comments helped improve this post.)

2
  • Thank you. "A WIFI accesspoint with no connection to internet will not be able to route traffic to internet, but can route traffic between the devices connected to it" perfectly answers my question. I successfully configured it, now only some client configuration is needed and it's ready. Commented Dec 25, 2016 at 21:52
  • @MartinFrøhlich wow that's cool, congrats!
    – janos
    Commented Dec 25, 2016 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.