2

I have a Pi-turned-router that works great as a WiFi hotspot, I'm using hostapd.

I would like to still be able to connect to the Pi's wireless ssid even when it's not connected to the internet, and would like to be able to access its locally running web apps. That's my question.

I've looked into things like Wifi Direct and bluetooth PAN's but have been unsuccessful thus far. I'm looking for somewhat of a clear(er) path to take, possibly an example.

EDIT, to add more clarity:

1) My Pi broadcasts an ssid, as it is a WiFi Hotspot

2) I can connect to that ssid from a laptop or smartphone. If the Pi has Internet, everything is successful. If the Pi has no internet, the connection fails (of course)

3) INSTEAD of failing, I would like to STILL connect to the ssid of the offline Pi, to allow get/post requests to happen with an app running on Pi's localhost that does not require internet

In the same way you can connect to/configure a router when offline, I want to connect to/configure my Pi router when offline, but NOT through Ethernet, via WiFi instead (or bluetooth).

The point is, if the Pi is offline, I can choose a connection for it remotely to get it online. As I mentioned, I tried using WiFi direct and bluetooth unsuccessfully, I'm sure the tech works but I've missed something along the way.

NOTE: There is no desktop environment installed, no RDP gonna happen. Pi is command line only, and it is to remain completely headlines - no accessing directly from monitor and keyboard - remote only

  • Isn't it just working? On my setup the Pis can still talk to each other even when the Internet drops off... But then, I have a dedicated router just for PiNet. – SDsolar Apr 29 '17 at 21:56
  • I have a Pi, which is a WiFi hotspot. I would need to connect to the hotspot from another device even if there's no internet. It does not sound like this is your setup. – Ricky Brown Apr 30 '17 at 5:41
1

It was all in the tweaking of dnsmasq configuration I believe, but the easy way is to use create_ap which has an option to create an AP without internet sharing, which allows me to wirelessly connect to the Pi even when its offline. https://github.com/oblique/create_ap

0

In the OP you mention accessing locally-running web apps, which of course can be accessed by entering the Pis IP address in a browser. Since this does not require any DNS lookup, access to the internet would not be relevant.

But it sounds like you actually want to be able to get in and make changes.

To obtain remote GUI access to any Pi there are only a couple of steps required. It doesn't matter whether it is also your access point or not. It is the same for all RPis running Raspbian.

If you haven't already, go into raspi-config in a terminal window and make sure SSH is enabled.

Install tightvncserver on the pi.

sudo apt-get install tightvncserver

Then, once it is installed, run it and set up a remote-access password

tightvncserver

It will prompt you for a remote-access password, then ask you to confirm it.

At that point you can use any VNC client to access the regular desktop. But there is a better way:

To go a step further, install Remote Desktop Protocol.

sudo apt-get install xrdp

Once that is running then you can use Windows Remote Desktop Client to get to a virtual desktop on the Pi. When you run the client, enter the IP address of the Pi. It will prompt you for your login name (usually pi) and password. Once you have done that you will have remote-control GUI access to your Pi.

If you are not using Windows as your primary PC, look for its RDP client program. On my Android tablet I use Remoter. On my Ubuntu PC I use remmina. Just set it up to access the IP address of the Pi and when it connects it will do the same: prompt you for your login name and password, then present you with the virtual desktop.

If the idea is to remote-access by terminal then use raspi-config and make sure SSH is turned on then use PuTTY to connect to it by IP number from a PC (or by using Juice on Android)..

  • Thanks for the answer, please see my Edited question above – Ricky Brown Apr 30 '17 at 16:49
  • Then the last line of my answer is what you want. – SDsolar Apr 30 '17 at 20:33
  • via WiFi? how exactly does that work for you? I know all about SSH. The issue is: If you connect to the router while it is offline, your computer or device will say "there's no internet connection" and thus kick you out/reconnect you to another known wifi network. My question is, how do you connect via wifi even when offline? Have you actually tried this yourself? – Ricky Brown May 1 '17 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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