#!/bin/bash | |
# | |
# This version uses September 2017 august stretch image, please use this image | |
# | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi | |
if [[ $# -lt 1 ]]; | |
then echo "You need to pass a password!" | |
echo "Usage:" | |
echo "sudo $0 yourChosenPassword [apName]" | |
exit | |
fi | |
APPASS="$1" | |
APSSID="rPi3" | |
if [[ $# -eq 2 ]]; then | |
APSSID=$2 | |
fi | |
apt-get remove --purge hostapd -yqq | |
apt-get update -yqq | |
apt-get upgrade -yqq | |
apt-get install hostapd dnsmasq -yqq | |
cat > /etc/dnsmasq.conf <<EOF | |
interface=wlan0 | |
dhcp-range=10.0.0.2,10.0.0.5,255.255.255.0,12h | |
EOF | |
cat > /etc/hostapd/hostapd.conf <<EOF | |
interface=wlan0 | |
hw_mode=g | |
channel=10 | |
auth_algs=1 | |
wpa=2 | |
wpa_key_mgmt=WPA-PSK | |
wpa_pairwise=CCMP | |
rsn_pairwise=CCMP | |
wpa_passphrase=$APPASS | |
ssid=$APSSID | |
ieee80211n=1 | |
wmm_enabled=1 | |
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40] | |
EOF | |
sed -i -- 's/allow-hotplug wlan0//g' /etc/network/interfaces | |
sed -i -- 's/iface wlan0 inet manual//g' /etc/network/interfaces | |
sed -i -- 's/ wpa-conf \/etc\/wpa_supplicant\/wpa_supplicant.conf//g' /etc/network/interfaces | |
sed -i -- 's/#DAEMON_CONF=""/DAEMON_CONF="\/etc\/hostapd\/hostapd.conf"/g' /etc/default/hostapd | |
cat >> /etc/network/interfaces <<EOF | |
# Added by rPi Access Point Setup | |
allow-hotplug wlan0 | |
iface wlan0 inet static | |
address 10.0.0.1 | |
netmask 255.255.255.0 | |
network 10.0.0.0 | |
broadcast 10.0.0.255 | |
EOF | |
echo "denyinterfaces wlan0" >> /etc/dhcpcd.conf | |
systemctl enable hostapd | |
systemctl enable dnsmasq | |
sudo service hostapd start | |
sudo service dnsmasq start | |
echo "All done! Please reboot" |
This comment has been minimized.
This comment has been minimized.
I suggest to share the eth0 connection that you add This will allow the traffic to pass through the wifi AP and out via the ethernet connection. |
This comment has been minimized.
This comment has been minimized.
Hi @vhgarandil, Thanks for the suggestions, this is not a script to setup a wireless->ethernet bridge, however it is a good idea for an additional script to allow using a device (doesn't matter really if it's ethernet or another wifi dongle). The main purpose of this script is to provide an access point with guest network (for now). But I may consider adding this, as many have asked for it |
This comment has been minimized.
This comment has been minimized.
I am a very very new user having just received my rPi3 running Raspbian. In at the deep end I know but I thought this function would be useful. I have been able to compile the script and even run it, but am at a loss at getting past "you need a password!" Can you give me a prod in the right directions? Thanks if you can take the time to no doubt tell me the obvious! |
This comment has been minimized.
This comment has been minimized.
I find this very useful. Could you add some options to help the user to share the eth0 connection through wifi. |
This comment has been minimized.
This comment has been minimized.
Hi @ipplepen So once you run the script, you can run |
This comment has been minimized.
This comment has been minimized.
Thanks, I'm looking right now at releasing something separate for that, so that you can share eth0, or any other networking device; I believe @vhgarandil suggestion (see above) will work for bridging eth0 as the primary connection, but to make a script do this; I think they should be separate scripts for people like me that don't want a bridge or repeater station. |
This comment has been minimized.
This comment has been minimized.
I have some problems with this script. The other thing is an error I get on line 50 (when I remove the redirection that is) What am I doing wrong please? |
This comment has been minimized.
This comment has been minimized.
@elck nice catch on APSSID vs APNAME, must have renamed a var and forgot to copy to / update all lines (managing this via git might have been a better idea) can I ask if you are using this on a raspberry Pi 3 using raspbian? Most of the steps are entirely applicable on any debian based Linux on the Pi3, but raspbian has the official rPi3 hardware libs; so I'd advise using that (they have a lite edition now) Thanks for the feedback, keep me updated |
This comment has been minimized.
This comment has been minimized.
I have tried this script. All seems to be ok on the RPI3 side. But non of my devices at home are able to connect to the AP. Any help would be appreciated. |
This comment has been minimized.
This comment has been minimized.
can I ask the exact commands you ran? Most devices should be able to connect to the rPi3, although it's not an internet pass-through Access-Point; it's so you can access your Pi to help to configure it with fewer wires |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hello, i copy the code. and type chmod-R 755 root@HaRuVerhuur-Matrix:/home# ./rpi3-ap-setup.sh testing aptest Grees Ruben Dijk |
This comment has been minimized.
This comment has been minimized.
@RubenDijk
The current code checks if the number of command line parameters is not equal to one (-ne 1). Since you specify the optional apName parameter, you have two parameters which causes the test to fail and hence the 'You need to pass a password!' error message. _Author FYI_ |
This comment has been minimized.
This comment has been minimized.
This works for me, but only if I add the following line to rc.local: service hostapd start I put it right before the "service dnsmasq restart". |
This comment has been minimized.
This comment has been minimized.
Syntax error: "fi" unexpected (expecting "then") |
This comment has been minimized.
This comment has been minimized.
Hi, |
This comment has been minimized.
This comment has been minimized.
I have this problem. |
This comment has been minimized.
This comment has been minimized.
@lvhailong This is a shell script as denoted by the shebang at the top and |
This comment has been minimized.
This comment has been minimized.
Thanks @usertaken @navaneetharaopy you would have to edit the /etc/rc.local, but also disable hostapd and dnsmasq services
|
This comment has been minimized.
This comment has been minimized.
that should not be required as dnsmasq is started on the next line. Hostapd is started within the script too! |
This comment has been minimized.
This comment has been minimized.
I see where dnsmasq is started. Where is hostapd started? The "hostapd - B ..." command on the last line fails (for me) unless the service is started first. Do you have to run "sudo update-rc.d hostapd enable" or something like that for it to work without explicitly starting the service in rc.local? |
This comment has been minimized.
This comment has been minimized.
I'm having a really similar problem, getting the errors
but not the other stuff. Anyone have a solution? |
This comment has been minimized.
This comment has been minimized.
I tried sudo hostapd /etc/hostapd/hostapd.conf drv->ifindex=3 |
This comment has been minimized.
This comment has been minimized.
No one can help with @adiroman, @SammoMate AND my problem? |
This comment has been minimized.
This comment has been minimized.
@marianomarini @adiroman @SammoMate I just used the script on a fresh jessie-lite image from the raspberry pi website. The only issue I encountered was one line for the access-point name which should now be fixed. This works with fresh jessie-lite image, not sure what could be interfering |
This comment has been minimized.
This comment has been minimized.
Everything works perfectly, but I can not access the internet on my phone when connected to my pi. What should I change in order to be able to connect to the internet? |
This comment has been minimized.
This comment has been minimized.
Many thanks @lewiscoles1986 - worked out of the box! Thank you :) (If the bridge script were to come along that would be fantastic :)) |
This comment has been minimized.
This comment has been minimized.
I'll add the bridge script soon and link here |
This comment has been minimized.
This comment has been minimized.
Not work for me .
|
This comment has been minimized.
This comment has been minimized.
root@kali yeah, looks like raspbian @mehranexpert... this is for specific hardware and software _RASPBERRY PI 3 & OFFICIAL RASPBIAN_ You might want to checkout resin.io |
This comment has been minimized.
This comment has been minimized.
I have the same issue than @adiroman I install the latest version of RASPBIAN JESSIE LITE on my Raspberry Pi Model 3
All seems to be good, but when I run This is the output:
|
This comment has been minimized.
This comment has been minimized.
why are you running anything, just reboot the pi, it should automatically start... I'm going to make a slightly modified one using systemd service instead of hacky approach to |
This comment has been minimized.
This comment has been minimized.
_.bash_history_
I did see some error messages on boot, but I still have the apname show up in my list (which is new for me, as I generally pick one) |
This comment has been minimized.
This comment has been minimized.
Also there is now a newer version using systemd, and this companion script for anyone wanting to pass through an adapter. |
This comment has been minimized.
This comment has been minimized.
Hello everyone, i'll always receive "errors were encountered while processing:hoastapd" during the setup. |
This comment has been minimized.
This comment has been minimized.
Dear All, I want to use Rpi 3's wifi in both Access Point and Station mode simultaneously or at a time one but without reconfigure(reboot the pi).And now, i did to both mode individual configure and work its fine but problem is every time configure change for individual mode. |
This comment has been minimized.
This comment has been minimized.
How to setting up a kind of bridge between eth0 and wlan0 like @vhgarandil told. I don't get it it's not working for me. Please you upload a kind of other script just for doing a bridge? (I'd like to access to internet by the AP) I'm still waiting for it. Keep updating i like what you do @Lewiscowles1986! |
This comment has been minimized.
This comment has been minimized.
@nenoork, there is another script linked above... Please go to this url https://gist.github.com/Lewiscowles1986/f303d66676340d9aa3cf6ef1b672c0c9 |
This comment has been minimized.
This comment has been minimized.
@PratikGajera I'm really sorry I don't understand what you are asking |
This comment has been minimized.
This comment has been minimized.
I am asking about that which way to configure wifi that run it both mode station and Access Point. |
This comment has been minimized.
This comment has been minimized.
Script runs great, but how do you revert back to station mode? |
This comment has been minimized.
This comment has been minimized.
and adding
|
This comment has been minimized.
This comment has been minimized.
Just ran this on my raspberry pi 3 and now I no longer have a wifi interface in raspbian. Does this require having another usb wifi adapter plugged in? |
This comment has been minimized.
This comment has been minimized.
Also, How do I completely remove this? |
This comment has been minimized.
This comment has been minimized.
@goodpunk6 this does not require a second wifi adapter unless using as a range extender... @goodpunk6 to remove this try the following
then add alternatively backup your home folder and re-flash the jessie-pixel or jessie-lite image |
This comment has been minimized.
This comment has been minimized.
It would be really nice to have a way to automacally revert the chages made by this script, so that one could get back to normal use of your RPi as easily. |
This comment has been minimized.
This comment has been minimized.
@goodpunk6 I've got the same problem as you: no wireless interfaces found |
This comment has been minimized.
This comment has been minimized.
how i connect rspi3 to a network? |
This comment has been minimized.
This comment has been minimized.
@heniotierra. More than happy to see a fork that does. I don't think shell is a good place to do this, it's more of a DSC deal where existing tools could take this and make for example an ansible playbook that stacks little scripts like this to specify a desired state of a raspberry pi |
This comment has been minimized.
This comment has been minimized.
I'm having the same issue as @adiroman and @doktor500. |
This comment has been minimized.
This comment has been minimized.
GREAT JOB my firend!! ...but my question is: Can the Rpi3 work like any other 'out of the box' AP on the market? I mean, 'transparent' like any AP I can buy on store shelfs? So, the wifi devices connected to the AP 'share' the same IP class as the primary router. Or, even better, get the IP address from the DHCP working on the primary router? I am quite out of the IP configurations world, and I am just wondering if I can set the static IP class of the wlan0 to join my home lan configuration and have wireless devices on the same subnet of the primary router. This because I need to send/receive some UDP packets to devices 'wifi connected' to the lan through the Rpi (on other ports than the 80) And, once again, thank you very very much for sharing your code! |
This comment has been minimized.
This comment has been minimized.
@Clint67 thanks You can alter the |
This comment has been minimized.
This comment has been minimized.
Hi Lewis, First off thank you for creating such an easy to use script and helping troubleshoot. I'm trying to set up a new Pi3 to create a local network for several other Pi3s and I stumbled upon your script (among several sketchy or out-of-date tutorials). I ran the script on a brand new installation of Rasbian using NOOBS but I'm having a couple issues. If I don't reboot after the script runs then I can see the newly created AP on my phone and laptop, but they are not being assigned an IP address. If I reboot the Pi3 then the AP doesn't even show up. I'm a bit of a Linux noob so I'm unsure of how to go about troubleshooting; it appears as though hostapd and dnsmasq are both running after the reboot but they aren't functioning properly. Do these programs create a log file or anything I can look at? Is there any monitoring feature so I can see error/other messages in real-time? Thanks again! |
This comment has been minimized.
This comment has been minimized.
Great script! Only thing I had to configure was the following:
Otherwise the systemd service would exit right away. Not sure why, because the config is passed as a parameter. |
This comment has been minimized.
This comment has been minimized.
@tverboon that is strange, as you say we specify hostapd inside the service we completely generate from scratch @dfarley1 this wasn't written for NOOBS and hasn't been tested on NOOBS, it's written for jessie pixel and jessie lite On logging I haven't set it up, but try |
This comment has been minimized.
This comment has been minimized.
Thanks for the script! |
This comment has been minimized.
This comment has been minimized.
Thank you for this script. I was having trouble getting this to work after boot using 'hypriot'. If I manually restarted the service I could see the SSID but after a fresh reboot it just wouldn't show up. There were no errors in the logs and the output look exactly the same as when it worked manually. I figured it was a timing issue with the startup sequence. I finally got it to work by changing line 3 of the Systemd unit file to this instead: |
This comment has been minimized.
This comment has been minimized.
How to disable the AP script after use? |
This comment has been minimized.
This comment has been minimized.
This is great! I ran into a problem however because the password length must be at least 8 character. It'd be great to add a check like:
Otherwise one must manually run |
This comment has been minimized.
This comment has been minimized.
Unsolicited advicereinhart1010, I copied the dhcpcd.conf and interfaces files to dhcpcd.conf.station and interfaces.station before I ran the script restart_station
restart_access_point
|
This comment has been minimized.
This comment has been minimized.
@Clint67 |
This comment has been minimized.
This comment has been minimized.
when running: Configuration file: /etc/hostapd/hostapd.conf The AP is working, I can connect to it but there is no internet access. I use an RPI3 with the build-in wireless and the latest Raspbian with Pixel Help will be very much appreciated, Thnk you |
This comment has been minimized.
This comment has been minimized.
Thank you! This worked for me. Also, thank you for not adding the wireless->ethernet bridge. A lot of people want this but in my case, I'm only providing an interface to my device. Setting up captive portal would be helpful, so that a browser automatically opens and loads the main page from the server running on the RPi. |
This comment has been minimized.
This comment has been minimized.
For captive portal, try adding in dnsmasq.conf
|
This comment has been minimized.
This comment has been minimized.
Hi there! I was wondering how I could make the SSID hidden, as in it isn't broadcast to all computers and you have to manually enter the SSID on the connecting devices. |
This comment has been minimized.
This comment has been minimized.
ignore_broadcast_ssid=0 in /etc/hostapd/hostapd.conf should hide the SSID. |
This comment has been minimized.
This comment has been minimized.
hi,
|
This comment has been minimized.
This comment has been minimized.
don't know what people are running to get some of these errors. I run stock raspbian-lite, and have now got this working with the stretch distro I copy a From my PC I then run
Once connected to the Pi I run
Then I reboot and it works |
This comment has been minimized.
This comment has been minimized.
Hi, does it have a feature that if I connect ethernet cable on RPi3 and it gives internet connection like a router? |
This comment has been minimized.
This comment has been minimized.
@mrsimple97 it's not a bridge or wifi range extender, it's just an access point. I use it to make fake internet / network. You can try combining with https://gist.github.com/Lewiscowles1986/f303d66676340d9aa3cf6ef1b672c0c9 to make this a bridge, however, YMMV depending upon interface names |
This comment has been minimized.
This comment has been minimized.
Hello, I have tried to run your script but eth0 disappear. I have also written a script with the same base and eth0 also disappear. Have you an idea where is the trouble? |
This comment has been minimized.
This comment has been minimized.
@jonathandreyer do you have a .bash_history I can look at. Also what is the output of |
This comment has been minimized.
This comment has been minimized.
This script works fine with Ubuntu Mate 16.04.3 LTS on rpi3. Edit: Figured it out :-D |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
This works well for me, correctly setting up the wireless AP, but I also lose my ethernet connection. If I comment out the lines added in the /etc/network/interfaces file and reboot, the AP goes down as expected and I get ethernet back. Here's a pastebin of my ifconfig -a. Running on a rpi3 on Raspbian Stretch with desktop. Thanks. Edit: I got the ethernet working again after adding these lines to /etc/network/interfaces: |
This comment has been minimized.
This comment has been minimized.
At the very top
So which exact release date is meant with that? 2017-09-07 or 2017-08-16 Thanks for clarification! |
This comment has been minimized.
This comment has been minimized.
Spent a good couple of hours trying to do all this manually searching Google then stumbled across this script. Thanks! I had previously setup bridging between eth0 and wlan0 with the iptables commands but after rebooting from running the script I noticed my eth0 disappeared from ifconfig so I added the following to /etc/network/interfaces underneath what your script added in there and it worked. Seems related to what @JddAndrewLauren mentioned.
|
This comment has been minimized.
This comment has been minimized.
Oh btw https://gist.github.com/Lewiscowles1986/390d4d423a08c4663c0ada0adfe04cdb fixes stretch release network config (which sucks) |
This comment has been minimized.
This comment has been minimized.
Thanks for the script. Getting an AP up on an rpi3 w/ stretch is a BEAR. I used most of your initial script (above) and your most recent script on the stretch network config (here) BUT had to add |
This comment has been minimized.
This comment has been minimized.
Worked perfect until now. Stuck at obtaining IP address. Do You know what it might be? |
This comment has been minimized.
This comment has been minimized.
@stsdc try changing this: |
This comment has been minimized.
This comment has been minimized.
@Lewiscowles1986 This script works well! I noticed though that now it disables scanning for other APs on wlan0. I understand that this is necessary to start the AP but is there a way to disable the AP temporarily to access WiFi? I noticed that the AP starts at reboot so I'm kind of at a loss as to what to do. |
This comment has been minimized.
This comment has been minimized.
Not sure it matters, but when I ran this just now, the first output I saw after a bit was this:
To be clear this didn't seem to have any adverse effects, and I did a |
This comment has been minimized.
This comment has been minimized.
This even worked on the tinkerboard right out of the box, thanks a lot! |
This comment has been minimized.
This comment has been minimized.
It hosts ap, but if i try to connect to it from other devices, i cant.. it just sais connecting... |
This comment has been minimized.
This comment has been minimized.
Hi there. Fantastic script! I have tried countless tutorial on how to get the AP set up in stretch and none of them worked. This script is the first to show an ssid at all! And I can connect to it. I only have one thing to sort ou to fit my needs and Im a bit confused. I'm also creating a captive portal on the pi. I want a client to connect to the pi and be able to access the portal. Hopefully it can open automatically using the solution I saw in the comments when a client connects to the AP. I dont want the client that is connected to the AP (pi) to have internet access so no bridging required. I do however need the AP (pi) to have an internet connection also via wifi so that it can connect to the internet. I have a mifi router which it has to connect to. It would be fantastic if it would also connect through ethernet. I basically need the onboard wifi to connect to a router as well as provide an access point. I saw someone in the comments asking about the same thing (simultanious station/AP mode) I have installed this script and it works great but it remòves the internet connection via wifi. I have tried some of the solutions in the comments after installing this script such as adding the wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf file to /etc/network/interfaces file under wlan0 and all the static IP stuff but I cannot get the internet connection back. When I add wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf, the access point disappears, iw wlan0 link shows its connected to my router but I still don't have internet access. When I add wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf, the access point is still available but iw wlan0 link show not connected and you guessed int, no internet connection. Any help on how to get the internet connection back with an available wifi AP would be much appreciated. Thanks again for these awesome scripts! |
This comment has been minimized.
This comment has been minimized.
Many thanks for your script that looks exactly like what I need to run a remote desktop for my RPi3 using an android device on the field, away of wifi networks. I have downloaded and run rPi3-ap-setup.sh, then downloaded dhcpcd.sh and copied it to /usr/lib/dhcpcd5/dhcpcd (as you mention in your comment of 12 Oct). |
This comment has been minimized.
This comment has been minimized.
Thanks for the useful script. I wanted eth0 working with internet and wireless AP without internet access. I my case, after reboot Wireless AP created as I needed but eth0 didnot work. source-directory /etc/network/interfaces.d And sudo raspi-config > Advanced Options > Network interface names > Yes And finally edited /lib/udev/rules.d/73-usb-net-by-mac.rules by changing NAME="$env{ID_NET_NAME_MAC}" to NAME="eth0". After Reboot all is good as I needed. |
This comment has been minimized.
This comment has been minimized.
@Lexicographical To disable AP mode after install
To enable AP mode after install
You'd also have to edit
then as well as the above for enabling and disabling, you can exchange link targets between ap-mode and stock /etc/network/interfaces file. It's a bit advanced, but doable. |
This comment has been minimized.
This comment has been minimized.
You, sir, are awesome. I've been fighting AP configuration for months, and NOTHING. WAS. WORKING. |
This comment has been minimized.
This comment has been minimized.
Hi there , can you please tell how can I undo all the settings done by this code? |
This comment has been minimized.
This comment has been minimized.
This file has resulted in no internet connectivity to my raspberry pi. It says Connection to dhcpcd lost. I'm totally clueless what to do now. Pleaseeeee helllpppp!!!! Plus the raspberry pi didn't become the access point |
This comment has been minimized.
This comment has been minimized.
Awww. spam :removed: |
This comment has been minimized.
This comment has been minimized.
@Aimma did you follow the guide like 2 comments above your question? @lucascrandle removed for spam, please don't do that again. I've just re-tested (again), the script works on raspberry pi 3's (it's designed platform) using raspbian (as designed). Start a blog elsewhere if you want to post links. I don't want people to be confused further. @dereksnyder42v2 cheers |
This comment has been minimized.
This comment has been minimized.
Thanks Lewis! |
This comment has been minimized.
This comment has been minimized.
Question: After employing this solution on the 2017-11-09 version of Raspian Lite (Stretch), it seems like I may have two competing DHCP clients running.
Am I interpreting that correctly? And if so, is the answer to simply uninstall ics-dhcp-client? Aside from this question, I'm convinced it is all working as intended on this platform. |
This comment has been minimized.
This comment has been minimized.
I get this error: pi@raspberrypi:~/Desktop $ sudo bash ./rPi3-ap-setup.sh password apname If I type : sudo bash Desktop/rPi3-ap-setup.sh YourWifiApName YourWifiApPassword the terminal gets frozen. |
This comment has been minimized.
This comment has been minimized.
@jimbo1969 sorry, as it states all over the place. This is intended to work with a Raspberry Pi 3. I Cannot comment on your needed changes for an earlier raspberry Pi or packages as I don't make Raspberry Pi distro. There is a networking fix for dhcpcd5 here https://gist.github.com/Lewiscowles1986/390d4d423a08c4663c0ada0adfe04cdb same deal. It should be installed before this script. @GigiBoot, Looks like some of the stages fail, likely due to you not having networking setup. I've not run this on a PiZero-W. This script is only intended for a Raspberry Pi 3 and it's onboard network wlan |
This comment has been minimized.
This comment has been minimized.
This worked with Raspian Stretch March 2018 Unsolicited adviceFirst I needed to mv your .sh: sudo mv /usr/lib/dhcpcd5/dhcpcd /usr/lib/dhcpcd5/dhcpcd.origsudo mv /boot/dhcpcd.sh /usr/lib/dhcpcd5/dhcpcdI then ran your script: I did need to make one modification, I added: I also recommend placing both .sh files in the /boot directory and adding the command: This will remove one more manual step. Thanks |
This comment has been minimized.
This comment has been minimized.
The script executed without any issues, but I was not able to get internet for my mobile devies Unsolicited AdviceI followed a combination of this gist and this blog: removed I believe SET UP IPV4 FORWARDING section from removed did the trick for me.
Thanks! @Lewiscowles1986 @frillip |
This comment has been minimized.
This comment has been minimized.
After struggling with several instructions on the Internet this script works perfect for my Raspberry Pi Zero W with latest Raspian Stretch Lite and dslrdashboard server to Wifi control my Nikon DSLR over a standalone SSID. Thank you very much for this. |
This comment has been minimized.
This comment has been minimized.
Thank you @youwalther65 |
This comment has been minimized.
This comment has been minimized.
Thank's Also had the problem that eth0 disappear: but @JddAndrewLauren commet fixed that |
This comment has been minimized.
This comment has been minimized.
This is so awesome! I've made an RPi Zero W based gadget that I want to control via mobile phone. This was a VERY easy way to set up |
This comment has been minimized.
This comment has been minimized.
Worked on first try for me! Thanks to @JddAndrewLauren and @maxi94 for comments about getting eth0 back! |
This comment has been minimized.
This comment has been minimized.
Just a note, if you search the comments there are other ways to get eth0 back without adding an Thanks @RichardBronosky & @moppymopperson |
This comment has been minimized.
This comment has been minimized.
Lewis Everything works fine & is stable. However if the throughput to the Internet is say 30Mbps when I connect the phone to a windows PC via a USB port, I am getting about 8Mbps when connecting the PC via the rPi3 AP. The cpu load on th rPi3 is minimal. Have you any idea why this is so? Suggestions to improve? |
This comment has been minimized.
This comment has been minimized.
I have everything working i can connect to the access point and all the traffic is also routed from ethernet to access point but my ethernet icon says "connection to dhcpcd lost" though when i ifconfig it shows eth0 and also ip address. Plzz help me out about ethernet icon plzz.. Thnx in advance |
This comment has been minimized.
This comment has been minimized.
Hi @ChrisRichards2 I have no idea matey. Perhaps the wifi on the Pi3 is just not up to it. I've never really tried to measure WiFi speed. @amishm766 I don't know anything about that problem, it sounds like the GUI is misreporting or maybe something is messed up. |
This comment has been minimized.
This comment has been minimized.
@adiroman, @doktor500, @botzen67 ,I have face the same error, However the AP works fine for me even with this error. For wpa authentication, just try kill wpa_supplicant process before running hostapd. |
This comment has been minimized.
This comment has been minimized.
Is this possible on an rpi 3b? If so, how? Im new to all this, i dont know shell, so is there like an image i can just flash onto my raspi? |
This comment has been minimized.
This comment has been minimized.
@Ridley-nelson this works on a 3b & 3b+ How? Follow the guides, learn shell first. I've tried to document, but I'm afraid it might be too much of a stretch for me to advise the whole internet on how to use. If you scroll up you'll see some notes to others.
pi-gen wouldn't run these exact commands as they are on a Pi. In order to run these in an environment like Pi-gen, you'd need to be in a chroot so that the paths worked and the commands act in the expected way for the built image. This is not something I can help with, but hopefully that helps to signpost |
This comment has been minimized.
This comment has been minimized.
Hey @Lewiscowles1986, awesome job on the script. I am just stuck at one part and would like your quick scrutiny on that. I am using raspberry pi 3 b+ as the device and ran the script on it without any errors. Rebooted it. Access point shows up. But, it is unable to provide an IP Address to whichever end device I try to connect it with. What could be the issue here? EDIT: I am not using any bridging, just the Access point which your script generates. |
This comment has been minimized.
This comment has been minimized.
It could be that the DHCP server has not started so cannot assign address, or that you're not entering the correct password |
This comment has been minimized.
This comment has been minimized.
This works for me on my raspberry pi zero w.
|
This comment has been minimized.
This comment has been minimized.
@bengefferies, the dhcpcd5 should come first as you may lose internet. Same for the adapter pass-through script. They should at least be downloaded before running any script |
This comment has been minimized.
This comment has been minimized.
Thank you for this! I couldn't find anything else on what to do. |
This comment has been minimized.
This comment has been minimized.
@bkis your script calls out correctly "systemctl unmask hostapd" and for dnsmasq also are now required to start the services. Running this script as is fails because services are now masked by default. Thank you and thank you to the author @Lewiscowles1986. |
This comment has been minimized.
This comment has been minimized.
For those interested, my configuration uses a USB Wireless Adapter (Edimax which is Realtek RTL8188CUS) in addition to the built in WiFi for Raspberry Pi 3. When executing this script, the internal WiFi is defeated and does not start. I will attempt debug and report here for those searching for such a configuration and why it stops the internal WiFi. All help is welcome if someone knows why this is happening. |
This comment has been minimized.
This comment has been minimized.
@bkis please link to your own blog in future. I've edited the comment to be in a It's quite enough to maintain something, without many people offering additional changes, or polluting scope with things that are separate. There is other advice in this thread to backup if you wish to switch between AP and Original interfaces from 2016, as well as a script to keep newer raspbians connecting and a separate bridge script. They are all separate parts and not meant to be combined within the context of this Gist. I've deliberately stayed away from dual purpose AP/NON-AP mode. It's a complication |
This comment has been minimized.
This is specifically for the raspberry pi 3. The script should work with any wireless card setup as wlan0 that does not require a driver, please provide feedback, let me know any issues.
The use-case is setting up a private network, maybe for some rPi zero's to connect to, but the sky is the limit; you could bolt on a dns-server and provide a walled-garden internet experience like facebook (please don't), or host your personal project to showcase at interview.
Now allows you to specify the Access point (AP) name, so it does not have to be whatever it was before.