sandeepn
Posts: 7
Joined: Wed Mar 15, 2017 7:30 pm

Software solution to setup and operate raspberry pi headless forever

Mon Aug 28, 2017 11:30 pm

Hello Folks,

I had a big pain with Raspberry PI whenever I carried my PI to a new place. I could not operate & connect to the internet without monitor/keyboard, absolutely impractical! :evil: Not sure how many folks face this problem. I and my friend, are trying to develop a software solution to setup and operate raspberry PI forever as a headless device. The solution will consist of a software package install on PI plus a smartphone app.

:?: Is this something people have a need for? How much is the interest?

I am wondering about sharing the solution (almost ready) with the Raspberry community. What are ways to share with the community? Ideally, I would love to make software package part of Raspbian distro itself; that way one does not need monitor/keyboard from start! But not sure what steps I have to take for making part of Raspbian. Any suggestions?

So far I have seen a couple of ways to make raspberry pi to operate in headless setup, PiBakery and Post Install Script. This has few issues like:
  • One time - Does not work when WiFi password is changed or you take PI to a new place. Also when factory reset case
  • Not standard
  • Manual steps involved

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Software solution to setup and operate raspberry pi headless forever

Tue Aug 29, 2017 5:19 am

While I manually setup my Pi via standard SSH headlessly. I think it's good if you could make it easier.

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: Software solution to setup and operate raspberry pi headless forever

Tue Aug 29, 2017 6:07 am

So let me get this straight.

You don't actually have a solution to the problem of having a headless Pi automatically find and connect to whatever network connection is available. Wherever it may be.

But you want to have Raspbian/Debian adopt this non-solution in a package some how.

I don't get it.
Memory in C++ is a leaky abstraction .

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Software solution to setup and operate raspberry pi headless forever

Tue Aug 29, 2017 8:26 am

Welcome to the Raspberry Pi forums.

There are numerous components of Raspbian that were originally created by Raspberry Pi users or enthusiasts.

So go ahead and complete your implementation. Announce it here in these forums. Make the code available via a public repository such as Github, which is what the Raspberry Pi Foundation uses.

If your solution is something that people want and adopt then the Raspberry Pi Foundation will almost certainly notice and might incorporate it into Raspbian.

mattmiller
Posts: 2243
Joined: Thu Feb 05, 2015 11:25 pm

Re: Software solution to setup and operate raspberry pi headless forever

Tue Aug 29, 2017 8:45 am

that way one does not need monitor/keyboard from start! But not sure what steps I have to take for making part of Raspbian. Any suggestions?
In the past, Rpi have been extremely slow to make headless operation easier - it took years before they let us pre-load WiFi credentials via wpa_supplicant

PiBakery has been around for a long time - is mature and proven but RPi still won't adopt it in their standard image and the author has to re-package it up every time RPi do a new release

So chances of your unseen/unproven solution being adopted are very very slim

sandeepn
Posts: 7
Joined: Wed Mar 15, 2017 7:30 pm

Re: Software solution to setup and operate raspberry pi headless forever

Tue Aug 29, 2017 4:55 pm

Heater wrote:
Tue Aug 29, 2017 6:07 am
You don't actually have a solution to the problem of having a headless Pi automatically find and connect to whatever network connection is available. Wherever it may be.

But you want to have Raspbian/Debian adopt this non-solution in a package some how.
I don't get it.
We might be able to a solution to connect automatically any OPEN wifi (password less). But may not be able to provide the IP address obtained by raspberry PI for now. If this is a really great need for all folks, we can do this auto connection with providing IP (lot more tricky and more work).

Assuming our solution is installed in PI, using our smartphone app, one will be able to connect to a WiFi securely without using keyboard & monitor. A user simply needs to enter the WiFi credentials in the app and perform one physical operation like holding phone closer to the pi device for around 15 seconds (more on this later, surprise!). Then Pi gets provisioned with new WiFI credentials and app provides the IP address of the PI.

sandeepn
Posts: 7
Joined: Wed Mar 15, 2017 7:30 pm

Re: Software solution to setup and operate raspberry pi headless forever

Tue Aug 29, 2017 5:13 pm

B.Goode wrote:
Tue Aug 29, 2017 8:26 am
Welcome to the Raspberry Pi forums.

There are numerous components of Raspbian that were originally created by Raspberry Pi users or enthusiasts.

So go ahead and complete your implementation. Announce it here in these forums. Make the code available via a public repository such as Github, which is what the Raspberry Pi Foundation uses.

If your solution is something that people want and adopt then the Raspberry Pi Foundation will almost certainly notice and might incorporate it into Raspbian.
Thanks for the encouraging comment! Soon I will post on how we are doing it.

sandeepn
Posts: 7
Joined: Wed Mar 15, 2017 7:30 pm

Re: Software solution to setup and operate raspberry pi headless forever

Tue Aug 29, 2017 5:21 pm

mattmiller wrote:
Tue Aug 29, 2017 8:45 am
that way one does not need monitor/keyboard from start! But not sure what steps I have to take for making part of Raspbian. Any suggestions?
In the past, Rpi have been extremely slow to make headless operation easier - it took years before they let us pre-load WiFi credentials via wpa_supplicant

PiBakery has been around for a long time - is mature and proven but RPi still won't adopt it in their standard image and the author has to re-package it up every time RPi do a new release

So chances of your unseen/unproven solution being adopted are very very slim
Thanks for the comment Matt. Yes, PiBakery is awesome, I love it. In fact, I would love to integrate our stuff with PiBakery eventually.
Agree that unseen/unproven, but we are just starting to talk about it. Soon I will post about solution regarding how we are doing it.

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Software solution to setup and operate raspberry pi headless forever

Tue Aug 29, 2017 8:17 pm

Your fundamental flaw is that if you're running headless you can't see which of the tens (or more) networks in your neighbourhood is the one you'd like to connect to and when you attempt to connect where do you get the password (and other credentials if it uses something other than WPA/WPA2 for security)?

If you want to play the Amazon Alexa and Google Assistant/Google Chromecast game of fail to associate with any active access point so you start up hostapd and dsnmasq to run as an access point. That's relatively easy to do by hacking the instructions at https://www.raspberrypi.org/documentati ... s-point.md so you activate things when association with an infrastructure AP has failed.

https://www.wired.com/2014/07/rickroll- ... cast-hack/ shows how to RickRoll those things.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

sandeepn
Posts: 7
Joined: Wed Mar 15, 2017 7:30 pm

Re: Software solution to setup and operate raspberry pi headless forever

Wed Aug 30, 2017 3:16 am

Hey Doug,

Thanks for the comment.
DougieLawson wrote:
Tue Aug 29, 2017 8:17 pm
Your fundamental flaw is that if you're running headless you can't see which of the tens (or more) networks in your neighbourhood is the one you'd like to connect to and when you attempt to connect where do you get the password (and other credentials if it uses something other than WPA/WPA2 for security)?
One assumption is that one knows which WiFi to connect and has the credentials. For example, you are visiting your friend's place and friend provides you the WiFi credentials. You can easily provision your phone or laptop with it but NOT raspberry pi. For PI, you need the keyboard/monitor to provision it. This is the use case we are trying to solve i.e. wifi provision without keyboard/monitor. We will have a smartphone app which will be able to handle this use case.

DougieLawson wrote:
Tue Aug 29, 2017 8:17 pm
If you want to play the Amazon Alexa and Google Assistant/Google Chromecast game of fail to associate with any active access point so you start up hostapd and dsnmasq to run as an access point. That's relatively easy to do by hacking the instructions at https://www.raspberrypi.org/documentati ... s-point.md so you activate things when association with an infrastructure AP has failed.

https://www.wired.com/2014/07/rickroll- ... cast-hack/ shows how to RickRoll those things.
Yes, our solution does use the hostapd/dnsmasq. We have secured way to provision the PI device with given wifi credentials using phone app (no keyboard, no monitor).

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Software solution to setup and operate raspberry pi headless forever

Wed Aug 30, 2017 4:43 am

sandeepn wrote:
Wed Aug 30, 2017 3:16 am

One assumption is that one knows which WiFi to connect and has the credentials. For example, you are visiting your friend's place and friend provides you the WiFi credentials. You can easily provision your phone or laptop with it but NOT raspberry pi. For PI, you need the keyboard/monitor to provision it...
Nope. Not correct. Your knowledge is quite out of date.

You can edit a file called wpa_supplicant.conf, and Raspbian even has the provision to put that file into the easily accessible FAT32 formatted boot partition. When Raspbian finds that file it will move it to the correct location and use it to connect. You can also enable SSH by adding an empty file called "ssh" or "ssh.txt" to the boot partition.

With both of those files in place, you can boot a completely headless Pi and have it automatically connect to a wireless network, then SSH into it. No keyboard or mouse needed at all. If you want to connect at other locations, you could keep a copy of the wpa_supplicant.conf file on your smartphone that you could edit and then copy to the Pi's SD card.

I'm not saying it's the easiest solution possible, but you can operate a completely headless Pi right now (and have been able to for awhile).

A basic wpa_supplicant.conf file would look like this:

Code: Select all

network={
	ssid="your-network-service-set-identifier"
	psk="your-network-WPA/WPA2-security-passphrase"
}
EDIT: It seems that Raspbian Stretch does not like the basic wpa_supplicant.conf file, so for the new Raspbian Stretch use the full file:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
	ssid="your-network-service-set-identifier"
	psk="your-network-WPA/WPA2-security-passphrase"
	key_mgmt=WPA-PSK
}
Last edited by HawaiianPi on Thu Aug 31, 2017 2:09 am, edited 1 time in total.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

broe23
Posts: 903
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Software solution to setup and operate raspberry pi headless forever

Wed Aug 30, 2017 6:14 am

The biggest problem is the sites that use Captive portal. That would mean having a screen on the case with the Pi and Battery pack. What would happen is that the program that you have designed for this, also has a Network connection utility. It sounds easy on paper, but it is a lot harder to do than you think.
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

User avatar
HermannSW
Posts: 2651
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Software solution to setup and operate raspberry pi headless forever

Wed Aug 30, 2017 1:02 pm

HawaiianPi wrote:
Wed Aug 30, 2017 4:43 am
sandeepn wrote:
Wed Aug 30, 2017 3:16 am
...
Nope. Not correct. Your knowledge is quite out of date.

You can edit a file called wpa_supplicant.conf, and Raspbian even has the provision to put that file into the easily accessible FAT32 formatted boot partition. When Raspbian finds that file it will move it to the correct location and use it to connect. You can also enable SSH by adding an empty file called "ssh" or "ssh.txt" to the boot partition.

...
HawaiianPi is correct, I just did it, you can find the details in this thread:
https://forum.arduino.cc/index.php?topi ... msg3391465

And you can work with Pi Zero (and Pi Zero W) headless without network just over USB (OTG)!
https://twitter.com/HermannSW/status/900966810069090304
Image

I only have Pi Zeros and ZeroWs, and there is nothing I am missing headless wise.

Hermann.
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264

sandeepn
Posts: 7
Joined: Wed Mar 15, 2017 7:30 pm

Re: Software solution to setup and operate raspberry pi headless forever

Sat Sep 02, 2017 5:48 am

HawaiianPi wrote:
Wed Aug 30, 2017 4:43 am
sandeepn wrote:
Wed Aug 30, 2017 3:16 am

One assumption is that one knows which WiFi to connect and has the credentials. For example, you are visiting your friend's place and friend provides you the WiFi credentials. You can easily provision your phone or laptop with it but NOT raspberry pi. For PI, you need the keyboard/monitor to provision it...
Nope. Not correct. Your knowledge is quite out of date.
Not really. I already mentioned about post install script in the first post (which involves editing wpa_asupplicant.conf file). May be my fault and I should say headless and without any other hack with SD cards. :)
HawaiianPi wrote:
Wed Aug 30, 2017 4:43 am
You can edit a file called wpa_supplicant.conf, and Raspbian even has the provision to put that file into the easily accessible FAT32 formatted boot partition. When Raspbian finds that file it will move it to the correct location and use it to connect. You can also enable SSH by adding an empty file called "ssh" or "ssh.txt" to the boot partition.
Yes, this is one way to do it without keyboard/monitor. But this is still not convenient you need another computing device to edit SD card manually. The solution we are trying is doing headless and no need of mounting SD card and changing files manually.

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Software solution to setup and operate raspberry pi headless forever

Sat Sep 02, 2017 9:17 am

sandeepn wrote:
Sat Sep 02, 2017 5:48 am

Yes, this is one way to do it without keyboard/monitor. But this is still not convenient you need another computing device to edit SD card manually. The solution we are trying is doing headless and no need of mounting SD card and changing files manually.
Like I said, the current solution may not be the easiest, but it works. You made some very finite and incorrect statements above that basically said it was impossible without your solution, and that's simply not true. Not trying to discourage you here, just trying to keep the FUD under control. If you can make the process easier, then by all means go for it. Just don't imply it's impossible without you, because many of us have been running completely headless Pis for some time now.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

sandeepn
Posts: 7
Joined: Wed Mar 15, 2017 7:30 pm

Alpha release sign up: Headless WiFi provisioning of Raspberry Pi after install

Tue Dec 05, 2017 9:19 pm

Hello Folks,

As mentioned a few months back, we have a secure mechanism for headless provisioning of Raspberry Pi only after software package is installed. This an FREE alpha level release and we need feedback on this.

Sign up here: http://woluxi.com/pi/index.html

We have the unique mechanism to make it secure provisioning by scanning blinking LED on a raspberry PI. Credentials/Key is transmitted via blinking LED.

Also check demo video: https://www.youtube.com/watch?v=wHRmo3JGAFM

Again Woluxi WiFi provisioning software needs to be installed on PI first before it works as a headless device. Once installed, you can operate as a headless PI device.

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: Software solution to setup and operate raspberry pi headless forever

Tue Dec 05, 2017 10:28 pm

Sounds like a load of wolux to me.
Memory in C++ is a leaky abstraction .

Return to “General discussion”