COMPLETE Setting up wifi for OctoPi

Discussion in 'Guides, Mods, and Upgrades' started by jfb, Jul 16, 2016.

  1. jfb

    jfb Well-Known Member

    Joined:
    Mar 30, 2016
    Messages:
    91
    Likes Received:
    18
    Configuring wifi on OctoPi 0.13.0 build on Raspbian Jessie Lite

    With the previous version of OctoPi, (0.12, built on Raspbian Wheezy) the simple instructions on the OctoPi download page and in Sarah's post here https://forum.e3d-online.com/index....onfigure-a-wi-fi-dongle.829/page-2#post-13577 worked perfectly.

    With the latest version though, those steps don't seem to work too well, so here are the steps I followed to make mine work (first few steps are identical). If you already have a nicely configured OctoPi with lots of settings, custom controls etc but on an earlier version and are upgrading, take a copy of your config.yaml (/home/pi/.octoprint/config.yaml) first so you can simply copy it back later.

    1. Download the latest image from https://github.com/guysoft/OctoPi, unzip it and and save the .img file somewhere.
    2. Follow the instructions here https://www.raspberrypi.org/documentation/installation/installing-images/README.md to write the .img file you downloaded in step 1 to your SD card.
    3. Once the image is written and while you still have the SD card in your PC, edit octopi-network.txt in the root directory and put your wifi details in.
    4. Put the SD card in the Pi and boot up.
    If you skipped that step previously, then you can edit the file on your Pi
    sudo nano /boot/octopi-network.txt

    New steps.
    • Log onto the Pi (you'll need either a keyboard & monitor, or use a network cable and use PUTTY or whatever - I use PUTTY)
    • Edit wpa_supplicant.conf
    sudo nano /etc/wpa_supplicant/wpa_supplicant.conf​
    • Add the following at the end, substituting your own SSID and Passkey of course
    network={
    ssid="mynet"
    psk="mykey"
    }
    • Save the file and exit nano (Ctrl-O, Return, Ctrl-X)
    Next, disable power saving on the wifi otherwise it will constantly drop - This appears to be aggressively implemented in the driver regardless of general system settings
    • Create a new file (if it doesn't already exist) by running the following
    sudo nano /etc/modprobe.d/8192cu.conf
    • and put this in the file:
    options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=1
    • Save the file and exit nano (Ctrl-O, Return, Ctrl-X)

    That will work for many wifi dongles, yours may use a different driver, eg, the 8188eu or whatever, in which case you follow the same pattern to suit your driver as in...
    • Create a new file by running the following
    sudo nano /etc/modprobe.d/8188eu.conf
    • and put this in the file:
    options 8188eu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=1
    • Save the file and exit nano (Ctrl-O, Return, Ctrl-X)
    • Finally, reboot
    sudo reboot now
    • Log back in and run
    ifconfig wlan0

    You should see an IP Address like this in second line of the output....
    inet addr:192.168.1.21 Bcast:192.168.1.255 Mask:255.255.255.0

    That should work in at least most cases as far as I know. Hope someone finds it useful.
     

Share This Page