Feb 082013
 

As a continuation this post, I have completed the first version of the RaspAP WebGUI. I have yet to decide on a good name for it though.

These files are now deprecated. To see the latest version, please check out the github repository at https://github.com/billz/raspap-webgui/

If you would like to download it to try it out, the links to the PHP script and supporting files are here –
Zip Version
tar.gz Version

Specific instructions to install the supported software are in the post linked at the beginning of this post.
For a quick run through, read on !
The Packages required for the WebGUI are –

  • lighttpd (I have version 1.4.31-2 installed via apt)
  • php5-cgi (I have version 5.4.4-12 installed via apt)

along with their supporting packages, php5 will also need to be enabled via the following command and lighttpd restarted.

sudo lighty-enable-mod fastcgi-php
/etc/init.d/lighttpd restart

/etc/sudoers will also need to be updated with the following line –


www-data ALL=(ALL) NOPASSWD:/sbin/ifdown wlan0,/sbin/ifup wlan0,/bin/cat /etc/wpa_supplicant/wpa_supplicant.conf,/bin/cp /tmp/wifidata /etc/wpa_supplicant/wpa_supplicant.conf,/sbin/wpa_cli scan_results,/sbin/wpa_cli scan,/bin/cp /tmp/hostapddata /etc/hostapd/hostapd.conf,/etc/init.d/hostapd start,/etc/init.d/hostapd stop,/etc/init.d/dnsmasq start,/etc/init.d/dnsmasq stop,/bin/cp /tmp/dhcpddata /etc/dnsmasq.conf

Once those modifications are done, unzip the files to /var/www and it should be up and running !

Keep in mind that this is a very very first alpha version of this.
In testing, it worked for me, but if you have issues or feedback, please feel free to contact me or comment on this post 🙂 I look forward to hearing back from anyone who has tried this out 🙂

Share

  40 Responses to “RaspAP WebGUI”

  1. Yay! Got it up and running. Haven’t tried out the actual AP part yet, but will do shortly! Lovely alternative to installing the behemoth that is wicd-curses!

  2. Comments:
    1. It’s not what you’d call attractive 😉
    2. Would it be possible to list all the wifi dongles and what they’re connected to if neither one is an access point? i.e. Both wlan0 and wlan1 were connected to my home router.
    3. Configuration of the AP works and saves.
    4. Failed to bring up hostapd…. Hmmm… Will see if I can fix that!

    • 1. Yeah, I know haha. Prettiness wasn’t my first priority but next release should be all prettied up 🙂

      2. I will be putting either an interface selector, or multiple sections for all the wlan adapters. What do you think ?

      • Yeah, an interface selector would be perfect – don’t want that screen any more complicated.
        I really like the wifi scanner part, I should have said – getting a reading on the dB levels is vital

        • Yep, I’ve implemented an interface selector now 🙂 just need to figure out how to not show the wireless bits when you select ethernet haha.

          WiFi scanner will be getting a facelift too, so hopefully new look will be ok 🙂

  3. Oh, I know what’s happened – I tried to get an AP working before so I think I’ve messed up my settings. Gah. I’ll have to try it from a fresh install I think. Poo.

    • Fresh will be a good test as I haven’t tested on a fresh install. Though I will be releasing a prebuilt RaspAP with WebGUI.image later on which hopefully will negate the need for fresh installs.

  4. Have you considered adding configurations for other then just psk, like EAP-PEAP, 802.1x, etc?

    Thanks

    • Yes I have, but let’s start small for now 🙂

      It’s on the to do list, but I’m making slow progress with it as it is. Wireless N mode is also on the todo list as at the moment it only configures it for wireless G.

  5. Great, this is very nice, giving a GUI to configure RASPI !

  6. Great article!
    I did everything as suggested in the article.the webui page worked just fine,it pulled all the network information from the raspi, however the ifup, ifdown and the scan network commands are crashing even after giving the required permissions to www-data in the sudoers file. Any hint?

    • Thanks !

      The ifup, ifdown, and scan commands don’t have proper input validation yet, so you’ll need to make sure you actually have wlan0 selected when you run the commands.
      Also, what do you mean by crashing ?

  7. […] : Turn the Raspberry Pi Into a Shaping WiFi Router Script : Web Configuration Page for Raspberry Pi RaspAP WebGUI How To : Use A RT5370 USB WiFi NIC In A […]

  8. Thank you for publishing this!

    I have a problem to get it working though. The index.php fails to load. Lighttpd generates the following error in error.log:

    “PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/phpincs.php on line 145”

    The line number varies a little with each try. Any ideas?

    • It just means that PHP is taking longer than the maximum amount of time to process the page.
      Do you have much running on the Pi ?

      • Not at all. I only have hostapd, lighttpd, etc; and a remote desktop over X. The CPU graph hardly shows any activity.

        If I run a simple PHP page with phpinfo() it returns almost immediately with all PHP settings info.

        • My bad!
          I had a detailed look at the code and it turned out I had in some way copied the contents of index.php to phpincs.php

          After correcting that, it works fine.

          Thanks again for providing a starting point for this wifi-stuff, and for your quick response.

  9. I’m starting with a stripped down version of raspian. Can you tell me other requirements ? Wirelesstools? Supplicant? Iw? Etc.

  10. We should merge this and my Project: https://github.com/Hypfer/hostapd-statistics

  11. Excellent tutorial,

    Firstly i’m getting an error when trying to bring up the hotspot 405 Not Allowed. I did add the www-data to sudoers.

    Secondly my aim is to create a hotspot and allow the user to connect to the RPI from any device through a webpage and then use this to setup the wifi ssid and password. So instead of connecting via ssh to change the setting for your home wifi details you could just connect to the RPI hotspot and then change the SSID and password of your home network.

    Could you please help.

    Thanks
    Gresham

    • Is the 405 from Apache ? I’ve never come across that before.

      So you want the hotspot to configure the wifi client settings for the Pi ?
      That’s possible, but I don’t recall whether it’s already in the RaspAP Gui.

      I currently am not working on this anymore, but if someone is interested in taking over, I’ll post up the spaghetti code onto GitHub.

  12. thanks for this tutorial , but i have problem

    when I click on scan or when I add network then save it show me
    the index page of the appahce

    it works …..

    I didn,t understand why

    please help

  13. thanks for this tutorial , but i have problem

    when I click on scan or when I add network then save it show me
    the index page of the appahce
    ————————————————–

    It works!

    This is the default web page for this server.

    The web server software is running but no content has been added, yet.

    ————————————————————

    I didn,t understand why

    please help

  14. Hi there..

    First i will says its a great script… But

    it doesn’t seems to work on OSMC which runs on Debian Jessie.. Is it something you noticed? if you can would you please take a look at it?

    Keep up the good work

    best regards
    Kasper Affeldt

    • Hi,

      Thanks, I haven’t tried it before on OSMC, and it’s been a while since I’ve looked at this, but I’ll try and have a look at this when I have some time.

      You could have a look at this one https://github.com/billz/raspap-webgui which is based off my script and see if that works for you?

      • Hello,

        I just tried and indeed, it does not work with a fresh distribution of Raspbian-Jessie. The project on GitHub does not work either.

        The interface wlan0 stays down and cannot be started. Scanning works, read/write from the wpa_supplicant conf file works. But the interface cannot connect, maybe an issue with the default drivers? wpa_supplicant?

        D

  15. Is it ok for you to use a modified version of your script as part of a bigger project if your name and a link to the original script is included in the sources?

  16. Hi, do you provide a public github for this? I think it would be a good contribution and a good way to keep people updated if you happen to make changes or make the project bigger

  17. Name successtion: wiappi – Web Interface for Access Point on Pi

  18. This is excellent, just what I was looking for

  19. A couple points of feedback:

    1) On my Pi 3 the default lighttpd doc directory was /var/www/html and not /var/www .
    2) I had to add change <? to <?php on the php includes page in order to for the include php file to load with a stock configuration.
    3) I had to manually edit /etc/network/interfaces and enable DHCP on the wlan0 interface changing iface wlan0 inet manual to iface wlan0 inet dhcp in order to get things working.

    Thanks for taking the time to build this. Very helpful!

  20. It works with Raspberry Pi W ?

Leave a Reply to Arie Cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.