COMPLETE OctoPrint - How to configure a wi-fi dongle

Discussion in 'Guides, Mods, and Upgrades' started by Pierce, Mar 20, 2016.

  1. Pierce

    Pierce Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    249
    Likes Received:
    67
    Hey,

    So I hate configuring wi-fi on raspberry pi, especially if I don't want to plug in a monitor and cables. so this mini guide is just for those with PuTTY/SSH access, if you have it plugged into HDMI and keyboard just use the GUI like any sane person.

    EDIT: Its probably easier using Sarah's much simpler(and from the guide) method detailed here: https://forum.e3d-online.com/index....onfigure-a-wi-fi-dongle.829/page-2#post-13577

    Here are my basic steps for anyone that wants to try what I did. You will need a raspberry pi compatible wifi dongle of course.

    1, Plug in ethernet
    2, connect via PuTTY
    3, Install wicd-curses ("sudo apt-get update" then "sudo apt-get install wicd-curses")
    3a, You might want to reboot, either use the octoprint website or type "sudo shutdown -r now"
    4, Run "sudo wicd-curses"
    5, Configure your wifi network, make sure to type in your password + select "auto connect" to network
    6, Reboot device and disconnect ethernet
    7, Wait for what seems like too long and check it connects :) Note it will more than likely have a new IP address!

    8, Smile and realise you now have one less cable to deal with and a 3d printer you only need to plug in to power.

    Thanks,
    Pierce
     
    #1 Pierce, Mar 20, 2016
    Last edited: May 20, 2016
    Mike Kelly likes this.
  2. mike01hu

    mike01hu Well-Known Member

    Joined:
    Apr 22, 2014
    Messages:
    957
    Likes Received:
    166
    @Pierce, as a relatively Raspi virgin(!) I have acquired a couple of them including the Pi3. I have loaded OctoPrint on the Pi2 but will put this over to the Pi3. I assume I can do your procedure on the bare board as I have yet to receive my BB. Your guidance is appreciated.
     
  3. Pierce

    Pierce Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    249
    Likes Received:
    67
    @mike01hu I believe so as this is just software configuration, you can always move the sd card to another pi and just configure it via the gui then move the card back.

    Also I heard the Pi3 can get a bit warm so you might want to stick a heat sink on it as an FYI, if it gets warm it just scales back the cpu clock.
     
  4. mike01hu

    mike01hu Well-Known Member

    Joined:
    Apr 22, 2014
    Messages:
    957
    Likes Received:
    166
  5. Dr Jeep

    Dr Jeep Well-Known Member

    Joined:
    Sep 12, 2015
    Messages:
    530
    Likes Received:
    169
    Mike just be aware that unless you downloaded one of the nightly builds you can't simply move the sd card from the pi2 to the pi3 at the moment as the release version of octopi is lacking support for the pi3.

    So if you intend to do that start with a nightly build. There will be a way of upgrading it to the release version later.
     
  6. mike01hu

    mike01hu Well-Known Member

    Joined:
    Apr 22, 2014
    Messages:
    957
    Likes Received:
    166
  7. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    Hi Pierce

    So I'm back again, I was working my way through your instructions, everything was going ok, then I did the restart stage giving a sudo command as you suggested. It quickly said it was rebooting, but then no action. I waited for some time, I think 2-3 minutes (not long enough argh???) and after nothing happened, I went to the BB and, seeing it said Octoprint was still operational, I did a manual power down of the BB (argh, perhaps wrong...)

    Now I can't get back on to Octoprint any more, or to the Pi via PuTTY. Any ideas? PuTTY says "connection denied", Safari just won't go anywhere. My router says the same address is still valid. Argh! (did I say that already?)

    Jon
     
  8. Pierce

    Pierce Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    249
    Likes Received:
    67
    @Jon My first reboot after disconnecting ethernet did seem to take quite a while, certainly in the minutes range.

    If you restart with ethernet plugged in (before you restart or turn on) it should get a new IP or same it had and you can connect via the wired connect again and check everything. As I mentioned in my original post I hate setting up wifi its always a bit of a pain and takes a few goes!
     
  9. Sarah Nicholson

    Sarah Nicholson Well-Known Member

    Joined:
    Dec 20, 2015
    Messages:
    319
    Likes Received:
    114
    Seconding Pierce, Octoprint does take quite a while to start up. Are you still having problems with it?

    I've recently acquired one of these to test to see if it will provide a nice safe shutdown for my Pi in case I forget to shut it down properly via Octoprint or just need to power off in an emergency. Once I've had a chance to play with it I'll report back on results. I prefer to have my Pi run off the printer power because it's one less thing to switch on and one less power socket needed.
     
    Pierce likes this.
  10. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    Hi @Pierce

    Thanks for coming back. I tried that, I am still connected to the wired network and am unable to connect through that either! That's what I was referring to in my last post, I tried connecting wirelessly too, but as I didn't finish your list of instructions I didn't think it would work.

    Any ideas for things to do to re-establish a connection or reset things if necessary?
     
  11. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    @Sarah Nicholson I'll try it one more time I guess, but I think I left it for a while the (numerous) times I tried already. And the BB said the Octoprint was connected, which would suggest it had booted up...

    PS your device looks good - a good way to do the remote start-stop without having to run more power. IFWHEN I get back up and running I'll definitely be interested to see how it goes.
     
  12. Sarah Nicholson

    Sarah Nicholson Well-Known Member

    Joined:
    Dec 20, 2015
    Messages:
    319
    Likes Received:
    114
    If you're able to access the pi, the easiest thing would be to plug in a screen and keyboard, but obviously that's a bit tricky when it's hidden in the printer base. What happens if you remove the wifi dongle and power down the pi, then attempt to reconnect via ethernet, are you able to connect to it then?
     
  13. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    That's a good idea, I'll try it...

    (will be fiddly)
     
  14. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    (maybe impossible)
     
  15. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    It just started working

    I just turned it on to test while removing the cover

    I did it like 5 times before

    Weird
     
  16. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    just configuring and it threw me off again... let's see how long it takes this time...

    ( @Pierce when you say configure your network do you just press the K (I think) option and then input your password? Or click connect and the do it? )
     
  17. Pierce

    Pierce Well-Known Member

    Joined:
    Sep 4, 2015
    Messages:
    249
    Likes Received:
    67
    @Jon I think K is RFKill(aka wifi turn off). I never got it to connect while ethernet was plugged in when I tried. so it was go to wicd-curses, select network with right arrow, type in password and select the check box "connect at startup", hit F10 to save and then restart. Apparently "sudo reboot" might be the more sensible command to restart the octopi.

    It sounds like you are getting there at least :) I don't think I ever managed to get wifi setup first time! So keep on rebooting and testing, boot up time on mine is a good 3 minutes or so.

    @Sarah Nicholson Agree with the "just plug in a screen" that was my first comment that any sane person would do it this way, the other alternative would be if you have a spare raspberry pi just move the memory card. Where it is in the case is a bit awkward to get to, at least as soon as this is all configured its done and dusted! Can't wait to see how that raspberry pi UPS pans out you have!
     
  18. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    Ok so just unplugging and replugging in the ethernet got the Pi recognising and connecting, now I have completed the steps, my router can see the BB on the wifi, new IP address as you say, but no OctoPi, on either wired or wireless! PuTTY can't see it either omg

    Back to restarting and waiting, still nothing

    Maybe it all needs a little rest, that seems to be what did it before

    Little steps. It's true @Pierce that setting up wifi is always a mission of multiple restarts. It's bee years since I had to do anything complicated, but I still remember!
     
  19. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    Actually no, the Pi is not active on either wifi or ethernet right now... :( (according to the router)
     
  20. Jon

    Jon Well-Known Member

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    2
    If anyone's still listening

    I HAD the BB wifi 'active' on the router, but no Octoprint loading up in the browser, now it is 'inactive' on the router, suggesting that the Pi has chosen to hang up the connection..?
     

Share This Page