3

Here I explain better what I would like to do with the Pi.

The Raspberry 3 Pi has Minibian installed and serves as a controller for a robot that needs the Wi-Fi connection to work properly.

Up to now I am using it in my house, so I know exactly the SSID and the password of the network, therefore I have set them as a scheme in the network interfaces file so that the Pi can connect to them after the boot.

The problem is that if I want to use the Raspberry in other places, I need to insert manually the new scheme containing the SSID and the password of the new network. So, what I want to do is that if the Pi doesn't find any known network, it builds its own Wi-Fi network (without being connected to internet), so that I can connect to it saying which is the SSID, I want it to connect to, and the related password.

Is it possible to do? Do you have any suggestions?

Darth Vader
  • 4,206
  • 24
  • 45
  • 69
piti_wity
  • 39
  • 1
  • 4
  • Pethaps this may help https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/ –  Jun 11 '17 at 13:42

1 Answers1

4

You can create an access point without Internet connection through the create_ap command line tool.

Features

Internet sharing methods: NATed or Bridged or None (no Internet sharing).

Install create_ap:

git clone https://github.com/oblique/create_ap.git
cd create_ap
make install

AP without Internet sharing:

create_ap -n wlan0 MyAccessPoint MyPassPhrase

Project moved to linux-wifi-hotspot: A GUI interface which use create_ap as CLI. The above above command is valid.

git clone https://github.com/lakinduakash/linux-wifi-hotspot
cd linux-wifi-hotspot
make
wihotspot
GAD3R
  • 442
  • 2
  • 7
  • I get RTNETLINK answers: Operation not possible due to RF-kill to this, will try workarounds like from https://www.raspberrypi.org/forums/viewtopic.php?t=146198 but if you have some consistent reply to this, please share – YakovL Dec 25 '17 at 08:11
  • yeap, after running sudo apt-get dist-upgrade & and then making sure that WiFi is enabled but Pi is not connected to a WiFi network and also running create_ap -n wlan0 MyAccessPoint MyPassPhrase --daemon (all through ethernet) I was able to connect to the new network (SSID of MyAccessPoint) and to SSH (via the static IP) – YakovL Dec 25 '17 at 23:44
  • yeap, I know, but that's not my next target, next target is to launch create_ap on system start so that I can always connect to R Pi via WiFi (without ethernet or additional monitor). My current plan is to explore systemd for that purpose – YakovL Dec 26 '17 at 10:15
  • 1
    @YakovL to launch the daemon at boot time use sudo systemctl enable create_ap – GAD3R Dec 26 '17 at 10:17
  • Hm, I failed to find an explanation: does sudo systemctl enable create_ap makes create_ap be launched with the latest used params? In other words if I use sudo systemctl enable create_ap after create_ap -n wlan0 MyAccessPoint MyPassPhrase it will remember those params? Or should I use those in an opposite order? What sudo systemctl enable create_ap actually does? – YakovL Dec 26 '17 at 21:57
  • @YakovL the above command will enable the daemon at boot , If you need to start the AP at boot you can create a cron job , sudo crontab -e then add the command @reboot create_ap wlan0 wlan0 AP passwd – GAD3R Dec 26 '17 at 22:59
  • Thanks, in the end I've succeeded with @reboot /path/to/create_ap.sh in crontab where the latter has only one command, namely create_ap -n wlan0 MyAccessPoint MyPassPhrase --daemon (after the #!/bin/bash line), but failed to make this work without a separate script: for instance, neither @reboot create_ap -n wlan0 MyAccessPoint MyPassPhrase --daemon nor @reboot create_ap -n wlan0 MyAccessPoint MyPassPhrase --daemon & worked for me – YakovL Dec 31 '17 at 22:53
  • PS I've made a separate question for this bit: https://raspberrypi.stackexchange.com/q/77130/64243 – YakovL Dec 31 '17 at 23:03