Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serving a local website via bluetooth to a cellphone without using the internet [closed]

Tags:

I'm trying to run a local computer via bluetooth on a cellphone, ipad, and other wireless devices.

We'd like to be able to run a website hosted locally on this server without it being connected to the internet, is it possible to run the site via bluetooth from the server to the wireless devices.

The server may not be connected to the internet so I'd like to know if it's possible to run the site locally, on a cellphone via the cellphone browser, without the server being connected to the internet.

I appreciate any help with this.

like image 404
Vesone Avatar asked May 08 '12 16:05

Vesone


People also ask

Is internet required for Bluetooth?

Bluetooth doesn't use data, but instead uses short-range radio waves to connect devices. You can use Bluetooth devices even if you don't have cellular service or an internet connection.

Can we access internet through Bluetooth in mobile?

You can use your phone's mobile data to connect another phone, tablet, or computer to the internet. Sharing a connection this way is called tethering or using a hotspot. Some phones can share Wi-Fi connection by tethering. Most Android phones can share mobile data by Wi-Fi, Bluetooth, or USB.

Can internet be shared through Bluetooth?

Tap the "Bluetooth Tethering" check box to enable Bluetooth Internet sharing on your Android device.

What is Bluetooth pan used for?

In the PAN, the internet connection of one of the devices can be shared with the other device through Bluetooth tethering. Using this Bluetooth technology, you can pair a payment terminal with an Android or iOS tablet or smartphone that functions as a mobile POS system.


2 Answers

Yes, by some means such as:

  • Use bluetooth tethering backwards - ie, the phone thinks that the computer is it's source of network connectivity. The computer runs not only the web server, but also a name server (or the phone has a hosts file) so that the name of the website resolves to the IP address of the computer on the bluetooth network. Note that the phone will probably require administrator level access, or existing capability for this.

  • Treat the bluetooth more like a serial connection. Write a service which runs on the phone and accepts network connections from the browser on the phone via the loopback network interface. This then sends the http request over the bluetooth serial link to the PC, where a web-server like program accepts them and responds over the serial-like channel. The service on the phone then provides these back to the browser over the loopback network interface. If you are content with a url such as http://localhost:8080 this would not require administrative access to the device, but merely the ability to run a background service that can listen on network sockets. But to get rid of the :8080 and run on the implicit usual port 80, at least on Android you would need root access.

  • Wrap the phone's browser engine in an application which substitutes serial-like access over the bluetooth in place of network sockets. Alternatively, deploy service idea above this way inside of a custom browser application, so that you don't actually have to run a background package, but only a background service thread within the application that the user is actively using.

  • Buy a home wifi router and don't connect it's WAN port to anything. Get one with enough memory to install a router-linux distro on and you may even be able to host the website on that box and leave the PC out of it. Yes, this isn't a bluetooth solution, just tossing it out there for the simplicity if there's a way it could be acceptable.

like image 197
Chris Stratton Avatar answered Oct 01 '22 18:10

Chris Stratton


Use a Raspberry Pi with Raspbian Linux OS installed. Configure your favorite web server on the Pi (Nginx). Configure the Pi as a WiFi access point running hostapd according to this: https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/install-software

This will give you a really nice, inexpensive, low-power little web server that broadcasts its own WiFi SSID for you to connect all of your devices to.

I have used this to achieve what you are after.

like image 41
Link Swanson Avatar answered Oct 01 '22 19:10

Link Swanson