presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Communication without Internet

Tue Mar 22, 2016 9:37 pm

Hi everyone,

I was wondering if there is a way for my phone and RPi to exchange commands without and internet connection? I want to send commands to the RPi without having an internet connection established.

HiroProtagonist
Posts: 212
Joined: Sat Jun 29, 2013 9:45 am

Re: Communication without Internet

Tue Mar 22, 2016 10:57 pm

Are you asking if these two devices can communicate without using a network connection, or specifically if they can communicate without access to the internet?

If it's the latter the answer is of course yes, provided they're both on the same local network.

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Wed Mar 23, 2016 12:16 am

HiroProtagonist wrote:Are you asking if these two devices can communicate without using a network connection, or specifically if they can communicate without access to the internet?

If it's the latter the answer is of course yes, provided they're both on the same local network.
Assuming there is no access to the internet. How can I have the raspberry pi receive commands from my phone? I know bluetooth can send files but I want to send commands from my phone to the RPi.

Assuming there is an access to the internet but the RPi does not know the SSID and Passphrase, how can it receive this info from my phone?

whichever question is easier to answer would help me out a lot. I am just interested in "talking" between my phone and RPi without WiFi

ghans
Posts: 7863
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Communication without Internet

Wed Mar 23, 2016 7:56 am

WiFi is not Internet. A wireless LAN is a sensible , easy and
cheap option to enable direct communication between
your Pi and your Phone.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
karrika
Posts: 1051
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: Communication without Internet

Wed Mar 23, 2016 10:15 am

ghans wrote:WiFi is not Internet. A wireless LAN is a sensible , easy and
cheap option to enable direct communication between
your Pi and your Phone.


ghans
I have been setting up my RPi as a WiFi access point and web server for exporting a control page. My phone can then connect to this WiFi network exported by the RPi and browse the web page with the controls. I can then push the buttons on my phone to control the operations.

QLC+ has a Virtual Console for exporting light and sound control from the RPi to a phone. Here is an example of my Virtual Console from last year.
Image

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Wed Mar 23, 2016 4:45 pm

So let me clear this up a bit...

I want to setup the WiFi on my raspberry pi. My raspberry pi is enclosed in a device. Is there a way for me to send the WiFi SSID and passphrase to the RPi via my phone or computer?

RPi - needs WiFi SSID and passphrase transmitted to it wirelessly
Phone/Computer - connected to internet and wants to send SSID and passphrase to the RPi

1) Is there a way to communicate SSID and passphrase to the RPi without a network connection from my phone/computer?
2) I know bluetooth is one method but do you know how to send SSID and passphrase? I only see examples for sending files.

ghans
Posts: 7863
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Communication without Internet

Wed Mar 23, 2016 6:05 pm

How about turning the Pi into an open WiFi Hotspot
and then using this :

http://sirlagz.net/2013/02/08/raspap-webgui/

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Wed Mar 23, 2016 6:18 pm

ghans wrote:How about turning the Pi into an open WiFi Hotspot
and then using this :

http://sirlagz.net/2013/02/08/raspap-webgui/

ghans
Problem Simplification:
Internet does not exist. I want to communicate text between phone and Rpi

Assumptions:
The Pi cannot be manually setup as a hotspot. The Pi has no idea what networks are available. It is waiting for an input that contains commands.

Goals:
I have to send SSID and passphrase to the Pi (from phone/computer) and then it can connect. Otherwise the Pi is "clueless" to available networks.

ghans
Posts: 7863
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Communication without Internet

Wed Mar 23, 2016 6:26 pm

The Pi can be configured to automatically act as
Hotspot till the details to join another Internet-connected
WiFi are entered.

This seems to be a newer version of the GUI :
https://github.com/billz/raspap-webgui


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Wed Mar 23, 2016 7:38 pm

ghans wrote:The Pi can be configured to automatically act as
Hotspot till the details to join another Internet-connected
WiFi are entered.

This seems to be a newer version of the GUI :
https://github.com/billz/raspap-webgui


ghans
Sorry I am having trouble understanding how this raspap-webgui works. Can you explain it in more detail?

Questions:

1) So the RPi does not need to be connected to a network for it to act as a hotspot?
2) How does the phone/computer send the details to the RPi?

ghans
Posts: 7863
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Communication without Internet

Thu Mar 24, 2016 8:32 am

Yes , the Pi can itself act as a hotspot if you use the
right USB dongle. Yes , this is a "real" WiFi , just one without
a connection to the greater internet.

1) Follow this : http://raspberrypihq.com/how-to-turn-a- ... fi-router/
2) Install the WebGUI
3) Connect your Phone to the Raspberry Hotspot
4) Start a browser on your Phone and navigate to the WebGUI
5) Enter the details to connect the Pi to an
internet-connected WiFi - the Pi now acts as WiFi client

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

gdt
Posts: 85
Joined: Thu Jul 19, 2012 10:19 am

Re: Communication without Internet

Thu Mar 24, 2016 1:57 pm

I want to setup the WiFi on my raspberry pi. My raspberry pi is enclosed in a device.
In that case you want to implement "WiFi Protected Setup" on your device. Use one of the GPIO pins to connect to a button marked with the "WPS" logo. When you see that button press then instruct wpa_supplicant to run the WPS protocol to find the Access Point which has also had its WPS button pressed. This works for home style internet with WPA2 Pre-Shared Key. For a non-automated example see comment #6 here.

You then run IPv6 to establish a link-local address, then announce your service as being available on that link-local address using ZeroConf (implemented by Avahi on Linux). It's pretty common to then use a series of REST webpages, with those pages loading JavaScript to implement a web interface for interactive users (as opposed to REST API users). Your phone then can use its web browser to drive the web interface on your device, or you can write a phone app which uses the REST interface.

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Thu Mar 24, 2016 6:58 pm

ghans wrote:Yes , the Pi can itself act as a hotspot if you use the
right USB dongle. Yes , this is a "real" WiFi , just one without
a connection to the greater internet.

1) Follow this : http://raspberrypihq.com/how-to-turn-a- ... fi-router/
2) Install the WebGUI
3) Connect your Phone to the Raspberry Hotspot
4) Start a browser on your Phone and navigate to the WebGUI
5) Enter the details to connect the Pi to an
internet-connected WiFi - the Pi now acts as WiFi client

ghans
Thank you! This looks really helpful. I will try it out.

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Fri Apr 01, 2016 6:11 pm

ghans wrote:Yes , the Pi can itself act as a hotspot if you use the
right USB dongle. Yes , this is a "real" WiFi , just one without
a connection to the greater internet.

1) Follow this : http://raspberrypihq.com/how-to-turn-a- ... fi-router/
2) Install the WebGUI
3) Connect your Phone to the Raspberry Hotspot
4) Start a browser on your Phone and navigate to the WebGUI
5) Enter the details to connect the Pi to an
internet-connected WiFi - the Pi now acts as WiFi client

ghans
I followed step 1 but I am not able to see my RPI WiFi router on my list of available networks. I have not connected an ethernet cable or anything to the Pi. Does this setup require me connecting an ethernet cable?

I am trying to set up WiFi on my RPi without any network cable attachment.

User avatar
jbeale
Posts: 3434
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Communication without Internet

Fri Apr 01, 2016 6:27 pm

I have used a Pi to create a standalone WiFi Access Point (with no connection to the greater Internet) that I could see and connect to from my Android phone and Android and Windows tablets. I could see the Pi serving web pages and I could download files from the Pi through that link, so I know it is possible. I do not know if this mode is possible with all USB wifi adaptors. See also: http://elinux.org/RPi_USB_Wi-Fi_Adapters

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Fri Apr 01, 2016 6:32 pm

jbeale wrote:I have used a Pi to create a standalone WiFi Access Point (with no connection to the greater Internet) that I could see and connect to from my Android phone and Android and Windows tablets. I could see the Pi serving web pages and I could download files from the Pi through that link, so I know it is possible. I do not know if this mode is possible with all USB wifi adaptors. See also: http://elinux.org/RPi_USB_Wi-Fi_Adapters
That sounds like it could get me in the right direction. Do you have instructions on how to do this? Thank you.

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Fri Apr 01, 2016 6:39 pm

jbeale wrote:I have used a Pi to create a standalone WiFi Access Point (with no connection to the greater Internet) that I could see and connect to from my Android phone and Android and Windows tablets. I could see the Pi serving web pages and I could download files from the Pi through that link, so I know it is possible. I do not know if this mode is possible with all USB wifi adaptors. See also: http://elinux.org/RPi_USB_Wi-Fi_Adapters
Wait... I am assuming your RPi was connected to the internet to become a WiFi AP. My RPi is not connected to the internet. I need to find a way to get the SSID and Passphrase of my network to the RPi remotely without means of SSH. The RPi can't be physically accessed. Let's assume I am taking my device to different people's homes. I need to send it new SSID and Passphrases at each home but I do not want to get a monitor and keyboard out to do this.

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Fri Apr 01, 2016 7:25 pm

ghans wrote:Yes , the Pi can itself act as a hotspot if you use the
right USB dongle. Yes , this is a "real" WiFi , just one without
a connection to the greater internet.

1) Follow this : http://raspberrypihq.com/how-to-turn-a- ... fi-router/
2) Install the WebGUI
3) Connect your Phone to the Raspberry Hotspot
4) Start a browser on your Phone and navigate to the WebGUI
5) Enter the details to connect the Pi to an
internet-connected WiFi - the Pi now acts as WiFi client

ghans
This 1st instruction required me to connect an ethernet cable to my RPi. I am unable to access the RPi to do this.

Is there another way to communicate with the RPi? I really have no means of internet connection via any cable connection or physically connecting to the RPi. I only have my laptop and a securely enclosed RPi. Is there another method besides Bluetooth that will allow me to send offline text to the RPi??

User avatar
jbeale
Posts: 3434
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Communication without Internet

Sat Apr 02, 2016 1:47 am

I only used the RPi's internet connection to set it up initially, I could equally well have configured the SD card offline on another machine and then installed it. Once it was setup that one time, it was completely wireless (ran off a battery actually) and I could connect to it from my phone at any later time, without using any external network or anything else. In your initial configuration of the Pi, you can set it to appear as a wifi AP with a fixed known SSID/password or you can even set no security at all so anyone can connect.

When you say you want to use different SSID/password in different people's houses, do you mean you want the Pi to access that person's existing wifi network as a wifi client? This is the case eg. if you are making a smart thermostat, etc. that uses the customer's wifi LAN to connect the internet. If so, of course you need to get their SSID and password. Once they tell you that, then you could pass that to the Pi from your phone as described above with the pi in self-hosted AP mode to talk to your phone, then switch the Pi to normal wifi client mode on the local wifi network. If that's what you want to do.

If your Pi is already permanently sealed into a secure box with no external network, wifi, bluetooth, serial port etc. connection, and you can't ever open that box to do a one-time configuration or change SD cards, and you haven't already set up some network as above, then that is a hard problem and I don't know what to suggest. Except to buy another pi and configure it to do what you want first, before embedding it in concrete. :-)

rzusman
Posts: 346
Joined: Fri Jan 01, 2016 10:27 pm

Re: Communication without Internet

Sat Apr 02, 2016 2:10 am

Put a TTL-RS232 adapter on it and use the Console.

Slackware
Posts: 131
Joined: Mon Jan 18, 2016 3:45 pm

Re: Communication without Internet

Tue Apr 05, 2016 12:17 pm

if you don't have a wifi dongle for the raspberry, consider just plugging in a wifi router to it's ethernet port. then the router will supply all the info to connect. You wouldn't be portable, but then what would you be controlling on the move anyways.

But your main problem is understanding. the Pi IS the internet on a private network. It can supply the SSID, you would connect your phone to it's broadcast ID. Then once connected you can disable the broadcasting so others don't see it, but you can select your pi from phone to connect to it.

You are thinking about connecting pi to another network your phone is already on, which would require internet, or a wifi signal it also can see. but you SHOULD be able to get the SSID off the phone for that network if it isn't broadcasting but within range, and hard code it in the config files.

presish
Posts: 59
Joined: Mon Nov 17, 2014 9:40 pm

Re: Communication without Internet

Tue Apr 05, 2016 5:33 pm

jbeale wrote:I only used the RPi's internet connection to set it up initially, I could equally well have configured the SD card offline on another machine and then installed it. Once it was setup that one time, it was completely wireless (ran off a battery actually) and I could connect to it from my phone at any later time, without using any external network or anything else. In your initial configuration of the Pi, you can set it to appear as a wifi AP with a fixed known SSID/password or you can even set no security at all so anyone can connect.

When you say you want to use different SSID/password in different people's houses, do you mean you want the Pi to access that person's existing wifi network as a wifi client? This is the case eg. if you are making a smart thermostat, etc. that uses the customer's wifi LAN to connect the internet. If so, of course you need to get their SSID and password. Once they tell you that, then you could pass that to the Pi from your phone as described above with the pi in self-hosted AP mode to talk to your phone, then switch the Pi to normal wifi client mode on the local wifi network. If that's what you want to do.

If your Pi is already permanently sealed into a secure box with no external network, wifi, bluetooth, serial port etc. connection, and you can't ever open that box to do a one-time configuration or change SD cards, and you haven't already set up some network as above, then that is a hard problem and I don't know what to suggest. Except to buy another pi and configure it to do what you want first, before embedding it in concrete. :-)
The self hosted AP makes sense, but could I pass SSID/passphrase if I were to take the RPi into someone else's home? I want to be able to plug the RPi into any random home and send SSID/passphrase to the RPi wirelessly. Then when the RPi receives the info it will connect to the Wifi network corresponding to the SSID/passphrase give. I would need to be able to repeat the procedure in anyone's home. I need my phone to "talk" to the RPi without the RPi being on any network connection. Is this possible?

PiGraham
Posts: 3548
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Communication without Internet

Tue Apr 05, 2016 5:47 pm

This post from another topic may be useful:


max2play wrote:Hi,

this is topic is quite old, but in case anyone is looking for a working solution for WPS you may try Max2Play. This is a Raspbian based SD-card-image that offers WPS-configuration on boot if no LAN is connected. With that you may configure the WiFi of your Pi with just starting it and enableing WPS on your Router. This is optimal for headless devices like audioplayers. Max2Play also offers lots of other usefull features and a web interface for configuration of your Pi.

You may get Max2Play as download on http://www.max2play.com/en/max2play-image/

User avatar
Douglas6
Posts: 4670
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Communication without Internet

Tue Apr 05, 2016 6:17 pm

Alternatively, you could try netconnectd, a part of the octoprint software. Tony Dicola of Adafruit did a video guide here: https://youtu.be/rx70KgloLgs

User avatar
Cancelor
Posts: 756
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: Communication without Internet

Tue Apr 05, 2016 7:24 pm

presish wrote:
jbeale wrote:I only used the RPi's internet connection to set it up initially, I could equally well have configured the SD card offline on another machine and then installed it. Once it was setup that one time, it was completely wireless (ran off a battery actually) and I could connect to it from my phone at any later time, without using any external network or anything else. In your initial configuration of the Pi, you can set it to appear as a wifi AP with a fixed known SSID/password or you can even set no security at all so anyone can connect.

When you say you want to use different SSID/password in different people's houses, do you mean you want the Pi to access that person's existing wifi network as a wifi client? This is the case eg. if you are making a smart thermostat, etc. that uses the customer's wifi LAN to connect the internet. If so, of course you need to get their SSID and password. Once they tell you that, then you could pass that to the Pi from your phone as described above with the pi in self-hosted AP mode to talk to your phone, then switch the Pi to normal wifi client mode on the local wifi network. If that's what you want to do.

If your Pi is already permanently sealed into a secure box with no external network, wifi, bluetooth, serial port etc. connection, and you can't ever open that box to do a one-time configuration or change SD cards, and you haven't already set up some network as above, then that is a hard problem and I don't know what to suggest. Except to buy another pi and configure it to do what you want first, before embedding it in concrete. :-)
The self hosted AP makes sense, but could I pass SSID/passphrase if I were to take the RPi into someone else's home? I want to be able to plug the RPi into any random home and send SSID/passphrase to the RPi wirelessly. Then when the RPi receives the info it will connect to the Wifi network corresponding to the SSID/passphrase give. I would need to be able to repeat the procedure in anyone's home. I need my phone to "talk" to the RPi without the RPi being on any network connection. Is this possible?
No. It is not possible to communicate with the RPi if there is no way of connecting to it.
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

Return to “Networking and servers”