Do you allow this site to use Cookies?

There are many guides for creating a Raspberry Pi Access Point but from Raspbian 9 Stretch the network setup has changed, which means a lot of guides are out of date. So this guide is about setting up a Raspberry Pi Hotspot for Raspbian 9 Stretch onwards, it also works for Raspbian 8 Jessie and Raspbian 10 Buster.

I have two other guides on how to set up an automatic Raspberry Pi Access Point, which connects to your home network when you are at home and generates a hotspot when you are out.

For the Autohotspot guide to setup an internet routed hotspot suitable for RPi4, RPi3, RPi2 & Rpi: Click Here
For the Autohotspot guide to setup a non internet routed hotspot suitable for RPi ZeroW and RPi Zero: Click Here

Easy Installer Script: the setup in this guide is available in an installer at Raspberry Pi AutoHotspot and Static Hotspot Installer Script

Aim:

  • This guide will go through how to set up a permanent hotspot for both internet routed, for RPi's with network ports, and non internet routed hotspots for Pi Zero/W 

 Requirements:

This has been tested on Raspbian Jessie, Raspbian Stretch and Raspbian Buster. To see which version you have enter the command lsb_release -a

  • Raspberry Pi 4
  • Raspberry Pi 3 or 3 B+
  • Raspberry Pi 1 or 2 with a Wifi Dongle*,
  • Raspberry Pi Zero W and Zero with WiFi Dongle* (internet hotspot not useable as it has no ethernet port.

 

*some WiFi dongles don't work in adhoc mode or don't work with with the nl80211 driver used in this guide for RPi4, RPi 3, RPi3 B+ & Pi Zero W inbuilt wifi, so you may want to check this first before starting.

To see if your usb WiFi dongle can be used as an access point enter the command; iw dev ,scroll to section "Supported interface modes:" and look for * AP

 

Note:

Dnsmasq bug: in versions below 2.77 on Jessie and Stretch, there is a recent bug that may cause the hotspot not to start for some users. This can be resolved by removing the dns-root-data. It may be benificial to do this before you start the rest of the installation as it has been reported that doing it after installation for effected users does not work but you won't know if it is an issue until after the installation is complete.

check your version with : dpkg -s dnsmasq

versions 2.77 and above are ok. If not then try the command:

sudo apt-get purge dns-root-data

thanks to danny for highlighting this.

 

Note about Raspbian Buster and Stretch Network Device Names

For Raspbian Stretch and Buster there has been changes to how the network drivers are named, called Predictable Network Interface Names,  and may be different for the usual wlan0 and wlan1 for wifi and eth0 for ethernet connections. Though the official Foundation version of Raspbian seems to be keeping to the old standard names, at least at the time of writing,  this may not always be the case. For this guide I will use wlan0 as the device that is used.  

To check the device name for your setup enter the commmand iw dev and take a note of the "Interface" name. For wifi it should start with wl , replace your device name with any reference to wlan0 in the article, scripts and config files.

 

Step 1:

To start with hostapd hotspot client and dnsmasq lightweight dns server need to be installed.

Open a Terminal session.

Update Raspbian with the latest updates by entering the commands:

sudo apt-get update
sudo apt-get upgrade

 To install hostapd enter the command:

sudo apt-get install hostapd

enter Y when prompted.

To install dnsmasq enter the command:

sudo apt-get install dnsmasq

enter Y when prompted

The installers will have set up the programme so they run when the pi is started and activated them. While we set the hotspot we should stop them running. This is done with the following commands:

sudo systemctl stop hostapd
sudo systemctl stop dnsmasq

Now the hostspot configuration file can be setup. This contains the name of the WiFi signal you will need to connect to (SSID) and the security password.

To edit the configuration files I will be using the nano text editor but if you prefer an editor with an point and click interface then replace nano with leafpad in the following instructions.

Hostapd Configuration

Using a text editor edit the hostapd configuration file. This file won't exist at this stage so will be blank.

sudo nano /etc/hostapd/hostapd.conf

download file here:

interface=wlan0
driver=nl80211
ssid=RPiHotSpot
hw_mode=g
channel=6
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=1234567890
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

  • The interface will be wlan0
  • The driver nl80211 works with the Raspberry Pi 4, 3, 3 B+  & Pi Zero W onboard WiFi but you will need to check that your wifi dongle is compatable and can use Access Point mode.

For more information on wifi dongles see elinux.org/RPi_USB_Wi-Fi_Adapters

  • The SSID is the name of the WiFi signal broadcast from the RPi, which you will connect to with your Tablet or phones WiFi settings.
  • Channel can be set between 1 and 13. If you are having trouble connection because of to many wifi signals in your area are using channel 6 then try another channel.
  • Wpa_passphrase is the password you will need to enter when you first connect a device to your Raspberry Pi's hotspot. This should be at least 8 characters and a bit more difficult to guess than my example.

To save the config file press ctrl & o and to exit nano press Ctrl & x

Now the defaults file needs to be updated to point to where the config file is stored.
In terminal enter the command

sudo nano /etc/default/hostapd

Change:
#DAEMON_CONF=""
to
DAEMON_CONF="/etc/hostapd/hostapd.conf"

Check the DAEMON_OPTS="" is preceded by a #, so is #DAEMON_OPTS=""

And save.

A recent change in hostapd means the service will be masked, so hostapd won't start when you reboot. To Unmask the hostapd service enter:

  • sudo systemctl unmask hostapd
  • sudo systemctl enable hostapd

Once you have completed the rest of the setup and rebooted Hostapd will start and generate the hotspot settings.

DNSmasq configuration

Next we need to update the DNSmasq.conf file. There are two setups depending if you need internet access or not.

DNSmasq Config 1 - No Internet

Open the dnsmasq.conf file with

sudo nano /etc/dnsmasq.conf

Go to the bottom of the file and add the following lines (download here)

 


#RPiHotspot config - No Intenet
interface=wlan0
domain-needed
bogus-priv
dhcp-range=192.168.50.150,192.168.50.200,255.255.255.0,12h

and the save (ctl & o) and exit (ctrl & x)

DNSmasq Config 2 - Internet Routed

Open the dnsmasq.conf file with

sudo nano /etc/dnsmasq.conf

Go to the bottom of the file and add the following lines (download here)


#RPiHotspot config - Internet
interface=wlan0
bind-dynamic 
domain-needed
bogus-priv
dhcp-range=192.168.50.150,192.168.50.200,255.255.255.0,12h

and the save (ctl & o) and exit (ctrl & x)

 

Step 2:

Now that hostapd and dnsmasq are configured we now need to make some changes to the interfaces file, the dhcpcd.conf file, setup ip_forwarding.

Interfaces File

The interfaces file is not required and should be empty of any network config. Depending which version of Raspbian you have this file may still contain network config.

Enter

sudo nano /etc/network/interfaces

If your file shows more than the standard top 5 lines like this


# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

then make a copy of your file and then remove any excess lines from the interfaces file.

To make a backup of your interfaces file first, use the command

sudo cp /etc/network/interfaces /etc/network/interfaces-backup

DHCPCD.conf

Next we need to update the dhcpcd.conf file. Open the file with

sudo nano /etc/dhcpcd.conf

then scroll to the bottom of the file and add the line (Download here)

nohook wpa_supplicant
interface wlan0
static ip_address=192.168.50.10/24
static routers=192.168.50.1

If you are setting up the Internet routed hotspot then also include

static domain_name_servers=8.8.8.8

now save (ctrl & o) and exit (ctrl & x)

The line 'nohooks wpa_supplicant' will stop the network wifi from starting if you have an entry in /etc/wpa_supplicant/wpa_supplicant.conf . If this is not done then network wifi will override the hotspot.

This next bit is only if you would like devices to have internet access. If not skip to "Testing the Hotspot".

 ip forwarding

For the internet to be available when an Ethernet cable is attached, IP forwarding needs to be activated. To do this enter

sudo nano /etc/sysctl.conf

look for the line

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

and remove the # so it is

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

now save (ctrl & o) and exit (ctrl & x)

Next the rules need to be added that will allow any device connected to the access point to be able to use the internet. This is done with IP Table rules which will need to be loaded every time the Raspberry Pi starts up. So a service file can be setup to do this.

There is a program called netfilter-persistent that can do this but it is simple to setup a custom service instead.

First create the file for the ip table rules.

sudo nano /etc/iptables-hs

add the lines below or download from here

#!/bin/bash
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT

now save (ctrl & o) and exit (ctrl & x)

Update the permissions so it can be run with

sudo chmod +x /etc/iptables-hs

Now the service file can be created which will activate the ip tables each time the Raspberry Pi starts up

Create the following file

sudo nano /etc/systemd/system/hs-iptables.service

Then add the lines below of download from here


[Unit]
Description=Activate IPtables for Hotspot
After=network-pre.target
Before=network-online.target

[Service]
Type=simple
ExecStart=/etc/iptables-hs

[Install]
WantedBy=multi-user.target

now save (ctrl & o) and exit (ctrl & x)

To activate the service file, so it starts at every boot up, enter the command

sudo systemctl enable hs-iptables

 

Testing the Hotspot

The hotspot setup is now complete. To test that the setup is ok reboot the RPi.

 Once the RPi is up and running the wifi icon near the clock should now be two arrows facing opposite directions networkdown This means it is an access point. On a Tablet, phone or Laptop scan for wifi signals. You should see one for RPiHotSpot.

Select this as the wifi signal to connect to. The password is what you setup in the hostapd.conf file. From my example it is 1234567890

rpiHotspot android

Local wifi signals in range on Android. You will see RPiHotSpot and not RPiHotN

For SSH and VNC the connection ip is 192.168.50.10 also if you have setup the RPi as a webserver use the same ip to see the webpage.

For ssh use ssh This email address is being protected from spambots. You need JavaScript enabled to view it.

For vnc use 192.168.50.10::5900

If you have setup the Internet routed configuration. Connect an ethernet cable to the Raspbery Pi and your router and wait a few seconds. The hotspot will now allow connected wifi devices to use the internet as well as the Raspberry Pi

 Once you are happy the setup is working ok then your done.

 

Script Removal

If you don't wish to continue using the Hotspot then the Raspberry Pi can be revered back to a standard wifi setup with the following steps.

Stop the Hostapd and dnsmasq services with the commands

sudo systemctl disable dnsmasq

sudo systemctl disable hostapd

In the /etc/dhcpcd.conf file remove the lines added at the bottom of the file.

#Static Hotspot
nohook wpa_supplicant
interface wlan0
static ip_address=192.168.50.10/24
static routers=192.168.50.1
static domain_name_servers=8.8.8.8

If you had previous config in your interfaces file and made a backup you can restore your original interfaces file with the command

sudo mv /etc/network/interfaces-backup /etc/network/interfaces

If you didn't setup an internet routed hotspot then your done, after a reboot your RPi will not longer be an Access Point. For Internet routed Hotspots you also need to do the following;

Disable the hs-iptables service with the command

sudo systemctl disable hs-iptables

Then disable ip forwarding

sudo nano /etc/sysctl.conf

look for the entry

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

and add a # as follows

# Uncomment the next line to enable packet forwarding for IPv4
# net.ipv4.ip_forward=1

Then reboot and the Raspberry Pi will be back to the standard wifi setup.

 

 Trouble Shooting

  • If you get no wifi connection or no hotspot and have this icon networkdownthen it is most likley there is an error in one of the configuration files.
  • If the RpiHotspot signal can't be seen by another device, Use the command sudo systemctl status hostapd to see if there is an error with Hostapd.
  • If Hostapd has an error that it is Masked then try
    • sudo systemctl unmask hostapd
    • sudo systemctl enable hostapd
    • sudo systemctl start hostapd
  • If you don't get an internet connection when an ethernet cable has been attached, with the Internet routed setup, then you can check the ip table rules have been activated with the command sudo iptables -S If you don't see any rules but just get
    -P INPUT ACCEPT
    -P FORWARD ACCEPT
    -P OUTPUT ACCEPT
    

    then make sure the service was enabled with the command sudo systemctl enable hs-iptables and the iptables file has the correct prmissions with sud chmod +x /etc/iptables-hs
  • You can connect to the hotspot via an Android Phone but you can't get a ssh connection. Some users have found this issue where Android uses their data connection rather than the wifi. Disabeling data has allowed them to use ssh.  

Add comment


Comments  
# Peter Merchant 2020-05-27 10:08
A stupid little thing I know, but it is a good tutorial. My thing is that it is not dated so when I find a reference like this I do not know if it is current. I have been running my Pi zero W as a AP for a year now, but am having trouble with Hostapd when I upgrade the software. Today's searh is to find the latest version for the R-Pi and upgrade that.
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2020-05-28 14:05
Hi Peter

The article is a couple of years old but is up to date as stated at the top that it works and has been tested on the Raspberry Pi 4 and Raspbian Buster. But I get your point that the default option of created date dosn't help when looking for newer content so I have changed it to modified date.
Reply | Reply with quote | Quote | Report to administrator
# TanKil 2020-05-22 14:44
Hi,

thank you for this nice tutorial.

Everything works fine if I use the access point over wired eth0. But If I use it over wlan0 (wlan0=access point, wlan1=replacement for eth0), I can not reach the other local hosts any more:

"PING 192.168.178.32 (192.168.178.32) 56(84) bytes of data.
From 192.168.178.34 icmp_seq=1 Destination Host Unreachable"

I can reach only remote hosts in internet.
I can ping the local hosts again If I disable the hostapd. But after that the access point doesn't work any more as a result.

Can anyone help?

I use it on a Raspery Pi 3 B+ with Buster.
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2020-05-22 15:50
Hi TanKil

The setup won't work with wlan1 as wifi is disabled. You will need to alter the entries from the guide that were done in /etc/dhcpcd.conf to

denyinterface wlan0
interface wlan0
static ip_address=192.168.50.10/24
nohook wpa_supplicant wlan0

with the ip tables changes to wlan1 then it should work for you.
Reply | Reply with quote | Quote | Report to administrator
# TanKil 2020-05-22 16:46
Hi roboberry,

thanks for the quick reply. I did these settings already. But still no success:


dhcpcd.conf:
interface wlan1
static ip_address=192.168.178.33/24
static routers=192.168.178.1
static domain_name_servers=192.168.178.1 8.8.8.8 8.8.4.4
static domain_search=

denyinterface wlan0
interface wlan0
static ip_address=192.168.178.34/24
nohook wpa_supplicant wlan0


rules for itables:
#!/bin/bash
iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
iptables -A FORWARD -i wlan1 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT
exit 0


dnsmasq.conf:
interface=wlan0
bind-dynamic
domain-needed
bogus-priv
dhcp-range=192.168.178.100,192.168.178.150,255.255.255.0,12h # IP range and lease time
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2020-05-22 18:10
Hi TanKil

I believe the issue is wlan0 & wlan1 both have the same gateway but are on different networks.

I presume your Wifi Router is on 192.168.178.1
so you want the PI to appear on your wifi network as 192.168.178.33 through wlan1

The Hotspot is a different network and gives connected Wifi devices the ip addresses in the dnsmasq.conf dhcp-range. The hotspots IP they connect to is the IP in dhcpcd.conf for wlan0.

The Pi itself will have the IP address your router gives through wlan1.

I would change dnsmasq.conf to
dhcp-range=192.168.50.150,192.168.50.150,255.255.255.0,12h

and dhcpcd.conf for wlan0 to
static ip_address=192.168.50.10/24

and try it again.
Reply | Reply with quote | Quote | Report to administrator
# TanKil 2020-05-22 18:46
Hi robobery,

that is it! It works like a charm!

Thank you!!!
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2020-05-23 10:22
Hi TanKil
No Probleml, glad you're up and running.
Reply | Reply with quote | Quote | Report to administrator
# Frederik 2020-05-10 17:12
Hi, thanks for the tutorial. I've got the hotspot working (No Internet). The only issue is, that the ip address I retrieve from ifconfig (169.254.214.159) is different from the one I've set (192.168.8.10). For SSH I have to use the ip address I get from ifconfig. Any idea what could cause the issue here? Thanks in advance!
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2020-05-10 18:28
Hi Frederik

The 169.254 ip is because of an error meaning the correct ip can't be generated.

If you have changed the ip address in /etc/dhcpcd.conf
to
static ip_address=192.168.8.10/24
static routers=192.168.8.1

you also need to change it in /etc/dnsmasq.conf.

The dhcp-range from

dhcp-range=192.168.50.150,192.168.50.200,255.255.255.0,12h
to
dhcp-range=192.168.8.150,192.168.8.200,255.255.255.0,12h

the first 3 digits of the ip need to match ###.###.## what ip has been set. The 4th digit is the range connected devices will receive 150 -200.

This should solve your issue. Let me know if you have further issues.
Reply | Reply with quote | Quote | Report to administrator
# Frederik 2020-05-10 18:47
Hi, thanks for the quick reply. My problem has been solved. Although this wasn't the issue. After checking that all ips started with said address I noticed that I had misspelled ip_address in /etc/dhcpcd.conf. Since "address" is only spelled with one 'd' in german I make that mistake too often.
Sorry for wasting your time, but thanks again for the quick reply.
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2020-05-10 19:57
Hi Frederik

Ah I can understand the issue :) Glad you have it sorted now. No problem.
Reply | Reply with quote | Quote | Report to administrator
# Bob 2020-04-29 19:41
Hi I have got the hotspot working with an Ip's from 192.168.5.150 to 200. My main network uses Ip addresses in the range 192.168.1.xxx. I can connect to the hotspot with my tablet and thence to the internet. I would like IOT devices connected to the hotspot to be able to connect to devices on my main network and vice versa. I.e. An IOT devices on 192.168.5.60 to send data to an MQTT broker on 192.168.1.119. Can that be done by modifying the hotspot? Could you tell me how to do it please or point me to some guidance.
Either way thank you for a brilliant tutorial that works!
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2020-04-30 10:40
Hi Bob, Thanks, you're welcome.
Yes it can be done, I have just done a test with a group of Pi's. Any device on the hotspot can access the home network via ssh fine but as it stands the devices on the network had to ssh to the Hotspot Pi first and then ssh to the device connected the hotspot. So to complete the route you would need to add additional routing iptables to route the data via IP address from the IOT device.

You can set any device on the hotspot a static ip by adding the mac address details of the IOT to dnsmasq.
Firstly find the mac address of the IOT device that will be connected to the hotspot
in /etc/dnsmasq.conf enter the line
dhcp-host=xx:xx:xx:xx:xx:xx,192.168.5.60 where xx is the mac address
This IP does not need to be in the 150-200 range of dhcp-range but does have to match the first 3 numbers of the ip ###.###.#

If you are using Raspbian Buster and going to do additional routing then you may want to look at NFtables. Iptables have been depreciated but the rules still work via NFtables. NFtables for routing is the way forward. I will be updating this guide and the other hotspot scripts with NFtables soon. Raspbian Stretch needs IPtables.
Reply | Reply with quote | Quote | Report to administrator
# Chris 2020-04-21 22:29
Thanks, the hotspot is up and running. But I can't get it to route an internet connection form my wlan1. I'm missing somthing since buster version (interfaces) is different from previous raspbians. I have changed your eth0 to wlan1. but what else? some config in dhcpcd or dnsmasq? BR Chris
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2020-04-21 23:29
Hi Chris

The problem is the wifi connection in dhcpcd is disabled with the nohooks line. If you change your dhcpcd.conf entry to

denyinterface wlan0
interface wlan0
static ip_address=192.168.50.10/24
static routers=192.168.50.1
nohook wpa_supplicant wlan0

then wlan1 will work again.

Raspbian is still using unpredictable network interfaces ie wlan0 wlan1. You can't control if your internal or usb wifi will be wlan0. So you may find they swap between boots.

The predicable network Interfaces feature would give the device name of wl######## where # is your mac address. Then changing wlan0 and wlan1 references to the predictable device names would control which device is the hotspot. But currently predictable is off by default for Raspbian.

Hope this helps.
Reply | Reply with quote | Quote | Report to administrator
# Chris 2020-04-22 22:10
After a couple of tries back and forth between dnsmasq and dhcpcd. I notice that all works well with your example if I remove static routers row in dhcpcd. Thank you so much for helping out and a great guide.

Annoying with buster version and too little formal information on the connections between network/interfaces, dnsmasq and dhcpcd.
Reply | Reply with quote | Quote | Report to administrator
# Chris 2020-04-22 17:26
Thnx for the fast response.
wlan0 is the access point and wlan1 is associated with my wifi network, so I can ssh back to the Pi from a network-connected computer. But I can't reach the internet, neither on the RPi or with my phone connected to the access point Wlan0.

I did the config: #RPiHotspot config - Internet
And added static domain_name_servers=8.8.8.8 to dhcpcd.conf

sudo iptables -S give me:
-A FORWARD -i wlan1 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i wlan0 -o wlan1 -j ACCEPT

Something lacking wlan1 to give internet access?
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2020-04-23 13:24
Hi Chris

Thanks for letting me know. I last done the wlan0 to wlan1 setup in Raspbian Stretch so maybe thats an issue with Buster now.

It is difficult to find info. Most guides are old and reference network/interfaces which is depreciated in Raspbian so causes setup issues.

To add to the issue Buster uses NFtables instead of IPtables. Though the guide still uses IPtables which works for now it will be updated shortly to NFtables, just going to release an installer first then will be updating the routing.
Reply | Reply with quote | Quote | Report to administrator
# TC 2020-02-01 11:12
Nice job on the tutorial.

Thanks.
Reply | Reply with quote | Quote | Report to administrator
# Dazz 2019-10-06 09:15
IPtables is also depreciated. NFtables is the new kid in town.
Reply | Reply with quote | Quote | Report to administrator
# Roboberry 2019-10-06 10:04
I wasn't aware of that one. I will check it out. thank you
Reply | Reply with quote | Quote | Report to administrator
# Dazz 2019-10-05 10:27
Hi. Great write up. I found that DAEMON_CONF= is depreciated and support will be removed. Does or should that change your instructions?
Reply | Reply with quote | Quote | Report to administrator
# roboberry 2019-10-05 11:40
Thanks Dazz. I saw that it is going to be depreciated in a future release, so I will look into that when I do some updates to the Autohotspot articles in the near future. I think that is just being dropped and /etc/hostapd/hostapd.conf will be standard. If that's the case that step will be skipped but I will look into in more detail. But thanks for highlighting, easily missed on the install message.

Roboberry.
Reply | Reply with quote | Quote | Report to administrator
# Jannes 2019-08-25 09:14
Hello, my hotspot dont work and I think I know why. Because the /etc/dhcpcd.conf file was empty when I opened it. I think I deleted all accidentally, because Im not good at the terminal and I tried it a few times. Can you give me the content of the file, so I can paste it into my file? (My English isnt very good, sorry)
Reply | Reply with quote | Quote | Report to administrator
# Roboberry 2019-08-25 10:03
Hi Jannes, I have sent you the file via email.
Reply | Reply with quote | Quote | Report to administrator
# Roboberry 2019-08-25 10:27
hi Jannes, I keep getting a return on your email. Can you email me direct admin@ this site and I will send it to you.

This is the dhcpcd.conf file with the comments removed:

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
hostname
clientid
persistent
option rapid_commit
option interface_mtu
require dhcp_server_identifier
slaac private

#This section for the static hotspot
#Static Hotspot
nohook wpa_supplicant
interface wlan0
static ip_address=192.168.50.10/24
static routers=192.168.50.1
Reply | Reply with quote | Quote | Report to administrator
# Martin 2019-08-21 08:49
Hi, thanks for the script. I like the new design of your website, but it's a shame, that all those valuable comments below this article dissapeared.
I have one more suggestion. If you set up wifi in /boot/wpa_supplicant.conf on windows - some text editors put windows line endings to this file and that is the issue for the script. So make sure you use dos2unix on wpa_supplicant.conf file.
Reply | Reply with quote | Quote | Report to administrator
# Roboberry 2019-08-21 09:57
Hi Martin

Thanks, I had to change some of the background software which meant the comments couldn't be extracted. All three hotspot scripts have been out there for a few years, so well tested. Most of the issues where user error or feature request any bugs found have been addressed. I plan on updating the trouble shooting section for a bit more self help.

For the wpa_supplicant file. I have only ever put it in the boot folder from a linux machine. If it's created on windows does the Pi happily use it but the hotspot scripts fail to recognise it? Th PI should fail to use it the top 3 config lines are missing.
This article doesn't use wpa_supplicant so I presume you are referring to the auto scripts?
Reply | Reply with quote | Quote | Report to administrator